]> xenbits.xensource.com Git - xen.git/commit
xenpaging: no poll timeout while page-out is in progress
authorOlaf Hering <olaf@aepfle.de>
Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)
committerOlaf Hering <olaf@aepfle.de>
Mon, 20 Feb 2012 20:18:44 +0000 (21:18 +0100)
commitf07d3c043793de26b6c385551256e166e2d356ff
tree7974053bdeddf8116fd28b5406d0e2d83b285c14
parent9245411c958f4c4a1e77e76b2e1fde699a56929e
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>
tools/xenpaging/policy_default.c
tools/xenpaging/xenpaging.c
tools/xenpaging/xenpaging.h