From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] linux/balloon: prefer using pages from balloon in alloc_empty_pages_and_pagevec() Date: Wed, 16 Dec 2009 15:32:35 +0000 Message-ID: <4B290BA3020000780002648D@vpn.id2.novell.com> References: <4B2907320200007800026472@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4B2907320200007800026472@vpn.id2.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dave.mccracken@oracle.com Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> "Jan Beulich" 16.12.09 16:13 >>> >Likely also something that could be done in the pv-ops tree (though it >would need some adjustment to deal with the balloon_order!=3D0 case). ... which seems to be broken at present anyway: The main loops in {alloc,free}_empty_pages_and_pagevec() both did not get their upper bound updated correctly (should be npages, but was left to be nr_pages), for alloc_empty_pages_and_pagevec() the wrong value is also being used to allocate pagevec[] (though I really think that this shouldn't allocate more than a nr_pages vector to avoid a rather large but unnecessary kmalloc() when nr_pages is small), and in its error path only a single page gets freed (rather than the whole balloon_order chunk). Jan