From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH XEN v6 22/32] tools/libs/foreignmemory: optimise map(num==1, err==NULL) case Date: Fri, 11 Dec 2015 15:56:47 +0000 Message-ID: <1449849407.30975.62.camel@citrix.com> References: <1449141675.4424.125.camel@citrix.com> <1449141749-14940-1-git-send-email-ian.campbell@citrix.com> <1449141749-14940-23-git-send-email-ian.campbell@citrix.com> <22120.19425.758636.32957@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <22120.19425.758636.32957@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: wei.liu2@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-12-09 at 15:42 +0000, Ian Jackson wrote: > Ian Campbell writes ("[PATCH XEN v6 22/32] tools/libs/foreignmemory: > optimise map(num==1, err==NULL) case"): > > This looks to be a reasonably common case (many of the previous > > callers to xc_map_foreign_pages use it) and it is easy enough to avoid > > a malloc for it. > ... > > I'm not 100% sure this is worth the complexity, hence not folding > > into the base patch yet, it could easily be dropped. > > I would suggest that we should park this until we have a benchmark > showing it's helpful. Agreed, dropped for v7. Ian.