public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v1)
@ 2013-09-07 13:46 Konrad Rzeszutek Wilk
  2013-09-07 13:46 ` [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon under PVHVM Konrad Rzeszutek Wilk
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-09-07 13:46 UTC (permalink / raw)
  To: linux-kernel, xen-devel, boris.ostrovsky, david.vrabel,
	stefan.bader, stefano.stabellini, jeremy

After a bit of false starts, lots of debugging, and tons of help from Stefano and
David on how event mechanism is suppose to work I am happy to present a set
of bug-fixes that make PV ticketlocks work under Xen PVHVM with Linux v3.12.

v3.12 has now thanks to commit 816434ec4a674fcdb3c2221a6dffdc8f34020550
(Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
PV ticketlocks. That means:
 - Xen PV bytelock has been replaced by Xen PV ticketlock.
 - Xen PVHVM is using ticketlock (not PV variant) - this patch makes it PV.
 - baremetal is still using ticketlocks.

In other words everything in the kernel is ticketlock based with the virtualizations
having the 'PV' part to aid.

Please take a look at the patches. If you are interested in testing them
out I will post a git tree on Monday based on v3.11 and v3.12-rc0. 

Note that I had not run any performance tests and I am not sure when I will
be able to (got other bugs to squash now). I've asked our internal performance
engineer to do some benchmarking - but those results won't be available for
some time as it takes time to do good benchmarking.

 arch/x86/xen/enlighten.c |    1 -
 arch/x86/xen/smp.c       |   17 +++++++++++++++++
 arch/x86/xen/spinlock.c  |   45 ++++++++-------------------------------------
 3 files changed, 25 insertions(+), 38 deletions(-)

(oh neat, more deletions!) 

Konrad Rzeszutek Wilk (5):
      xen/spinlock: Fix locking path engaging too soon under PVHVM.
      xen/spinlock: We don't need the old structure anymore
      xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM
      xen/spinlock: Don't setup xen spinlock IPI kicker if disabled.
      Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM"


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH]  Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v2)
@ 2013-09-09 15:11 Konrad Rzeszutek Wilk
  2013-09-09 15:11 ` [PATCH 4/5] xen/spinlock: Don't setup xen spinlock IPI kicker if disabled Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-09-09 15:11 UTC (permalink / raw)
  To: linux-kernel, xen-devel, boris.ostrovsky, david.vrabel,
	stefan.bader, stefano.stabellini, jeremy

Changelog since v1 (see https://lkml.org/lkml/2013/9/7/78)
 - Added Reviewed-by tag.
 - Fleshed out description of patches
 - Ran some perf
 - Used xen_smp_prepare_boot_cpu instead of xen_hvm_smp_init

After a bit of false starts, lots of debugging, and tons of help from Stefano and
David on how event mechanism is suppose to work I am happy to present a set
of bug-fixes that make PV ticketlocks work under Xen PVHVM with Linux v3.12.

v3.12 has now thanks to commit 816434ec4a674fcdb3c2221a6dffdc8f34020550
(Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
PV ticketlocks. That means:
 - Xen PV bytelock has been replaced by Xen PV ticketlock.
 - Xen PVHVM is using ticketlock (not PV variant) - this patch makes it PV.
 - baremetal is still using ticketlocks.

In other words everything in the kernel is ticketlock based with the virtualizations
having the 'PV' part to aid.

Please take a look at the patches. They are also available as a git tree
under:

 git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/pvticketlock.v7.1

I had run some light performance tests with two guests - each over subscribed by
2:1 and running a spinlock_hog wherein each CPU tries to get a lock. The machine
is a 4 CPU Intel, and each guest is running with 8 VCPUs.

It is not a perfect test-case - for that I have asked our internal performance
engineer to test it out with various workloads and guests.

However it does demonstrate that these patches do work and they do not
incur any performance regressions (and yes, they do show a performance
improvement).

 arch/x86/xen/enlighten.c |  1 -
 arch/x86/xen/smp.c       | 28 +++++++++++++++++++++++-----
 arch/x86/xen/spinlock.c  | 45 ++++++++-------------------------------------
 3 files changed, 31 insertions(+), 43 deletions(-)

Konrad Rzeszutek Wilk (5):
      xen/spinlock: Fix locking path engaging too soon under PVHVM.
      xen/spinlock: We don't need the old structure anymore
      xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM
      xen/spinlock: Don't setup xen spinlock IPI kicker if disabled.
      Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM"


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

end of thread, other threads:[~2013-09-09 15:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-07 13:46 [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v1) Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon under PVHVM Konrad Rzeszutek Wilk
2013-09-09 10:31   ` David Vrabel
2013-09-09 13:06     ` Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 2/5] xen/spinlock: We don't need the old structure anymore Konrad Rzeszutek Wilk
2013-09-09 10:18   ` David Vrabel
2013-09-09 10:36   ` Ramkumar Ramachandra
2013-09-07 13:46 ` [PATCH 3/5] xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM Konrad Rzeszutek Wilk
2013-09-09 10:31   ` David Vrabel
2013-09-09 13:11     ` Konrad Rzeszutek Wilk
2013-09-07 13:46 ` [PATCH 4/5] xen/spinlock: Don't setup xen spinlock IPI kicker if disabled Konrad Rzeszutek Wilk
2013-09-09 10:34   ` David Vrabel
2013-09-09 11:07   ` Ramkumar Ramachandra
2013-09-07 13:46 ` [PATCH 5/5] Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM" Konrad Rzeszutek Wilk
2013-09-09 10:34 ` [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v1) David Vrabel
2013-09-09 13:12   ` [Xen-devel] " Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2013-09-09 15:11 [PATCH] Bug-fixes to enable PV ticketlock to work under Xen PVHVM with Linux v3.12. (v2) Konrad Rzeszutek Wilk
2013-09-09 15:11 ` [PATCH 4/5] xen/spinlock: Don't setup xen spinlock IPI kicker if disabled Konrad Rzeszutek Wilk

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