]> xenbits.xensource.com Git - xen.git/commit
Global virq for low memory situations
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 1 Mar 2012 16:40:45 +0000 (16:40 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 1 Mar 2012 16:40:45 +0000 (16:40 +0000)
commit9f06a2e65888fc0972c977f3f951f41c3d17f22b
tree798c44843a9a024d9d470d26bae6d7a8aa882b50
parente09b7cbbdc5675d5237be5cd46fbcc55ffa64a4d
Global virq for low memory situations

When a low memory threshold on the Xen heap is reached, we fire a
global dom0 virq. If someone's listening, they can free up some more
memory.

The low threshold is configurable via the command line token
'low_mem_virq_limit", and defaults to 64MiB. If the user specifies
zero via the command line, the virq is disabled.

We define a new virq VIRQ_ENOMEM. Potential listeners include
squeezed, xenballoond, or anything else that can be fired through
xencommons.

We error-check the low mem virq against initial available heap (after
dom0 allocation), to avoid firing immediately.

Virq issuing is controlled by a hysteresis algorithm: when memory dips
below a threshold, the virq is issued and the next virq will fire when
memory shrinks another order of magnitude. The virq will not fire
again in the current "band" until memory grows over the next higher
order of magnitude.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/page_alloc.c
xen/include/public/xen.h