x86/domctl: have XEN_DOMCTL_getpageframeinfo3 preemptible
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 11 Dec 2019 14:26:34 +0000 (15:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Dec 2019 14:26:34 +0000 (15:26 +0100)
commit6a4006708f47ec6f5c4ae78fb344c2e5be66e78a
treef087b3386ed6ede16fba46feb174b6279fcc04ed
parenta700446b70965d03b120cf4391b19d7357710335
x86/domctl: have XEN_DOMCTL_getpageframeinfo3 preemptible

This hypercall can take a long time to finish because it attempts to
grab the `hostp2m' lock up to 1024 times. The accumulated wait for the
lock can take several seconds.

This can easily happen with a guest with 32 vcpus and plenty of RAM,
during localhost migration.

While the patch doesn't fix the problem with the lock contention and
the fact that the `hostp2m' lock is currently global (and not on a
single page), it is still an improvement to the hypercall. It will in
particular, down the road, allow dropping the arbitrary limit of 1024
entries per request.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: 48599114d3ca24157c25f6684bb9322f6dca12bb
master date: 2019-11-26 14:16:09 +0100
xen/arch/x86/domctl.c
xen/include/public/domctl.h