Re: rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-22 Thread Konrad Rzeszutek Wilk
On Sun, Sep 20, 2015 at 09:49:04PM -0700, Andy Lutomirski wrote: > On Fri, Sep 18, 2015 at 12:04 PM, Borislav Petkov wrote: > > On Fri, Sep 18, 2015 at 08:20:46AM -0700, Andy Lutomirski wrote: > >> In any event, Borislav, you must have typed rdmsr_safe for a reason :) > > > >

rdmsr_safe in Linux PV (under Xen) gets an #GP:Re: [Fedora-xen] Running fedora xen on top of KVM?

2015-09-17 Thread Konrad Rzeszutek Wilk
On Wed, Sep 16, 2015 at 06:39:03PM -0400, Cole Robinson wrote: > On 09/16/2015 05:08 PM, Konrad Rzeszutek Wilk wrote: > > On Wed, Sep 16, 2015 at 05:04:31PM -0400, Cole Robinson wrote: > >> On 09/16/2015 04:07 PM, M A Young wrote: > >>> On Wed, 16

Re: [PATCH 0/9] qspinlock stuff -v15

2015-03-27 Thread Konrad Rzeszutek Wilk
On Thu, Mar 26, 2015 at 09:21:53PM +0100, Peter Zijlstra wrote: On Wed, Mar 25, 2015 at 03:47:39PM -0400, Konrad Rzeszutek Wilk wrote: Ah nice. That could be spun out as a seperate patch to optimize the existing ticket locks I presume. Yes I suppose we can do something similar

Re: [PATCH 0/9] qspinlock stuff -v15

2015-03-25 Thread Konrad Rzeszutek Wilk
On Mon, Mar 16, 2015 at 02:16:13PM +0100, Peter Zijlstra wrote: Hi Waiman, As promised; here is the paravirt stuff I did during the trip to BOS last week. All the !paravirt patches are more or less the same as before (the only real change is the copyright lines in the first patch).

Re: [Xen-devel] [PATCH v3 0/2] x86/arm64: add xenconfig

2015-02-25 Thread Konrad Rzeszutek Wilk
On Wed, Feb 25, 2015 at 01:11:04PM -0800, David Rientjes wrote: On Wed, 25 Feb 2015, Luis R. Rodriguez wrote: I am reworking Xen's kconfig stuff right now, so perhaps what is best is for this series to be folded under those changes and I'd submit them as the last series in the changes.

Re: [Xen-devel] [PATCH v3 0/2] x86/arm64: add xenconfig

2015-02-25 Thread Konrad Rzeszutek Wilk
On Wed, Feb 25, 2015 at 01:25:59PM -0800, Luis R. Rodriguez wrote: On Wed, Feb 25, 2015 at 1:19 PM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Wed, Feb 25, 2015 at 01:11:04PM -0800, David Rientjes wrote: On Wed, 25 Feb 2015, Luis R. Rodriguez wrote: I am reworking Xen's

Re: [Xen-devel] [RFC 2/2] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader

2015-01-06 Thread Konrad Rzeszutek Wilk
On Mon, Jan 05, 2015 at 10:56:07AM -0800, Andy Lutomirski wrote: On Mon, Jan 5, 2015 at 7:25 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Dec 22, 2014 at 04:39:57PM -0800, Andy Lutomirski wrote: The pvclock vdso code was too abstracted to understand easily and excessively

Re: [PATCH] x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit

2014-12-08 Thread Konrad Rzeszutek Wilk
. While I'm at it, this removes pv_info setup from kvmclock. That code seems to serve no purpose. Cc: sta...@vger.kernel.org Signed-off-by: Andy Lutomirski l...@amacapital.net Suggested-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/kernel/kvm.c | 9 - arch/x86

Re: Stupid Xen vs KVM question

2014-12-05 Thread Konrad Rzeszutek Wilk
On Fri, Dec 05, 2014 at 08:29:54AM +0100, Paolo Bonzini wrote: On 05/12/2014 03:24, Konrad Rzeszutek Wilk wrote: We could do a simple thing - which is that the paravirt_enabled could have the value 1 for Xen and 2 for KVM. The assembler logic would be inverted and just check for 1. I am

Re: Stupid Xen vs KVM question

2014-12-04 Thread Konrad Rzeszutek Wilk
On Thu, Dec 04, 2014 at 02:59:48PM -0800, Andy Lutomirski wrote: This code in arch/x86/kernel/entry_32.S is wrong: #ifdef CONFIG_PARAVIRT /* * The kernel can't run on a non-flat stack if paravirt mode * is active. Rather than try to fixup the high bits of * ESP, bypass

Re: [PATCH v13 10/11] pvqspinlock, x86: Enable PV qspinlock for KVM

2014-12-02 Thread Konrad Rzeszutek Wilk
On Wed, Oct 29, 2014 at 04:19:10PM -0400, Waiman Long wrote: This patch adds the necessary KVM specific code to allow KVM to support the CPU halting and kicking operations needed by the queue spinlock PV code. Two KVM guests of 20 CPU cores (2 nodes) were created for performance testing in

