 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 1/8] xen: introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options
 >>> On 17.10.14 at 17:31, <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> Introduce gnttab_max_maptrack_frames: a new Xen command line option to
> specify the max number of maptrack frames per domain.
> Deprecate the old gnttab_max_nr_frames and introduce gnttab_max_frames
> instead, that doesn't affect the maptrack. Keep gnttab_max_nr_frames for
> compatibility.
> 
> Rename internally max_nr_grant_frames to max_grant_frames to avoid
> confusions.
> 
> Introduce DEFAULT_MAX_MAPTRACK_FRAMES, that is completely independent
> from max_nr_grant_frames.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with a few nits:
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -24,6 +24,7 @@
>   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>   */
>  
> +#include <xen/ctype.h>
>  #include <xen/err.h>
>  #include <xen/iocap.h>
>  #include <xen/lib.h>
I don't see why you need this - leftover from an earlier version?
> @@ -40,16 +41,26 @@
>  #include <xsm/xsm.h>
>  #include <asm/flushtlb.h>
>  
> -#ifndef max_nr_grant_frames
> -unsigned int max_nr_grant_frames = DEFAULT_MAX_NR_GRANT_FRAMES;
> +/* this option is deprecated, use gnttab_max_frames and
> + * gnttab_max_maptrack_frames instead */
Coding Style.
> +static unsigned int max_nr_grant_frames;
__initdata for this one, and __read_mostly for the other two?
> @@ -2930,6 +2936,22 @@ static struct keyhandler 
> gnttab_usage_print_all_keyhandler = {
>  
>  static int __init gnttab_usage_init(void)
>  {
> +    if ( max_nr_grant_frames )
> +    {
> +        printk(XENLOG_WARNING
> +               "gnttab_max_nr_frames is deprecated, use gnttab_max_frames 
> instead\n");
> +        if ( !max_grant_frames )
> +            max_grant_frames = max_nr_grant_frames;
> +        if ( !max_maptrack_frames )
> +            max_maptrack_frames = max_nr_grant_frames * 
> MAX_MAPTRACK_TO_GRANTS_RATIO;
Perhaps MAX_MAPTRACK_TO_GRANTS_RATIO could go away
altogether with it just having a single use here, and this being
only here to ensure backward compatibility?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |