|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] linux/balloon: prefer using pages from balloon i
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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|