From: "Jan Beulich" Subject: Re: [PATCHv10 4/4] gnttab: use per-VCPU maptrack free lists Date: Thu, 28 May 2015 16:39:22 +0100 Message-ID: <556752CA020000780007EB08@mail.emea.novell.com> References: <1432663228-27680-1-git-send-email-david.vrabel@citrix.com> <1432663228-27680-5-git-send-email-david.vrabel@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 1Yxzu2-0004Yq-C2 for xen-devel@lists.xenproject.org; Thu, 28 May 2015 15:39:26 +0000 In-Reply-To: <1432663228-27680-5-git-send-email-david.vrabel@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: David Vrabel Cc: xen-devel@lists.xenproject.org, Malcolm Crossley , Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 26.05.15 at 20:00, wrote: > v10: > - Divide max_maptrack_frames evenly amongst the VCPUs. > - Increase default max_maptrack_frames to compensate. I'm not really happy about this, but also can't immediately suggest a better model (without removing maptrack frames from vCPU-s). I'd really like to hear opinions of others, namely maintainers, regarding this resource use issue. Should we perhaps start accounting maptrack frames against the domain's allocation (i.e. a domain can get as many as it likes beyond the set limit, provided it ballooned out suitably many pages up front)? > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -57,7 +57,7 @@ integer_param("gnttab_max_frames", max_grant_frames); > * New options allow to set max_maptrack_frames and > * map_grant_table_frames independently. > */ > -#define DEFAULT_MAX_MAPTRACK_FRAMES 256 > +#define DEFAULT_MAX_MAPTRACK_FRAMES 1024 Apart from everything else this again results in ... > @@ -1457,6 +1491,17 @@ gnttab_setup_table( > gt = d->grant_table; > write_lock(>->lock); > > + /* Tracking of mapped foreign frames table */ > + gt->maptrack = xzalloc_array(struct grant_mapping *, max_maptrack_frames); ... this becoming an order-1 runtime allocation on other than 32-bit ARM. Jan