linux/include
Marcelo Tosatti ff8bba4038 KVM: use simple waitqueue for vcpu->wq
The problem:

On -RT, an emulated LAPIC timer instances has the following path:

1) hard interrupt
2) ksoftirqd is scheduled
3) ksoftirqd wakes up vcpu thread
4) vcpu thread is scheduled

This extra context switch introduces unnecessary latency in the
LAPIC path for a KVM guest.

The solution:

Allow waking up vcpu thread from hardirq context,
thus avoiding the need for ksoftirqd to be scheduled.

Normal waitqueues make use of spinlocks, which on -RT
are sleepable locks. Therefore, waking up a waitqueue
waiter involves locking a sleeping lock, which
is not allowed from hard interrupt context.

cyclictest command line:

This patch reduces the average latency in my tests from 14us to 11us.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2020-10-14 00:59:25 +03:00
..
acpi acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t 2020-10-14 00:59:20 +03:00
asm-generic bug: BUG_ON/WARN_ON variants dependend on RT/!RT 2020-10-14 00:59:10 +03:00
clocksource
crypto crypto: scatterwalk - Use sg_chain_ptr on chain entries 2013-12-09 19:58:52 +08:00
drm drm/radeon: add new bonaire pci id 2015-06-06 08:19:39 -07:00
dt-bindings pinctrl: dra: dt-bindings: Fix output pull up/down 2014-11-21 09:23:02 -08:00
keys
kvm ARM: KVM: fix non-VGIC compilation 2014-03-06 09:47:42 +01:00
linux KVM: use simple waitqueue for vcpu->wq 2020-10-14 00:59:25 +03:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media media: vb2: fix VBI/poll regression 2014-10-09 12:21:27 -07:00
memory
misc
net seqlock: Prevent rt starvation 2020-10-14 00:59:21 +03:00
pcmcia
ras
rdma IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler 2014-05-06 07:59:28 -07:00
rxrpc
scsi scsi: do not issue SCSI RSOC command to Promise Vtrak E610f 2014-09-17 09:19:14 -07:00
sound ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE 2015-05-13 05:16:56 -07:00
target target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling 2015-05-06 21:59:17 +02:00
trace latency-hist.patch 2020-10-14 00:59:10 +03:00
uapi in6: fix conflict with glibc 2015-01-27 08:18:53 -08:00
video video: pxa168fb: Cleanup pxa168fb.h file 2014-01-17 10:57:43 +02:00
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-06-06 08:19:32 -07:00
Kbuild