From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 3/4] xen: separate a function merge_free_trunks from Date: Tue, 17 Jun 2014 13:39:51 +0100 Message-ID: <53A05337020000780001B07C@mail.emea.novell.com> References: <1403005783-30746-1-git-send-email-bob.liu@oracle.com> <1403005783-30746-3-git-send-email-bob.liu@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wwsg8-0005bg-D9 for xen-devel@lists.xenproject.org; Tue, 17 Jun 2014 12:39:56 +0000 In-Reply-To: <1403005783-30746-3-git-send-email-bob.liu@oracle.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: Bob Liu Cc: keir@xen.org, ian.campbell@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 17.06.14 at 13:49, wrote: Truncated subject? > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -827,73 +827,14 @@ static int reserve_offlined_page(struct page_info *head) > return count; > } > > -/* Free 2^@order set of pages. */ > -static void free_heap_pages( > +/* Caller must hold heap lock */ > +static void merge_free_trunks( > struct page_info *pg, unsigned int order, bool_t need_scrub) >>From a purely abstract pov this function shouldn't need a "need_scrub" parameter. > { > - unsigned long mask, mfn = page_to_mfn(pg); > - unsigned int i, node = phys_to_nid(page_to_maddr(pg)), tainted = 0; > + unsigned long mask; > + unsigned int node = phys_to_nid(page_to_maddr(pg)); Instead, the caller already calculated "node", which hence could be passed in. Jan