Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Dave Chinner
On Wed, Mar 12, 2014 at 07:15:03AM +0100, Peter Zijlstra wrote: > On Wed, Mar 12, 2014 at 01:31:53PM +1100, Dave Chinner wrote: > > With the queuing spinlock, I expected to see somewhat better > > results, but I didn't at first. Turns out if you have any sort of > > lock debugging turned on, then

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Waiman Long
On 03/12/2014 02:24 AM, Peter Zijlstra wrote: On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: Except that I do a single atomic short integer write to switch the bits instead of 2 byte write. D'0h why didn't I think of that. A single short write is much better than the 2 byte

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 12:19:33PM -0400, Steven Rostedt wrote: > On Wed, 12 Mar 2014 16:57:54 +0100 > Peter Zijlstra wrote: > > > > I build and booted these patches against tip/master as of this morning. > > It build ~50 defconfig kernels on my WSM-EP. > > > > I've not managed to reproduce

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Steven Rostedt
On Wed, 12 Mar 2014 16:57:54 +0100 Peter Zijlstra wrote: > I build and booted these patches against tip/master as of this morning. > It build ~50 defconfig kernels on my WSM-EP. > > I've not managed to reproduce the hang as reported by Dave, but then I > doubt building kernels has anywhere

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Linus Torvalds
On Wed, Mar 12, 2014 at 8:57 AM, Peter Zijlstra wrote: > > I've not managed to reproduce the hang as reported by Dave, but then I > doubt building kernels has anywhere near the lock contention he > generated. Building kernels has basically no lock contention at all. Linus -- To

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 06:07:30AM -0400, Steven Rostedt wrote: > On Wed, 12 Mar 2014 15:26:16 +1100 > Dave Chinner wrote: > > > > I did apply them manually - but the patchset is based on the > > tip/master, plus some patches from a previous patch set that aren't > > in tip/locking to be able

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 07:24:36AM +0100, Peter Zijlstra wrote: > On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: > > Except that I do a single atomic short integer write to switch the bits > > instead of 2 byte write. > > D'0h why didn't I think of that. A single short write is much

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Steven Rostedt
On Wed, 12 Mar 2014 15:26:16 +1100 Dave Chinner wrote: > I did apply them manually - but the patchset is based on the > tip/master, plus some patches from a previous patch set that aren't > in tip/locking to be able to apply this patchset cleanly in the > first place. So there's no "start froma

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: > Except that I do a single atomic short integer write to switch the bits > instead of 2 byte write. D'0h why didn't I think of that. A single short write is much better than the 2 byte writes. In any case; can you try and keep the

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 01:31:53PM +1100, Dave Chinner wrote: > With the queuing spinlock, I expected to see somewhat better > results, but I didn't at first. Turns out if you have any sort of > lock debugging turned on, then the code doesn't ever go into the > lock slow path and hence does not

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 07:24:36AM +0100, Peter Zijlstra wrote: On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: Except that I do a single atomic short integer write to switch the bits instead of 2 byte write. D'0h why didn't I think of that. A single short write is much better

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 06:07:30AM -0400, Steven Rostedt wrote: On Wed, 12 Mar 2014 15:26:16 +1100 Dave Chinner da...@fromorbit.com wrote: I did apply them manually - but the patchset is based on the tip/master, plus some patches from a previous patch set that aren't in tip/locking to

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Linus Torvalds
On Wed, Mar 12, 2014 at 8:57 AM, Peter Zijlstra pet...@infradead.org wrote: I've not managed to reproduce the hang as reported by Dave, but then I doubt building kernels has anywhere near the lock contention he generated. Building kernels has basically no lock contention at all.

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Steven Rostedt
On Wed, 12 Mar 2014 16:57:54 +0100 Peter Zijlstra pet...@infradead.org wrote: I build and booted these patches against tip/master as of this morning. It build ~50 defconfig kernels on my WSM-EP. I've not managed to reproduce the hang as reported by Dave, but then I doubt building kernels

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 12:19:33PM -0400, Steven Rostedt wrote: On Wed, 12 Mar 2014 16:57:54 +0100 Peter Zijlstra pet...@infradead.org wrote: I build and booted these patches against tip/master as of this morning. It build ~50 defconfig kernels on my WSM-EP. I've not managed to

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Waiman Long
On 03/12/2014 02:24 AM, Peter Zijlstra wrote: On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: Except that I do a single atomic short integer write to switch the bits instead of 2 byte write. D'0h why didn't I think of that. A single short write is much better than the 2 byte

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Dave Chinner
On Wed, Mar 12, 2014 at 07:15:03AM +0100, Peter Zijlstra wrote: On Wed, Mar 12, 2014 at 01:31:53PM +1100, Dave Chinner wrote: With the queuing spinlock, I expected to see somewhat better results, but I didn't at first. Turns out if you have any sort of lock debugging turned on, then the

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Wed, Mar 12, 2014 at 01:31:53PM +1100, Dave Chinner wrote: With the queuing spinlock, I expected to see somewhat better results, but I didn't at first. Turns out if you have any sort of lock debugging turned on, then the code doesn't ever go into the lock slow path and hence does not ever

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Peter Zijlstra
On Tue, Mar 11, 2014 at 11:17:46PM -0400, Waiman Long wrote: Except that I do a single atomic short integer write to switch the bits instead of 2 byte write. D'0h why didn't I think of that. A single short write is much better than the 2 byte writes. In any case; can you try and keep the

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-12 Thread Steven Rostedt
On Wed, 12 Mar 2014 15:26:16 +1100 Dave Chinner da...@fromorbit.com wrote: I did apply them manually - but the patchset is based on the tip/master, plus some patches from a previous patch set that aren't in tip/locking to be able to apply this patchset cleanly in the first place. So there's

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Dave Chinner
On Tue, Mar 11, 2014 at 11:11:59PM -0400, Steven Rostedt wrote: > On Wed, 12 Mar 2014 13:31:53 +1100 > Dave Chinner wrote: > > > > So either this patchset doesn't work right now, or there's something > > else broken in the tip/master tree... > > I've found a few things broken with the tip

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Waiman Long
On 03/11/2014 06:45 AM, Ingo Molnar wrote: * Peter Zijlstra wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Steven Rostedt
On Wed, 12 Mar 2014 13:31:53 +1100 Dave Chinner wrote: > So either this patchset doesn't work right now, or there's something > else broken in the tip/master tree... I've found a few things broken with the tip master tree. Anyway, I'm not sure the patches are even there. The last I saw, the

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Dave Chinner
On Mon, Mar 10, 2014 at 04:42:36PM +0100, Peter Zijlstra wrote: > Hi Waiman, > > I promised you this series a number of days ago; sorry for the delay I've been > somewhat unwell :/ > > That said, these few patches start with a (hopefully) simple and correct form > of the queue spinlock, and then

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Tue, Mar 11, 2014 at 11:45:03AM +0100, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > > > Hi Waiman, > > > > > > I promised you this series a number of days ago; sorry for the delay > > > I've been somewhat unwell :/ > > > > > > That said, these few

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Peter Zijlstra
On Tue, Mar 11, 2014 at 11:45:03AM +0100, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > Hi Waiman, > > > > I promised you this series a number of days ago; sorry for the delay > > I've been somewhat unwell :/ > > > > That said, these few patches start with a (hopefully) simple and >

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Ingo Molnar
* Peter Zijlstra wrote: > Hi Waiman, > > I promised you this series a number of days ago; sorry for the delay > I've been somewhat unwell :/ > > That said, these few patches start with a (hopefully) simple and > correct form of the queue spinlock, and then gradually build upon > it,

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then gradually build upon

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Peter Zijlstra
On Tue, Mar 11, 2014 at 11:45:03AM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Tue, Mar 11, 2014 at 11:45:03AM +0100, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Dave Chinner
On Mon, Mar 10, 2014 at 04:42:36PM +0100, Peter Zijlstra wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Steven Rostedt
On Wed, 12 Mar 2014 13:31:53 +1100 Dave Chinner da...@fromorbit.com wrote: So either this patchset doesn't work right now, or there's something else broken in the tip/master tree... I've found a few things broken with the tip master tree. Anyway, I'm not sure the patches are even there. The

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Waiman Long
On 03/11/2014 06:45 AM, Ingo Molnar wrote: * Peter Zijlstrapet...@infradead.org wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue

Re: [RFC][PATCH 0/7] locking: qspinlock

2014-03-11 Thread Dave Chinner
On Tue, Mar 11, 2014 at 11:11:59PM -0400, Steven Rostedt wrote: On Wed, 12 Mar 2014 13:31:53 +1100 Dave Chinner da...@fromorbit.com wrote: So either this patchset doesn't work right now, or there's something else broken in the tip/master tree... I've found a few things broken with the

[RFC][PATCH 0/7] locking: qspinlock

2014-03-10 Thread Peter Zijlstra
Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then gradually build upon it, explaining each optimization as we go. Having these

[RFC][PATCH 0/7] locking: qspinlock

2014-03-10 Thread Peter Zijlstra
Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then gradually build upon it, explaining each optimization as we go. Having these