public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] implement vcpu preempted check
@ 2016-06-26 10:41 Pan Xinhui
  2016-06-26 10:41 ` [PATCH 1/2] kernel/sched: introduce vcpu preempted interface Pan Xinhui
  2016-06-26 10:41 ` [PATCH 2/2] locking/osq: Drop the overload of osq_lock() Pan Xinhui
  0 siblings, 2 replies; 6+ messages in thread
From: Pan Xinhui @ 2016-06-26 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, boqun.feng, Pan Xinhui

This is to fix some bad issues on an over-commited guest.

test-caes:
perf record -a perf bench sched messaging -g 400 -p && perf report

18.09%  sched-messaging  [kernel.vmlinux]  [k] osq_lock
12.28%  sched-messaging  [kernel.vmlinux]  [k] rwsem_spin_on_owner
 5.27%  sched-messaging  [kernel.vmlinux]  [k] mutex_unlock
 3.89%  sched-messaging  [kernel.vmlinux]  [k] wait_consider_task
 3.64%  sched-messaging  [kernel.vmlinux]  [k] _raw_write_lock_irq
 3.41%  sched-messaging  [kernel.vmlinux]  [k] mutex_spin_on_owner.is
 2.49%  sched-messaging  [kernel.vmlinux]  [k] system_call

osq takes a long time with preemption disabled which is really bad.

This is because vCPU A hold the osq lock and yield out, vCPU B wait
per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and
unlock the osq lock. Even there is need_resched(), it did not help on
such scenario.

we may also need fix other XXX_spin_on_owner later based on this patch set.
these spin_on_onwer variant cause rcu stall.

Pan Xinhui (1):
  locking/osq: Drop the overload of osq_lock()

pan xinhui (1):
  kernel/sched: introduce vcpu preempted interface

 include/linux/sched.h     | 34 ++++++++++++++++++++++++++++++++++
 kernel/locking/osq_lock.c | 18 +++++++++++++++---
 2 files changed, 49 insertions(+), 3 deletions(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-27  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-26 10:41 [PATCH 0/2] implement vcpu preempted check Pan Xinhui
2016-06-26 10:41 ` [PATCH 1/2] kernel/sched: introduce vcpu preempted interface Pan Xinhui
2016-06-27  8:42   ` Peter Zijlstra
2016-06-27  9:42     ` xinhui
2016-06-26 10:41 ` [PATCH 2/2] locking/osq: Drop the overload of osq_lock() Pan Xinhui
2016-06-26  7:12   ` panxinhui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox