• K
    xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages. · 464fb419
    Konrad Rzeszutek Wilk 提交于
    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: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    464fb419
blkback.c 18.3 KB