From: "Jan Beulich" Subject: Re: [PATCH v7 1/8] xen: introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options Date: Fri, 17 Oct 2014 16:52:12 +0100 Message-ID: <5441574C020000780003FB54@mail.emea.novell.com> References: <1413559886-11516-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xf9pA-0001lD-5c for xen-devel@lists.xenproject.org; Fri, 17 Oct 2014 15:52:16 +0000 In-Reply-To: <1413559886-11516-1-git-send-email-stefano.stabellini@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel , Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 17.10.14 at 17:31, 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 Acked-by: Jan Beulich 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 > #include > #include > #include I don't see why you need this - leftover from an earlier version? > @@ -40,16 +41,26 @@ > #include > #include > > -#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