]> xenbits.xensource.com Git - xen.git/commit
x86/mm: Allow to not sleep on mem event ring
authorTim Deegan <tim@xen.org>
Thu, 15 Mar 2012 11:12:44 +0000 (11:12 +0000)
committerTim Deegan <tim@xen.org>
Thu, 15 Mar 2012 11:12:44 +0000 (11:12 +0000)
commit9ccfacd4706c785434848b9b31701945eceefe0f
tree60ca58921129a43009e290427525f647a8dcb3a9
parentc1e3e15c585f2dc4c9d66516acd1cd0c75c7aeee
x86/mm: Allow to not sleep on mem event ring

Under extreme congestion conditions, generating a mem event may put the vcpu to
sleep on a wait queue if the ring is full. This is generally desirable, although
fairly convoluted to work with, since sleeping on a wait queue requires a
non-atomic context (i.e. no locks held).

Introduce an allow_sleep flag to make this optional. The default API remains
such that all current callers set allow_sleep to true and thus will sleep if
necessary.

The end-use is for cases in which loss of guest mem events is tolerable. One
such consumer to be added later is the unsharing code under ENOMEM conditions.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/mem_event.c
xen/include/asm-x86/mem_event.h