diff options
author | Olaf Hering <olaf@aepfle.de> | 2012-02-20 21:18:44 +0100 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2012-02-20 21:18:44 +0100 |
commit | f07d3c043793de26b6c385551256e166e2d356ff (patch) | |
tree | 7974053bdeddf8116fd28b5406d0e2d83b285c14 /tools/xenpaging/policy_default.c | |
parent | 9245411c958f4c4a1e77e76b2e1fde699a56929e (diff) | |
download | xen-f07d3c043793de26b6c385551256e166e2d356ff.tar.gz xen-f07d3c043793de26b6c385551256e166e2d356ff.tar.bz2 xen-f07d3c043793de26b6c385551256e166e2d356ff.zip |
xenpaging: no poll timeout while page-out is in progress
The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally
before doing any work. This function calls poll() with a timeout of 100ms. As
a result the page-out process is very slow due to the delay in poll().
Call poll() without timeout so that it returns immediately until the page-out
is done. Page-out is done when either the policy finds no more pages to
nominate or when the requested number of pages is reached.
The condition is cleared when a watch event arrives, so that processing the
new target is not delayed once again by poll().
v2:
- no poll timeout also when large number of evicts is pending
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/xenpaging/policy_default.c')
-rw-r--r-- | tools/xenpaging/policy_default.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/xenpaging/policy_default.c b/tools/xenpaging/policy_default.c index 596afc7d9a..7563720092 100644 --- a/tools/xenpaging/policy_default.c +++ b/tools/xenpaging/policy_default.c @@ -90,6 +90,7 @@ unsigned long policy_choose_victim(struct xenpaging *paging) /* Could not nominate any gfn */ if ( wrap == current_gfn ) { + paging->use_poll_timeout = 1; /* Count wrap arounds */ unconsumed_cleared++; /* Force retry every few seconds (depends on poll() timeout) */ |