Wanpeng Li
89340d0935
Revert "locking/pvqspinlock: Don't wait if vCPU is preempted"
...
This patch reverts commit 75437bb304 (locking/pvqspinlock: Don't
wait if vCPU is preempted). A large performance regression was caused
by this commit. on over-subscription scenarios.
The test was run on a Xeon Skylake box, 2 sockets, 40 cores, 80 threads,
with three VMs of 80 vCPUs each. The score of ebizzy -M is reduced from
13000-14000 records/s to 1700-1800 records/s:
Host Guest score
vanilla w/o kvm optimizations upstream 1700-1800 records/s
vanilla w/o kvm optimizations revert 13000-14000 records/s
vanilla w/ kvm optimizations upstream 4500-5000 records/s
vanilla w/ kvm optimizations revert 14000-15500 records/s
Exit from aggressive wait-early mechanism can result in premature yield
and extra scheduling latency.
Actually, only 6% of wait_early events are caused by vcpu_is_preempted()
being true. However, when one vCPU voluntarily releases its vCPU, all
the subsequently waiters in the queue will do the same and the cascading
effect leads to bad performance.
kvm optimizations:
[1] commit d73eb57b80 (KVM: Boost vCPUs that are delivering interrupts)
[2] commit 266e85a5ec (KVM: X86: Boost queue head vCPU to mitigate lock waiter preemption)
Tested-by: loobinliu@tencent.com
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: loobinliu@tencent.com
Cc: stable@vger.kernel.org
Fixes: 75437bb304 (locking/pvqspinlock: Don't wait if vCPU is preempted)
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-09-25 10:22:37 +02:00
..
bpf
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
2019-09-16 16:02:03 +02:00
cgroup
Merge branch 'for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
2019-09-17 15:57:22 -07:00
configs
debug
kgdb: fix comment regarding static function
2019-09-03 11:19:41 +01:00
dma
powerpc updates for 5.4
2019-09-20 11:48:06 -07:00
events
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2019-09-17 12:35:15 -07:00
gcov
um: Enable CONFIG_CONSTRUCTORS
2019-09-15 21:37:13 +02:00
irq
Power management updates for 5.4-rc1
2019-09-17 19:15:14 -07:00
livepatch
livepatch: Nullify obj->mod in klp_module_coming()'s error path
2019-08-19 13:03:37 +02:00
locking
Revert "locking/pvqspinlock: Don't wait if vCPU is preempted"
2019-09-25 10:22:37 +02:00
power
Merge branches 'pm-opp', 'pm-qos', 'acpi-pm', 'pm-domains' and 'pm-tools'
2019-09-17 09:49:19 +02:00
printk
Merge branch 'for-5.4' into for-linus
2019-09-16 12:54:25 +02:00
rcu
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2019-09-16 17:25:49 -07:00
sched
hmm related patches for 5.4
2019-09-21 10:07:42 -07:00
time
Power management updates for 5.4-rc1
2019-09-17 19:15:14 -07:00
trace
powerpc updates for 5.4
2019-09-20 11:48:06 -07:00
.gitignore
acct.c
async.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
audit.c
audit/stable-5.3 PR 20190702
2019-07-08 18:55:42 -07:00
audit.h
audit/stable-5.3 PR 20190702
2019-07-08 18:55:42 -07:00
audit_fsnotify.c
audit_tree.c
audit_watch.c
auditfilter.c
audit/stable-5.3 PR 20190702
2019-07-08 18:55:42 -07:00
auditsc.c
backtracetest.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
bounds.c
capability.c
compat.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
configs.c
kernel/configs: Replace GPL boilerplate code with SPDX identifier
2019-07-30 18:34:15 +02:00
context_tracking.c
cpu.c
cpu/SMT: create and export cpu_smt_possible()
2019-09-24 13:37:28 +02:00
cpu_pm.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282
2019-06-05 17:36:37 +02:00
crash_core.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230
2019-06-19 17:09:06 +02:00
crash_dump.c
cred.c
Merge branch 'access-creds'
2019-07-25 08:36:29 -07:00
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c
core-process-v5.4
2019-09-16 09:28:19 -07:00
extable.c
extable: Add function to search only kernel exception table
2019-08-21 22:23:48 +10:00
fail_function.c
fail_function: no need to check return value of debugfs_create functions
2019-06-03 15:49:06 +02:00
fork.c
hmm related patches for 5.4
2019-09-21 10:07:42 -07:00
freezer.c
futex.c
hrtimer/treewide: Use hrtimer_sleeper_start_expires()
2019-08-01 17:43:16 +02:00
gen_kheaders.sh
kheaders: include only headers into kheaders_data.tar.xz
2019-07-09 10:10:52 +09:00
groups.c
hung_task.c
iomem.c
mm/nvdimm: add is_ioremap_addr and use that to check ioremap address
2019-07-12 11:05:40 -07:00
irq_work.c
jump_label.c
jump_label: Don't warn on __exit jump entries
2019-08-29 15:10:10 +01:00
kallsyms.c
kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol
2019-08-27 16:19:56 +01:00
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
sched/rt, Kconfig: Unbreak def/oldconfig with CONFIG_PREEMPT=y
2019-07-22 18:05:11 +02:00
kcov.c
kexec.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230
2019-06-19 17:09:06 +02:00
kexec_core.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230
2019-06-19 17:09:06 +02:00
kexec_elf.c
kexec_elf: support 32 bit ELF files
2019-09-06 23:58:44 +02:00
kexec_file.c
Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
2019-07-08 20:28:59 -07:00
kexec_internal.h
kheaders.c
kmod.c
kprobes.c
Tracing updates:
2019-09-20 11:19:48 -07:00
ksysfs.c
kthread.c
latencytop.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
Makefile
Kbuild updates for v5.4
2019-09-20 08:36:47 -07:00
module-internal.h
module.c
module: remove unneeded casts in cmp_name()
2019-09-11 21:41:56 +02:00
module_signing.c
notifier.c
nsproxy.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
padata.c
padata: remove cpu_index from the parallel_queue
2019-09-13 21:15:41 +10:00
panic.c
docs: admin-guide: move sysctl directory to it
2019-07-15 11:03:01 -03:00
params.c
pid.c
kernel/pid.c: convert struct pid count to refcount_t
2019-07-16 19:23:24 -07:00
pid_namespace.c
proc/sysctl: add shared variables for range check
2019-07-18 17:08:07 -07:00
profile.c
ptrace.c
ptrace: add PTRACE_GET_SYSCALL_INFO request
2019-07-16 19:23:24 -07:00
range.c
reboot.c
relay.c
resource.c
resource: add a not device managed request_free_mem_region variant
2019-08-20 09:39:41 -03:00
rseq.c
seccomp.c
signal.c
core-process-v5.4
2019-09-16 09:28:19 -07:00
smp.c
smp: Warn on function calls from softirq context
2019-07-20 11:27:16 +02:00
smpboot.c
smpboot.h
softirq.c
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2019-07-08 11:01:13 -07:00
stackleak.c
stacktrace.c
stacktrace: Constify 'entries' arguments
2019-07-25 15:43:26 +02:00
stop_machine.c
stop_machine: Fix stop_cpus_in_progress ordering
2019-08-08 09:09:30 +02:00
sys.c
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2019-09-17 12:35:15 -07:00
sys_ni.c
arch: handle arches who do not yet define clone3
2019-06-21 01:54:53 +02:00
sysctl.c
proc/sysctl: add shared variables for range check
2019-07-18 17:08:07 -07:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
torture: Remove exporting of internal functions
2019-08-01 14:30:22 -07:00
tracepoint.c
The main changes in this release include:
2019-07-18 11:51:00 -07:00
tsacct.c
ucount.c
proc/sysctl: add shared variables for range check
2019-07-18 17:08:07 -07:00
uid16.c
uid16.h
umh.c
up.c
smp: Remove smp_call_function() and on_each_cpu() return values
2019-06-23 14:26:26 +02:00
user-return-notifier.c
user.c
Keyrings namespacing
2019-07-08 19:36:47 -07:00
user_namespace.c
Keyrings namespacing
2019-07-08 19:36:47 -07:00
utsname.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
utsname_sysctl.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
watchdog.c
watchdog: Mark watchdog_hrtimer to expire in hard interrupt context
2019-08-01 20:51:20 +02:00
watchdog_hld.c
workqueue.c
workqueue: require CPU hotplug read exclusion for apply_workqueue_attrs
2019-09-13 21:15:40 +10:00
workqueue_internal.h