diff options
author | Olaf Hering <olaf@aepfle.de> | 2011-11-20 17:02:50 +0100 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2011-11-20 17:02:50 +0100 |
commit | c9e6b36d433e949e7e18b90b02db8449f84a0b68 (patch) | |
tree | 0303f9bbe473039c61b98bb8ca53560ad83ebdd4 /tools/xenpaging/policy.h | |
parent | 6ca25a68ea914dd9c53d837db6d2f54ee823ca4d (diff) | |
download | xen-c9e6b36d433e949e7e18b90b02db8449f84a0b68.tar.gz xen-c9e6b36d433e949e7e18b90b02db8449f84a0b68.tar.bz2 xen-c9e6b36d433e949e7e18b90b02db8449f84a0b68.zip |
xenpaging: improve policy mru list handling
Without this change it is not possible to page-out all guest pages, then
trigger a page-in for all pages, and then page-out everything once
again. All pages in the mru list can not be paged out because they
remain active in the internal bitmap of paged pages.
Use the mru list only if the number of paged-out pages is larger than
the mru list. If the number is smaller, start to clear the mru list. In
case the number of paged-out pages drops to zero the mru list and the
internal bitmap will be empty as well.
Also add a new interface for dropped pages. If a gfn was dropped there
is no need to adjust the mru list because dropping a page is not usage
of a page.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/xenpaging/policy.h')
-rw-r--r-- | tools/xenpaging/policy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/xenpaging/policy.h b/tools/xenpaging/policy.h index 18a92569ca..458ed27ce5 100644 --- a/tools/xenpaging/policy.h +++ b/tools/xenpaging/policy.h @@ -32,6 +32,8 @@ int policy_init(xenpaging_t *paging); int policy_choose_victim(xenpaging_t *paging, xenpaging_victim_t *victim); void policy_notify_paged_out(unsigned long gfn); void policy_notify_paged_in(unsigned long gfn); +void policy_notify_paged_in_nomru(unsigned long gfn); +void policy_notify_dropped(unsigned long gfn); #endif // __XEN_PAGING_POLICY_H__ |