]> xenbits.xensource.com Git - xen.git/commit
Use memops for mem paging, sharing, and access, instead of domctls
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Fri, 10 Feb 2012 16:07:07 +0000 (16:07 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Fri, 10 Feb 2012 16:07:07 +0000 (16:07 +0000)
commit59a36d66a5d50a66f8a629b334a0cbd7af360f80
treeeb7a565b5e32cc6542dbf49205e26d9772dc46b9
parent2da4c17b3b76d190da3dda35aa24910ff69984e5
Use memops for mem paging, sharing, and access, instead of domctls

Per page operations in the paging, sharing, and access tracking subsystems are
all implemented with domctls (e.g. a domctl to evict one page, or to share one
page).

Under heavy load, the domctl path reveals a lack of scalability. The domctl
lock serializes dom0's vcpus in the hypervisor. When performing thousands of
per-page operations on dozens of domains, these vcpus will spin in the
hypervisor. Beyond the aggressive locking, an added inefficiency of blocking
vcpus in the domctl lock is that dom0 is prevented from re-scheduling any of
its other work-starved processes.

We retain the domctl interface for setting up and tearing down
paging/sharing/mem access for a domain. But we migrate all the per page
operations to use the memory_op hypercalls (e.g XENMEM_*).

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
20 files changed:
tools/libxc/xc_mem_access.c
tools/libxc/xc_mem_event.c
tools/libxc/xc_mem_paging.c
tools/libxc/xc_memshr.c
tools/libxc/xenctrl.h
tools/memshr/interface.c
tools/tests/mem-sharing/memshrtool.c
xen/arch/x86/domctl.c
xen/arch/x86/mm/mem_access.c
xen/arch/x86/mm/mem_event.c
xen/arch/x86/mm/mem_paging.c
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/x86_64/compat/mm.c
xen/arch/x86/x86_64/mm.c
xen/include/asm-x86/mem_access.h
xen/include/asm-x86/mem_event.h
xen/include/asm-x86/mem_paging.h
xen/include/asm-x86/mem_sharing.h
xen/include/public/domctl.h
xen/include/public/memory.h