From: "Jan Beulich" Subject: Re: [PATCH v8 1/8] xen: introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options Date: Mon, 20 Oct 2014 11:34:28 +0100 Message-ID: <544501540200007800040329@mail.emea.novell.com> References: <1413798499-28314-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.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XgAIK-0006o1-Fw for xen-devel@lists.xenproject.org; Mon, 20 Oct 2014 10:34:32 +0000 In-Reply-To: <1413798499-28314-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 20.10.14 at 11:48, wrote: > Changes in v8: > - remove unused #include; > - set max_nr_grant_frames as __initdata; > - set max_grant_frames and max_maptrack_frames as __read_mostly; > - respent coding style for comments; Not sure what "respent" here means, but ... > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -40,16 +40,25 @@ > #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 */ ... this comment is still malformed. > @@ -2930,6 +2934,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 * 8; Did it not occur to you to express the 8 here as DEFAULT_MAX_MAPTRACK_FRAMES / DEFAULT_MAX_NR_GRANT_FRAMES (with a BUILD_BUG_ON() making sure the former isn't smaller than the latter)? Jan