kernel_optimize_test/drivers/xen
David Vrabel 8620015499 xen/evtchn: dynamically grow pending event channel ring
If more than 1024 event channels are bound to a evtchn device then it
possible (even with well behaved applications) for the ring to
overflow and events to be lost (reported as an -EFBIG error).

Dynamically increase the size of the ring so there is always enough
space for all bound events.  Well behaved applicables that only unmask
events after draining them from the ring can thus no longer lose
events.

However, an application could unmask an event before draining it,
allowing multiple entries per port to accumulate in the ring, and a
overflow could still occur.  So the overflow detection and reporting
is retained.

The ring size is initially only 64 entries so the common use case of
an application only binding a few events will use less memory than
before.  The ring size may grow to 512 KiB (enough for all 2^17
possible channels).  This order 7 kmalloc() may fail due to memory
fragmentation, so we fall back to trying vmalloc().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-11-26 18:49:54 +00:00
..
events xen/events: Always allocate legacy interrupts on PV guests 2015-11-26 18:05:01 +00:00
xen-pciback
xenbus xenbus: Support multiple grants ring with 64KB 2015-10-23 14:20:47 +01:00
xenfs
acpi.c
balloon.c xen/balloon: Use the correct sizeof when declaring frame_list 2015-10-23 14:20:44 +01:00
biomerge.c xen/biomerge: Don't allow biovec's to be merged when Linux is not using 4KB pages 2015-10-23 14:20:36 +01:00
cpu_hotplug.c xen, cpu_hotplug: call device_offline instead of cpu_down 2015-10-23 14:20:48 +01:00
dbgp.c
efi.c
evtchn.c xen/evtchn: dynamically grow pending event channel ring 2015-11-26 18:49:54 +00:00
fallback.c
features.c
gntalloc.c
gntdev.c xen/gntdev: Grant maps should not be subject to NUMA balancing 2015-11-26 17:47:35 +00:00
grant-table.c xen/grant-table: Add an helper to iterate over a specific number of grants 2015-10-23 14:20:46 +01:00
Kconfig
Makefile xen/arm: Enable cpu_hotplug.c 2015-10-23 14:20:47 +01:00
manage.c
mcelog.c
pci.c
pcpu.c
platform-pci.c
preempt.c
privcmd.c xen/privcmd: Add support for Linux 64KB page granularity 2015-10-23 14:20:42 +01:00
privcmd.h
swiotlb-xen.c xen/swiotlb: Add support for 64KB page granularity 2015-10-23 14:20:43 +01:00
sys-hypervisor.c
tmem.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-scsiback.c
xen-selfballoon.c
xen-stub.c
xlate_mmu.c xen/privcmd: Add support for Linux 64KB page granularity 2015-10-23 14:20:42 +01:00