linux-stable/drivers/xen
Demi Marie Obenour c76d96c555 xen: speed up grant-table reclaim
commit c04e989484 upstream.

When a grant entry is still in use by the remote domain, Linux must put
it on a deferred list.  Normally, this list is very short, because
the PV network and block protocols expect the backend to unmap the grant
first.  However, Qubes OS's GUI protocol is subject to the constraints
of the X Window System, and as such winds up with the frontend unmapping
the window first.  As a result, the list can grow very large, resulting
in a massive memory leak and eventual VM freeze.

To partially solve this problem, make the number of entries that the VM
will attempt to free at each iteration tunable.  The default is still
10, but it can be overridden via a module parameter.

This is Cc: stable because (when combined with appropriate userspace
changes) it fixes a severe performance and stability problem for Qubes
OS users.

Cc: stable@vger.kernel.org
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20230726165354.1252-1-demi@invisiblethingslab.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-03 10:26:09 +02:00
..
events
xen-pciback xen/pciback: don't call pcistub_device_put() under lock 2023-04-24 07:27:10 +02:00
xenbus xenbus: check xen_domain in xenbus_probe_initcall 2023-08-03 10:25:58 +02:00
xenfs xen: remove unnecessary (void*) conversions 2023-03-16 12:04:00 +01:00
acpi.c
arm-device.c
balloon.c xen: simplify sysctl registration for balloon 2023-04-13 11:49:20 -07:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c
grant-dma-iommu.c
grant-dma-ops.c xen/virtio: Fix NULL deref when a bridge of PCI root bus has no parent 2023-07-23 13:53:36 +02:00
grant-table.c xen: speed up grant-table reclaim 2023-08-03 10:26:09 +02:00
Kconfig
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-03-22 19:36:31 +01:00
platform-pci.c
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-24 17:25:43 +02:00
pvcalls-front.c xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock 2023-04-24 07:27:10 +02:00
pvcalls-front.h
swiotlb-xen.c
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c xen: branch for v6.4-rc1 2023-04-27 17:27:06 -07:00
xlate_mmu.c