From: Dave McCracken <dcm@mccr.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] linux/balloon: prefer using pages from balloon in alloc_empty_pages_and_pagevec()
Date: Thu, 17 Dec 2009 14:33:04 -0600 [thread overview]
Message-ID: <200912171433.04459.dcm@mccr.org> (raw)
In-Reply-To: <4B290BA3020000780002648D@vpn.id2.novell.com>
On Wednesday 16 December 2009, Jan Beulich wrote:
> ... 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).
You are correct. The endpoint of the main loops should be npages, as should
the variable used in the kmalloc().
I could only allocate the pagevec to be nr_pages and just fill it in with the
partial order 9 page rather than rounding it up. I'll ponder that.
I don't see anything wrong with the error path. It correctly walks back down
the pagevec and frees all the pages it's allocated so far.
Dave McCracken
Oracle Corp.
next prev parent reply other threads:[~2009-12-17 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 15:13 [PATCH] linux/balloon: prefer using pages from balloon in alloc_empty_pages_and_pagevec() Jan Beulich
2009-12-16 15:32 ` Jan Beulich
2009-12-17 20:33 ` Dave McCracken [this message]
2009-12-18 7:52 ` Jan Beulich
2009-12-18 14:32 ` Dave McCracken
2009-12-18 15:01 ` Jan Beulich
2009-12-18 21:03 ` Dave McCracken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200912171433.04459.dcm@mccr.org \
--to=dcm@mccr.org \
--cc=JBeulich@novell.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.