[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 1/8] xen: introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options



>>> On 13.10.14 at 16:58, <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -611,8 +611,23 @@ Specify the serial parameters for the GDB stub.
>  ### gnttab\_max\_nr\_frames
>  > `= <integer>`
>  
> +*Deprecated*
> +Use gnttab\_max\_frames and gnttab\_max\_maptrack\_frames instead.
> +
> +Specify the maximum number of frames per grant table operation and the
> +maximum number of maptrack frames domain.
> +
> +### gnttab\_max\_frames
> +> `= <integer>`
> +
>  Specify the maximum number of frames per grant table operation.
>  
> +### gnttab\_max\_maptrack\_frames
> +> `= <integer>`
> +
> +Specify the maximum number of maptrack frames domain.
> +The default value is 8 times gnttab_max_nr_frames.
> +

Please don't break the alphabetical sorting in this file (i.e. the two
new options should go ahead of the deprecated old one).

I also question this latter new option referencing the deprecated
one.

> +/* this option is deprecated, use gnttab_max_frames and
> + * gnttab_max_maptrack_frames instead */
> +static void __init parse_gnttab_max_nr_frames(const char *s)
> +{
> +    if ( isdigit(*s) )
> +    {
> +        max_grant_frames = simple_strtoul(s, &s, 0);
> +        max_maptrack_frames = max_grant_frames * 
> MAX_MAPTRACK_TO_GRANTS_RATIO;
> +    }
> +}
> +custom_param("gnttab_max_nr_frames", parse_gnttab_max_nr_frames);

Hmm, that's not really how I think (and outlined) this should work.
Considering that setting both of the to be controlled variables to
zero is meaningless, have _3_ variables each controlled by the
respective integer_param() command line option, and each zero
initialized. Then in an __initcall() handler (I think that's early
enough, but please double check) check which of the two new
variables are still zero, and set them according to the deprecated
option's value if so. And of course warn if the deprecated option
is being used.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.