• Olaf Hering's avatar
    xenpaging: use flat index for pagefile and page-in requests · 3bf345e6
    Olaf Hering authored
    This change is based on an idea by <hongkaixing@huawei.com> and
    <bicky.shi@huawei.com>.
    
    Scanning the victims[] array is time consuming with a large number of
    target pages. Replace the loop to find the slot in the pagefile which
    holds the requested gfn with an index.
    
    Remove the victims array and replace it with a flat array. This array
    holds the gfn for a given slot in the pagefile. Adjust all users of the
    victims array.
    
    Rename variable in main() from i to slot to clearify the meaning.
    
    Update xenpaging_evict_page() to pass a pointer to xen_pfn_t to
    xc_map_foreign_pages().
    
    Update policy_choose_victim() to return either a gfn or INVALID_MFN.
    Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
    Committed-by: Ian Jackson <ian.jackson.citrix.com>
    3bf345e6
Name
Last commit
Last update
buildconfigs Loading commit data...
config Loading commit data...
docs Loading commit data...
extras/mini-os Loading commit data...
scripts Loading commit data...
stubdom Loading commit data...
tools Loading commit data...
unmodified_drivers/linux-2.6 Loading commit data...
xen Loading commit data...
.bk-to-hg Loading commit data...
.gitignore Loading commit data...
.hg-to-bk Loading commit data...
.hgignore Loading commit data...
.hgsigs Loading commit data...
.rootkeys Loading commit data...
COPYING Loading commit data...
Config.mk Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
install.sh Loading commit data...