From: Tim Deegan Subject: Re: [PATCH] honor MEMF_no_refcount in alloc_heap_pages() Date: Thu, 26 Feb 2015 13:38:04 +0100 Message-ID: <20150226123804.GD43832@deinos.phlegethon.org> References: <54EDED690200007800063A86@mail.emea.novell.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 1YQxoQ-00027S-OE for xen-devel@lists.xenproject.org; Thu, 26 Feb 2015 12:45:06 +0000 Content-Disposition: inline In-Reply-To: <54EDED690200007800063A86@mail.emea.novell.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: Jan Beulich Cc: Ian Campbell , xen-devel , Keir Fraser , Ian Jackson List-Id: xen-devel@lists.xenproject.org At 14:42 +0000 on 25 Feb (1424871753), Jan Beulich wrote: > Non-anonymous allocations with this flag set should - for the purpose > of the availability check - be treated just like anonymous ones, as > they wouldn't lead to a reduction of ->outstanding_pages. > > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -617,7 +617,8 @@ static struct page_info *alloc_heap_page > */ > if ( (outstanding_claims + request > > total_avail_pages + tmem_freeable_pages()) && > - (d == NULL || d->outstanding_pages < request) ) > + ((memflags & MEMF_no_refcount) || > + !d || d->outstanding_pages < request) ) > goto not_found; > > /* >