Re: [PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support

2014-12-01 Thread Konrad Rzeszutek Wilk
On Tue, Nov 25, 2014 at 07:33:58PM -0500, Waiman Long wrote: On 10/27/2014 02:02 PM, Konrad Rzeszutek Wilk wrote: On Mon, Oct 27, 2014 at 01:38:20PM -0400, Waiman Long wrote: My concern is that spin_unlock() can be called in many places, including loadable kernel modules. Can

Re: [PATCH v13 09/11] pvqspinlock, x86: Add para-virtualization support

2014-12-01 Thread Konrad Rzeszutek Wilk
On Wed, Oct 29, 2014 at 04:19:09PM -0400, Waiman Long wrote: This patch adds para-virtualization support to the queue spinlock code base with minimal impact to the native case. There are some minor code changes in the generic qspinlock.c file which should be usable in other architectures. The

Re: [PATCH] x86, microcode: Don't initialize microcode code on paravirt

2014-12-01 Thread Konrad Rzeszutek Wilk
On Mon, Dec 01, 2014 at 04:27:44PM -0500, Boris Ostrovsky wrote: Paravirtual guests are not expected to load microcode into processors and therefore it is not necessary to initialize microcode loading logic. CC-ing the KVM folks since they use the paravirt interface too. In fact, under

Re: [PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support

2014-10-27 Thread Konrad Rzeszutek Wilk
On Mon, Oct 27, 2014 at 01:38:20PM -0400, Waiman Long wrote: On 10/24/2014 04:54 AM, Peter Zijlstra wrote: On Thu, Oct 16, 2014 at 02:10:38PM -0400, Waiman Long wrote: Since enabling paravirt spinlock will disable unlock function inlining, a jump label can be added to the unlock function

Re: [PATCH 3/4] xen-pciback: use pci device flag operation helper function

2014-07-22 Thread Konrad Rzeszutek Wilk
On Wed, Jul 23, 2014 at 12:19:03AM +0800, Ethan Zhao wrote: Use pci device flag operation helper functions when set device to assigned or deassigned state. Signed-off-by: Ethan Zhao ethan.z...@oracle.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/xen-pciback

Re: [PATCH 10/11] qspinlock: Paravirt support

2014-07-15 Thread Konrad Rzeszutek Wilk
On Mon, Jul 07, 2014 at 05:27:34PM +0200, Peter Zijlstra wrote: On Fri, Jun 20, 2014 at 09:46:08AM -0400, Konrad Rzeszutek Wilk wrote: I dug in the code and I have some comments about it, but before I post them I was wondering if you have any plans to run any performance tests against

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-27 Thread Konrad Rzeszutek Wilk
On Mon, Jun 23, 2014 at 06:12:00PM +0200, Peter Zijlstra wrote: On Tue, Jun 17, 2014 at 04:03:29PM -0400, Konrad Rzeszutek Wilk wrote: + new = tail | (val _Q_LOCKED_MASK); + + old = atomic_cmpxchg(lock-val, val, new); + if (old

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-27 Thread Konrad Rzeszutek Wilk
On Mon, Jun 23, 2014 at 05:56:50PM +0200, Peter Zijlstra wrote: On Mon, Jun 16, 2014 at 04:49:18PM -0400, Konrad Rzeszutek Wilk wrote: Index: linux-2.6/kernel/locking/mcs_spinlock.h === --- linux-2.6.orig/kernel/locking

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-27 Thread Konrad Rzeszutek Wilk
On Mon, Jun 23, 2014 at 06:26:22PM +0200, Peter Zijlstra wrote: On Tue, Jun 17, 2014 at 04:05:31PM -0400, Konrad Rzeszutek Wilk wrote: + * The basic principle of a queue-based spinlock can best be understood + * by studying a classic queue-based spinlock implementation called the + * MCS

Re: [PATCH 10/11] qspinlock: Paravirt support

2014-06-20 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:07PM +0200, Peter Zijlstra wrote: Add minimal paravirt support. The code aims for minimal impact on the native case. Woot! On the lock side we add one jump label (asm_goto) and 4 paravirt callee saved calls that default to NOPs. The only effects are the

Re: [PATCH 03/11] qspinlock: Add pending bit

2014-06-18 Thread Konrad Rzeszutek Wilk
On Wed, Jun 18, 2014 at 01:29:48PM +0200, Paolo Bonzini wrote: Il 17/06/2014 22:36, Konrad Rzeszutek Wilk ha scritto: +/* One more attempt - but if we fail mark it as pending. */ +if (val == _Q_LOCKED_VAL) { +new = Q_LOCKED_VAL |_Q_PENDING_VAL; + +old

Re: [PATCH 04/11] qspinlock: Extract out the exchange of tail code word

2014-06-18 Thread Konrad Rzeszutek Wilk
On Wed, Jun 18, 2014 at 01:37:45PM +0200, Paolo Bonzini wrote: Il 17/06/2014 22:55, Konrad Rzeszutek Wilk ha scritto: On Sun, Jun 15, 2014 at 02:47:01PM +0200, Peter Zijlstra wrote: From: Waiman Long waiman.l...@hp.com This patch extracts the logic for the exchange of new and previous tail

Re: [PATCH 04/11] qspinlock: Extract out the exchange of tail code word

2014-06-18 Thread Konrad Rzeszutek Wilk
However, I *do* agree with you that it's simpler to just squash this patch into 01/11. Uh, did I say that? Oh I said why don't make it right the first time! I meant in terms of seperating the slowpath (aka the bytelock on the pending bit) from the queue (MCS code). Or renaming the function

Re: [PATCH 09/11] pvqspinlock, x86: Rename paravirt_ticketlocks_enabled

2014-06-18 Thread Konrad Rzeszutek Wilk
Zijlstra pet...@infradead.org Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/include/asm/spinlock.h |4 ++-- arch/x86/kernel/kvm.c|2 +- arch/x86/kernel/paravirt-spinlocks.c |4 ++-- arch/x86/xen/spinlock.c |2 +- 4 files

Re: [PATCH 08/11] qspinlock: Revert to test-and-set on hypervisors

2014-06-18 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:05PM +0200, Peter Zijlstra wrote: When we detect a hypervisor (!paravirt, see later patches), revert to Please spell out the name of the patches. a simple test-and-set lock to avoid the horrors of queue preemption. Heheh. Signed-off-by: Peter Zijlstra

Re: [PATCH 07/11] qspinlock: Use a simple write to grab the lock, if applicable

2014-06-18 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:04PM +0200, Peter Zijlstra wrote: From: Waiman Long waiman.l...@hp.com Currently, atomic_cmpxchg() is used to get the lock. However, this is not really necessary if there is more than one task in the queue and the queue head don't need to reset the queue code

Re: [PATCH 05/11] qspinlock: Optimize for smaller NR_CPUS

2014-06-18 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:02PM +0200, Peter Zijlstra wrote: From: Peter Zijlstra pet...@infradead.org When we allow for a max NR_CPUS 2^14 we can optimize the pending wait-acquire and the xchg_tail() operations. By growing the pending bit to a byte, we reduce the tail to 16bit. This

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-17 Thread Konrad Rzeszutek Wilk
+ new = tail | (val _Q_LOCKED_MASK); + + old = atomic_cmpxchg(lock-val, val, new); + if (old == val) + break; + + val = old; + } + + /* +* we won the trylock; forget about queueing. +*/ + if

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-17 Thread Konrad Rzeszutek Wilk
+ * The basic principle of a queue-based spinlock can best be understood + * by studying a classic queue-based spinlock implementation called the + * MCS lock. The paper below provides a good description for this kind + * of lock. + * + * http://www.cise.ufl.edu/tr/DOC/REP-1992-71.pdf + *

Re: [PATCH 03/11] qspinlock: Add pending bit

2014-06-17 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:00PM +0200, Peter Zijlstra wrote: Because the qspinlock needs to touch a second cacheline; add a pending bit and allow a single in-word spinner before we punt to the second cacheline. Could you add this in the description please: And by second cacheline we mean

Re: [PATCH 04/11] qspinlock: Extract out the exchange of tail code word

2014-06-17 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:47:01PM +0200, Peter Zijlstra wrote: From: Waiman Long waiman.l...@hp.com This patch extracts the logic for the exchange of new and previous tail code words into a new xchg_tail() function which can be optimized in a later patch. And also adds a third try on

Re: [PATCH 03/11] qspinlock: Add pending bit

2014-06-17 Thread Konrad Rzeszutek Wilk
On Tue, Jun 17, 2014 at 04:51:57PM -0400, Waiman Long wrote: On 06/17/2014 04:36 PM, Konrad Rzeszutek Wilk wrote: On Sun, Jun 15, 2014 at 02:47:00PM +0200, Peter Zijlstra wrote: Because the qspinlock needs to touch a second cacheline; add a pending bit and allow a single in-word spinner before

Re: [PATCH v11 14/16] pvqspinlock: Add qspinlock para-virtualization support

2014-06-17 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 03:16:54PM +0200, Peter Zijlstra wrote: On Thu, Jun 12, 2014 at 04:48:41PM -0400, Waiman Long wrote: I don't have a good understanding of the kernel alternatives mechanism. I didn't either; I do now, cost me a whole day reading up on alternative/paravirt code

Re: [PATCH 03/11] qspinlock: Add pending bit

2014-06-17 Thread Konrad Rzeszutek Wilk
On Tue, Jun 17, 2014 at 05:07:29PM -0400, Konrad Rzeszutek Wilk wrote: On Tue, Jun 17, 2014 at 04:51:57PM -0400, Waiman Long wrote: On 06/17/2014 04:36 PM, Konrad Rzeszutek Wilk wrote: On Sun, Jun 15, 2014 at 02:47:00PM +0200, Peter Zijlstra wrote: Because the qspinlock needs to touch

Re: [PATCH 03/11] qspinlock: Add pending bit

2014-06-17 Thread Konrad Rzeszutek Wilk
On Jun 17, 2014 6:25 PM, Waiman Long waiman.l...@hp.com wrote: On 06/17/2014 05:10 PM, Konrad Rzeszutek Wilk wrote: On Tue, Jun 17, 2014 at 05:07:29PM -0400, Konrad Rzeszutek Wilk wrote: On Tue, Jun 17, 2014 at 04:51:57PM -0400, Waiman Long wrote: On 06/17/2014 04:36 PM, Konrad

Re: [PATCH 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-06-16 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:46:58PM +0200, Peter Zijlstra wrote: From: Waiman Long waiman.l...@hp.com This patch introduces a new generic queue spinlock implementation that can serve as an alternative to the default ticket spinlock. Compared with the ticket spinlock, this queue spinlock

Re: [PATCH 00/11] qspinlock with paravirt support

2014-06-16 Thread Konrad Rzeszutek Wilk
On Sun, Jun 15, 2014 at 02:46:57PM +0200, Peter Zijlstra wrote: Since Waiman seems incapable of doing simple things; here's my take on the paravirt crap. The first few patches are taken from Waiman's latest series, but the virt support is completely new. Its primary aim is to not mess up the

Re: [PATCH v2] PCI: Introduce new device binding path using pci_dev.driver_override

2014-05-16 Thread Konrad Rzeszutek Wilk
On Fri, May 16, 2014 at 10:48:00AM -0400, Konrad Rzeszutek Wilk wrote: On Fri, May 9, 2014 at 12:50 PM, Alex Williamson alex.william...@redhat.com wrote: The driver_override field allows us to specify the driver for a device ... ... Signed-off-by: Alex Williamson alex.william

Re: [PATCH v10 00/19] qspinlock: a 4-byte queue spinlock with PV support

2014-05-07 Thread Konrad Rzeszutek Wilk
On Wed, May 07, 2014 at 11:01:28AM -0400, Waiman Long wrote: v9-v10: - Make some minor changes to qspinlock.c to accommodate review feedback. - Change author to PeterZ for 2 of the patches. - Include Raghavendra KT's test results in patch 18. Any chance you can post these on a git tree?

Re: [PATCH v10 18/19] pvqspinlock, x86: Enable PV qspinlock PV for KVM

2014-05-07 Thread Konrad Rzeszutek Wilk
Raghavendra KT had done some performance testing on this patch with the following results: Overall we are seeing good improvement for pv-unfair version. System: 32 cpu sandybridge with HT on (4 node with 32 GB each) Guest : 8GB with 16 vcpu/VM. Average was taken over 8-10 data points.

Re: [PATCH v9 05/19] qspinlock: Optimize for smaller NR_CPUS

2014-04-23 Thread Konrad Rzeszutek Wilk
On Wed, Apr 23, 2014 at 10:23:43AM -0400, Waiman Long wrote: On 04/18/2014 05:40 PM, Waiman Long wrote: On 04/18/2014 03:05 PM, Peter Zijlstra wrote: On Fri, Apr 18, 2014 at 01:52:50PM -0400, Waiman Long wrote: I am confused by your notation. Nah, I think I was confused :-) Make the 1

Re: [PATCH v9 05/19] qspinlock: Optimize for smaller NR_CPUS

2014-04-23 Thread Konrad Rzeszutek Wilk
On Wed, Apr 23, 2014 at 01:43:58PM -0400, Waiman Long wrote: On 04/23/2014 10:56 AM, Konrad Rzeszutek Wilk wrote: On Wed, Apr 23, 2014 at 10:23:43AM -0400, Waiman Long wrote: On 04/18/2014 05:40 PM, Waiman Long wrote: On 04/18/2014 03:05 PM, Peter Zijlstra wrote: On Fri, Apr 18, 2014 at 01:52

Re: [PATCH v9 00/19] qspinlock: a 4-byte queue spinlock with PV support

2014-04-18 Thread Konrad Rzeszutek Wilk
On Thu, Apr 17, 2014 at 09:48:36PM -0400, Waiman Long wrote: On 04/17/2014 01:23 PM, Konrad Rzeszutek Wilk wrote: On Thu, Apr 17, 2014 at 11:03:52AM -0400, Waiman Long wrote: v8-v9: - Integrate PeterZ's version of the queue spinlock patch with some modification: http

Re: [PATCH v9 03/19] qspinlock: Add pending bit

2014-04-18 Thread Konrad Rzeszutek Wilk
On Fri, Apr 18, 2014 at 12:23:29PM -0400, Waiman Long wrote: On 04/18/2014 03:42 AM, Ingo Molnar wrote: * Waiman Longwaiman.l...@hp.com wrote: Because the qspinlock needs to touch a second cacheline; add a pending bit and allow a single in-word spinner before we punt to the second

Re: [PATCH v9 00/19] qspinlock: a 4-byte queue spinlock with PV support

2014-04-17 Thread Konrad Rzeszutek Wilk
On Thu, Apr 17, 2014 at 11:03:52AM -0400, Waiman Long wrote: v8-v9: - Integrate PeterZ's version of the queue spinlock patch with some modification: http://lkml.kernel.org/r/20140310154236.038181...@infradead.org - Break the more complex patches into smaller ones to ease review

Re: [PATCH v8 01/10] qspinlock: A generic 4-byte queue spinlock implementation

2014-04-07 Thread Konrad Rzeszutek Wilk
On Mon, Apr 07, 2014 at 04:12:58PM +0200, Peter Zijlstra wrote: On Fri, Apr 04, 2014 at 12:57:27PM -0400, Konrad Rzeszutek Wilk wrote: On Fri, Apr 04, 2014 at 03:00:12PM +0200, Peter Zijlstra wrote: So I'm just not ever going to pick up this patch; I spend a week trying to reverse

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-04 Thread Konrad Rzeszutek Wilk
On Wed, Apr 02, 2014 at 10:32:01AM -0400, Konrad Rzeszutek Wilk wrote: On Wed, Apr 02, 2014 at 09:27:29AM -0400, Waiman Long wrote: N.B. Sorry for the duplicate. This patch series were resent as the original one was rejected by the vger.kernel.org list server due to long header

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-04 Thread Konrad Rzeszutek Wilk
On Thu, Apr 03, 2014 at 10:57:18PM -0400, Waiman Long wrote: On 04/03/2014 01:23 PM, Konrad Rzeszutek Wilk wrote: On Wed, Apr 02, 2014 at 10:10:17PM -0400, Waiman Long wrote: On 04/02/2014 04:35 PM, Waiman Long wrote: On 04/02/2014 10:32 AM, Konrad Rzeszutek Wilk wrote: On Wed, Apr 02, 2014

Re: [PATCH v8 01/10] qspinlock: A generic 4-byte queue spinlock implementation

2014-04-04 Thread Konrad Rzeszutek Wilk
On Fri, Apr 04, 2014 at 03:00:12PM +0200, Peter Zijlstra wrote: So I'm just not ever going to pick up this patch; I spend a week trying to reverse engineer this; I posted a 7 patch series creating the equivalent, but in a gradual and readable fashion:

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-04 Thread Konrad Rzeszutek Wilk
On Fri, Apr 04, 2014 at 01:13:17PM -0400, Waiman Long wrote: On 04/04/2014 12:55 PM, Konrad Rzeszutek Wilk wrote: On Thu, Apr 03, 2014 at 10:57:18PM -0400, Waiman Long wrote: On 04/03/2014 01:23 PM, Konrad Rzeszutek Wilk wrote: On Wed, Apr 02, 2014 at 10:10:17PM -0400, Waiman Long wrote

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-04 Thread Konrad Rzeszutek Wilk
On Fri, Apr 04, 2014 at 01:58:15PM -0400, Konrad Rzeszutek Wilk wrote: On Fri, Apr 04, 2014 at 01:13:17PM -0400, Waiman Long wrote: On 04/04/2014 12:55 PM, Konrad Rzeszutek Wilk wrote: On Thu, Apr 03, 2014 at 10:57:18PM -0400, Waiman Long wrote: On 04/03/2014 01:23 PM, Konrad Rzeszutek Wilk

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-03 Thread Konrad Rzeszutek Wilk
On Wed, Apr 02, 2014 at 10:10:17PM -0400, Waiman Long wrote: On 04/02/2014 04:35 PM, Waiman Long wrote: On 04/02/2014 10:32 AM, Konrad Rzeszutek Wilk wrote: On Wed, Apr 02, 2014 at 09:27:29AM -0400, Waiman Long wrote: N.B. Sorry for the duplicate. This patch series were resent

Re: [PATCH v8 00/10] qspinlock: a 4-byte queue spinlock with PV support

2014-04-02 Thread Konrad Rzeszutek Wilk
On Wed, Apr 02, 2014 at 09:27:29AM -0400, Waiman Long wrote: N.B. Sorry for the duplicate. This patch series were resent as the original one was rejected by the vger.kernel.org list server due to long header. There is no change in content. v7-v8: - Remove one unneeded atomic

Re: [PATCH v8 10/10] pvqspinlock, x86: Enable qspinlock PV support for XEN

2014-04-02 Thread Konrad Rzeszutek Wilk
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks index a70fdeb..451e392 100644 --- a/kernel/Kconfig.locks +++ b/kernel/Kconfig.locks @@ -229,4 +229,4 @@ config ARCH_USE_QUEUE_SPINLOCK config QUEUE_SPINLOCK def_bool y if ARCH_USE_QUEUE_SPINLOCK - depends on SMP

Re: [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest

2014-03-17 Thread Konrad Rzeszutek Wilk
On Thu, Mar 13, 2014 at 02:16:06PM +0100, Paolo Bonzini wrote: Il 13/03/2014 11:54, David Vrabel ha scritto: On 12/03/14 18:54, Waiman Long wrote: Locking is always an issue in a virtualized environment as the virtual CPU that is waiting on a lock may get scheduled out and hence block any

Re: [Xen-devel] [PATCH] KVM, XEN: Fix potential race in pvclock code

2014-01-28 Thread Konrad Rzeszutek Wilk
On Mon, Jan 27, 2014 at 01:33:01PM +0100, Julian Stecklina wrote: On 01/24/2014 07:08 PM, Konrad Rzeszutek Wilk wrote: On Thu, Jan 16, 2014 at 03:13:44PM +0100, Julian Stecklina wrote: The paravirtualized clock used in KVM and Xen uses a version field to allow the guest to see when

Re: [Xen-devel] [PATCH] KVM, XEN: Fix potential race in pvclock code

2014-01-28 Thread Konrad Rzeszutek Wilk
On Mon, Jan 27, 2014 at 06:47:58PM +0100, Paolo Bonzini wrote: Il 17/01/2014 10:41, Jan Beulich ha scritto: One half of this doesn't apply here, due to the explicit barriers that are there. The half about converting local variable accesses back to memory reads (i.e. eliding the local

Re: [Xen-devel] [PATCH] KVM, XEN: Fix potential race in pvclock code

2014-01-24 Thread Konrad Rzeszutek Wilk
On Thu, Jan 16, 2014 at 03:13:44PM +0100, Julian Stecklina wrote: The paravirtualized clock used in KVM and Xen uses a version field to allow the guest to see when the shared data structure is inconsistent. The code reads the version field twice (before and after the data structure is copied)

Re: [PATCH] x86 kconfig: Add recommendation to enable paravirt spinlock

2013-10-21 Thread Konrad Rzeszutek Wilk
On Mon, Oct 21, 2013 at 09:35:08PM +0530, Raghavendra K T wrote: Since paravirt spinlock optimization are in 3.12 kernel, we have very good performance benefit for paravirtualized KVM / Xen kernel. Also we no longer suffer from 5% side effect on native kernel. Yeey! Signed-off-by:

Re: [PATCH V12 0/14] Paravirtualized ticket spinlocks

2013-08-09 Thread Konrad Rzeszutek Wilk
On Fri, Aug 09, 2013 at 06:20:02PM +0530, Raghavendra K T wrote: On 08/09/2013 04:34 AM, H. Peter Anvin wrote: Okay, I figured it out. One of several problems with the formatting of this patchset is that it has one- and two-digit patch numbers in the headers, which meant that my scripts

Re: [PATCH V12 0/14] Paravirtualized ticket spinlocks

2013-08-07 Thread Konrad Rzeszutek Wilk
On Wed, Aug 07, 2013 at 12:15:21PM +0530, Raghavendra K T wrote: On 08/07/2013 10:18 AM, H. Peter Anvin wrote: Please let me know, if I should rebase again. tip:master is not a stable branch; it is more like linux-next. We need to figure out which topic branches are dependencies for this

Re: [PATCH V2 4/4] x86: correctly detect hypervisor

2013-08-05 Thread Konrad Rzeszutek Wilk
: x...@kernel.org Cc: K. Y. Srinivasan k...@microsoft.com Cc: Haiyang Zhang haiya...@microsoft.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: Jeremy Fitzhardinge jer...@goop.org Cc: Doug Covelli dcove...@vmware.com Cc: Borislav Petkov b...@suse.de Cc: Dan Hecht dhe

Re: [PATCH RFC V11 15/18] kvm : Paravirtual ticketlocks support for linux guests running on KVM hypervisor

2013-08-05 Thread Konrad Rzeszutek Wilk
On Mon, Aug 05, 2013 at 11:46:03AM +0200, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Fri, Aug 02, 2013 at 11:25:39AM +0200, Ingo Molnar wrote: Ingo, Do you have any concerns reg this series? please let me know if this looks good now to you. I'm

Re: [PATCH V2 4/4] x86: correctly detect hypervisor

2013-08-05 Thread Konrad Rzeszutek Wilk
On Mon, Aug 05, 2013 at 08:20:53AM -0700, H. Peter Anvin wrote: On 08/05/2013 07:34 AM, Konrad Rzeszutek Wilk wrote: Could you provide me with a git branch so I can test it overnight please? Pull tip:x86/paravirt. It works for me. Thanks. -hpa -- To unsubscribe from

Re: [PATCH 2/4] xen: switch to use hypervisor_cpuid_base()

2013-07-23 Thread Konrad Rzeszutek Wilk
On Tue, Jul 23, 2013 at 05:41:03PM +0800, Jason Wang wrote: Switch to use hypervisor_cpuid_base() to detect Xen. Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: Jeremy Fitzhardinge jer...@goop.org Cc: Thomas Gleixner t

Re: [PATCH RFC V11 0/18] Paravirtualized ticket spinlocks

2013-07-22 Thread Konrad Rzeszutek Wilk
github link: https://github.com/ktraghavendra/linux/tree/pvspinlock_v11 And chance you have a backup git tree? I get: This repository is temporarily unavailable. Please note that we set SPIN_THRESHOLD = 32k with this series, that would eatup little bit of overcommit performance of PLE

Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks

2013-07-10 Thread Konrad Rzeszutek Wilk
On Wed, Jul 10, 2013 at 01:47:17PM +0300, Gleb Natapov wrote: On Wed, Jul 10, 2013 at 12:40:47PM +0200, Peter Zijlstra wrote: On Wed, Jul 10, 2013 at 01:33:25PM +0300, Gleb Natapov wrote: Here's an idea, trim the damn email ;-) -- not only directed at gleb. Good idea. Ingo, Gleb,

Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks

2013-07-10 Thread Konrad Rzeszutek Wilk
Gleb Natapov g...@redhat.com wrote: On Wed, Jul 10, 2013 at 11:03:15AM -0400, Konrad Rzeszutek Wilk wrote: On Wed, Jul 10, 2013 at 01:47:17PM +0300, Gleb Natapov wrote: On Wed, Jul 10, 2013 at 12:40:47PM +0200, Peter Zijlstra wrote: On Wed, Jul 10, 2013 at 01:33:25PM +0300, Gleb Natapov

Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks

2013-06-26 Thread Konrad Rzeszutek Wilk
On Wed, Jun 26, 2013 at 03:52:40PM +0300, Gleb Natapov wrote: On Wed, Jun 26, 2013 at 01:37:45PM +0200, Andrew Jones wrote: On Wed, Jun 26, 2013 at 02:15:26PM +0530, Raghavendra K T wrote: On 06/25/2013 08:20 PM, Andrew Theurer wrote: On Sun, 2013-06-02 at 00:51 +0530, Raghavendra K T

Re: [PATCH RFC V9 12/19] xen: Enable PV ticketlocks on HVM Xen

2013-06-04 Thread Konrad Rzeszutek Wilk
On Tue, Jun 04, 2013 at 12:46:53PM +0530, Raghavendra K T wrote: On 06/03/2013 09:27 PM, Konrad Rzeszutek Wilk wrote: On Sun, Jun 02, 2013 at 12:55:03AM +0530, Raghavendra K T wrote: xen: Enable PV ticketlocks on HVM Xen There is more to it. You should also revert

Re: [PATCH RFC V9 2/19] x86/ticketlock: Don't inline _spin_unlock when using paravirt spinlocks

2013-06-03 Thread Konrad Rzeszutek Wilk
it. Thanks Jeremy for original version of ARCH_NOINLINE_SPIN_UNLOCK config patch, which is simplified. Suggested-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch

Re: [PATCH RFC V9 3/19] x86/ticketlock: Collapse a layer of functions

2013-06-03 Thread Konrad Rzeszutek Wilk
functions into the arch_ functions. Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Tested-by: Attilio Rao attilio@citrix.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/include/asm

Re: [PATCH RFC V9 8/19] x86/pvticketlock: When paravirtualizing ticket locks, increment by 2

2013-06-03 Thread Konrad Rzeszutek Wilk
...@citrix.com Tested-by: Attilio Rao attilio@citrix.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/include/asm/spinlock.h | 10 +- arch/x86/include/asm/spinlock_types.h | 10 +- 2

Re: [PATCH RFC V9 9/19] Split out rate limiting from jump_label.h

2013-06-03 Thread Konrad Rzeszutek Wilk
into a new file, jump_label_ratelimit.h, to resolve the issue. Signed-off-by: Andrew Jones drjo...@redhat.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Otherwise looks fine to me: Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- include/linux/jump_label.h

Re: [PATCH RFC V9 12/19] xen: Enable PV ticketlocks on HVM Xen

2013-06-03 Thread Konrad Rzeszutek Wilk
jeremy.fitzhardi...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- arch/x86/xen/smp.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index dcdc91c..8d2abf7

Re: [PATCH RFC V9 16/19] kvm : Paravirtual ticketlocks support for linux guests running on KVM hypervisor

2013-06-03 Thread Konrad Rzeszutek Wilk
On Sun, Jun 02, 2013 at 12:55:57AM +0530, Raghavendra K T wrote: kvm : Paravirtual ticketlocks support for linux guests running on KVM hypervisor From: Srivatsa Vaddagiri va...@linux.vnet.ibm.com During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has required

Re: [PATCH RFC V9 5/19] xen/pvticketlock: Xen implementation for PV ticket locks

2013-06-03 Thread Konrad Rzeszutek Wilk
, and overwrite our values. Raghu: use function + enum instead of macro, cmpxchg for zero status reset Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com

Re: [PATCH RFC V9 19/19] kvm hypervisor: Add directed yield in vcpu block path

2013-06-03 Thread Konrad Rzeszutek Wilk
On Sun, Jun 02, 2013 at 12:56:45AM +0530, Raghavendra K T wrote: kvm hypervisor: Add directed yield in vcpu block path From: Raghavendra K T raghavendra...@linux.vnet.ibm.com We use the improved PLE handler logic in vcpu block patch for scheduling rather than plain schedule, so that we can

Re: [PATCH RFC V9 18/19] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock

2013-06-03 Thread Konrad Rzeszutek Wilk
On Sun, Jun 02, 2013 at 12:56:24AM +0530, Raghavendra K T wrote: Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock From: Raghavendra K T raghavendra...@linux.vnet.ibm.com KVM_HC_KICK_CPU hypercall added to wakeup halted vcpu in paravirtual spinlock

Re: [PATCH 3/2] vfio: Provide module option to disable vfio_iommu_type1 hugepage support

2013-05-28 Thread Konrad Rzeszutek Wilk
by loading vfio_iommu_type1 with disable_hugepages=1 or dynamically through sysfs. If enabled dynamically, only new mappings are restricted. Signed-off-by: Alex Williamson alex.william...@redhat.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- As suggested by Konrad

Re: [PATCH 2/2] vfio: hugepage support for vfio_iommu_type1

2013-05-25 Thread Konrad Rzeszutek Wilk
+ * Turns out AMD IOMMU has a page table bug where it won't map large pages + * to a region that previously mapped smaller pages. This should be fixed + * soon, so this is just a temporary workaround to break mappings down into + * PAGE_SIZE. Better to map smaller pages than nothing. + */

Re: [PATCH 0/2] vfio: type1 iommu hugepage support

2013-05-25 Thread Konrad Rzeszutek Wilk
On Fri, May 24, 2013 at 11:24:26AM -0600, Alex Williamson wrote: This series let's the vfio type1 iommu backend take advantage of iommu large page support. See patch 2/2 for the details. This has been tested on both amd_iommu and intel_iommu, but only my AMD system has large page support.

Re: [PATCH 2/5] Expand the steal time msr to also contain the consigned time.

2012-11-27 Thread Konrad Rzeszutek Wilk
On Mon, Nov 26, 2012 at 02:36:45PM -0600, Michael Wolf wrote: Add a consigned field. This field will hold the time lost due to capping or overcommit. The rest of the time will still show up in the steal-time field. Signed-off-by: Michael Wolf m...@linux.vnet.ibm.com ---

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-09-28 Thread Konrad Rzeszutek Wilk
PLE: - works for unmodified / non-Linux guests - works for all types of spins (e.g. smp_call_function*()) - utilizes an existing hardware interface (PAUSE instruction) so likely more robust compared to a software interface PV: - has more information, so it can perform better

Re: [PATCH RFC 0/2] kvm: Improving undercommit,overcommit scenarios in PLE handler

2012-09-26 Thread Konrad Rzeszutek Wilk
On Tue, Sep 25, 2012 at 05:00:30PM +0200, Dor Laor wrote: On 09/24/2012 02:02 PM, Raghavendra K T wrote: On 09/24/2012 02:12 PM, Dor Laor wrote: In order to help PLE and pvticketlock converge I thought that a small test code should be developed to test this in a predictable, deterministic

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-14 Thread Konrad Rzeszutek Wilk
The concern I have is that even though we have gone through changes to help reduce the candidate vcpus we yield to, we still have a very poor idea of which vcpu really needs to run. The result is high cpu usage in the get_pid_task and still some contention in the double runqueue lock. To

Re: [RFC 07/10] KVM: add KVM TMEM host side interface

2012-06-28 Thread Konrad Rzeszutek Wilk
On Wed, Jun 06, 2012 at 01:00:15PM +0200, Sasha Levin wrote: This is the host side interface that the guests which support KVM TMEM talk to. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/tmem/Kconfig|6 +++ arch/x86/kvm/tmem/Makefile |2

Re: [PATCH 11/13] pci: Create common pcibios_err_to_errno

2012-05-21 Thread Konrad Rzeszutek Wilk
On Fri, May 11, 2012 at 04:56:44PM -0600, Alex Williamson wrote: For returning errors out to non-PCI code. Re-name xen's version. Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/xen-pciback/conf_space.c

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-16 Thread Konrad Rzeszutek Wilk
On Sat, Mar 31, 2012 at 09:37:45AM +0530, Srivatsa Vaddagiri wrote: * Thomas Gleixner t...@linutronix.de [2012-03-31 00:07:58]: I know that Peter is going to go berserk on me, but if we are running a paravirt guest then it's simple to provide a mechanism which allows the host (aka

Re: [Xen-devel] [PATCH RFC V5 1/6] debugfs: Add support to print u32 array in debugfs

2012-03-30 Thread Konrad Rzeszutek Wilk
suz...@in.ibm.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Greg, I was thinking to stick this patch in my queue, but I need your OK since it touches fs/debugfs/file.c. --- diff --git a/arch/x86/xen/debugfs.c b

Re: [RFC 2/2] kvm: guest-side changes for tmem on KVM

2012-03-19 Thread Konrad Rzeszutek Wilk
On Fri, Mar 16, 2012 at 10:30:35AM +0530, Akshay Karle wrote: +/* kvm tmem foundation ops/hypercalls */ + +static inline int kvm_tmem_op(u32 tmem_cmd, u32 tmem_pool, struct tmem_oid oid, + u32 index, u32 tmem_offset, u32 pfn_offset, unsigned long pfn, u32 len, uint16_t cli_id)

Re: [RFC 0/2] kvm: Transcendent Memory (tmem) on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
On Thu, Mar 08, 2012 at 09:59:41PM +0530, Akshay Karle wrote: Hi, We are undergraduate engineering students of Maharashtra Academy of Engineering, Pune, India and we are working on a project entitled 'Transcendent Memory on KVM' as a part of our academics. The project members are: 1.

Re: [RFC 0/2] kvm: Transcendent Memory (tmem) on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
--- kvm-tmem Patch details: This patch adds appropriate shims at the guest that invokes the kvm hypercalls, and the host uses zcache pools to implement the required functions. To enable tmem on the 'kvm host' add the boot parameter: kvmtmem And to enable tmem in the 'kvm guests' add the

Re: [RFC 1/2] kvm: host-side changes for tmem on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
On Thu, Mar 08, 2012 at 10:24:08PM +0530, Akshay Karle wrote: From: Akshay Karle akshay.a.ka...@gmail.com Subject: [RFC 1/2] kvm: host-side changes for tmem on KVM Working at host: Once the guest exits to the kvm host, the host determines that the guest exited to perform some tmem

Re: [RFC 2/2] kvm: guest-side changes for tmem on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
On Thu, Mar 08, 2012 at 10:32:37PM +0530, Akshay Karle wrote: From: Akshay Karle akshay.a.ka...@gmail.com Subject: [RFC 2/2] kvm: guest-side changes for tmem on KVM Working in the guest: At the kvm guest, we add the appropriate tmem shims to intercept the tmem operations and then invoke the

Re: [RFC 0/2] kvm: Transcendent Memory (tmem) on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
On Thu, Mar 15, 2012 at 08:01:52PM +0200, Avi Kivity wrote: On 03/15/2012 07:49 PM, Dan Magenheimer wrote: One of the potential problems with tmem is reduction in performance when the cache hit rate is low, for example when streaming. Can you test this by creating a large file, for

Re: [RFC 0/2] kvm: Transcendent Memory (tmem) on KVM

2012-03-15 Thread Konrad Rzeszutek Wilk
On Thu, Mar 15, 2012 at 12:36:48PM -0700, Dan Magenheimer wrote: From: Avi Kivity [mailto:a...@redhat.com] Sent: Thursday, March 15, 2012 12:11 PM To: Konrad Rzeszutek Wilk Cc: Dan Magenheimer; Akshay Karle; linux-ker...@vger.kernel.org; kvm@vger.kernel.org; ashu tripathi; nishant

Re: [PATCH] BUG in pv_clock when overflow condition is detected

2012-02-20 Thread Konrad Rzeszutek Wilk
On Fri, Feb 17, 2012 at 04:25:04PM +0100, Igor Mammedov wrote: On 02/16/2012 03:03 PM, Avi Kivity wrote: On 02/15/2012 07:18 PM, Igor Mammedov wrote: On 02/15/2012 01:23 PM, Igor Mammedov wrote: static u64 pvclock_get_nsec_offset(struct pvclock_shadow_time *shadow) { -u64 delta =

Re: [PATCH 0/5] VFIO core framework

2012-01-12 Thread Konrad Rzeszutek Wilk
On Tue, Jan 10, 2012 at 11:35:54AM -0700, Alex Williamson wrote: On Tue, 2012-01-10 at 11:26 -0500, Konrad Rzeszutek Wilk wrote: On Wed, Dec 21, 2011 at 02:42:02PM -0700, Alex Williamson wrote: This series includes the core framework for the VFIO driver. VFIO is a userspace driver

  1   2   >