xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 1 Mar 2011 21:26:10 +0000 (16:26 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 14 Apr 2011 22:26:23 +0000 (18:26 -0400)
commit464fb419e17083a18b636c9f4714fc49ef6857d2
treed7465d607fc9fffb9ec91bc9c97106ea401c33d1
parentc35950bfa9abaaf16548a287a8d5d782a361414f
xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages.

Previously we would allocate the array for page using 'kmalloc' which
we can as easily do with 'vzalloc'. The pre-allocation of pages
was done a bit differently in the past - it used to be that
the balloon driver would export "alloc_empty_pages_and_pagevec"
which would have in one function created an array, allocated
the pages, balloned the pages out (so the memory behind those
pages would be non-present), and provide us those pages.

This was OK as those pages were shared between other guest and
the only thing we needed was to "swizzel" the MFN of those pages
to point to the other guest MFN. We can still "swizzel" the MFNs
using the M2P (and P2M) override API calls, but for the sake of
simplicity we are dropping the balloon API calls. We can return
to those later on.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/blkback/blkback.c