Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Waiman Long
On 01/05/2017 01:50 PM, Steven Rostedt wrote: > On Thu, 5 Jan 2017 12:07:21 -0500 > Waiman Long wrote: > > >> I do make the assumption that spinlock critical sections are behaving >> well enough. Apparently, that is not a valid assumption. I sent these >> RFC patches out to see if it was an idea w

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Steven Rostedt
On Thu, 5 Jan 2017 12:07:21 -0500 Waiman Long wrote: > I do make the assumption that spinlock critical sections are behaving > well enough. Apparently, that is not a valid assumption. I sent these > RFC patches out to see if it was an idea worth pursuing. If not, I can > drop these patches. Anyw

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Steven Rostedt
On Wed, 4 Jan 2017 15:02:23 -0500 Waiman Long wrote: > On 01/04/2017 10:55 AM, Steven Rostedt wrote: > > On Wed, 4 Jan 2017 10:25:14 -0500 > > Waiman Long wrote: > > > > > >> I know that in -RT kernel, all the non-raw spinlocks are replaced by > >> rtmutex which is a sleeping lock. This can

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Daniel Bristot de Oliveira
On 01/05/2017 05:08 PM, Peter Zijlstra wrote: > RT very fundamentally relies on the spinlock->rtmutex conversion to > allow preempting things when a higher priority task comes along. A > spinlock, of any kind, requires having preemption disabled while holding > the lock. If the critical section is

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Waiman Long
On 01/05/2017 11:08 AM, Peter Zijlstra wrote: > On Thu, Jan 05, 2017 at 10:55:55AM -0500, Waiman Long wrote: >> What I am saying that we don't need to change spinlock to rtmutex in a >> -RT kernel. Instead, we can use rtqspinlock for this purpose. All the >> sleeping locks will still be converted t

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Peter Zijlstra
On Thu, Jan 05, 2017 at 10:55:55AM -0500, Waiman Long wrote: > What I am saying that we don't need to change spinlock to rtmutex in a > -RT kernel. Instead, we can use rtqspinlock for this purpose. All the > sleeping locks will still be converted to rtmutex. No-no-no.. > Conversion of rtmutex doe

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Waiman Long
On 01/05/2017 04:44 AM, Peter Zijlstra wrote: > On Wed, Jan 04, 2017 at 10:25:14AM -0500, Waiman Long wrote: >> On 01/04/2017 07:49 AM, Peter Zijlstra wrote: >>> On Tue, Jan 03, 2017 at 01:00:23PM -0500, Waiman Long wrote: This patchset introduces a new variant of queued spinlocks - the r

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Peter Zijlstra
On Wed, Jan 04, 2017 at 10:25:14AM -0500, Waiman Long wrote: > On 01/04/2017 07:49 AM, Peter Zijlstra wrote: > > On Tue, Jan 03, 2017 at 01:00:23PM -0500, Waiman Long wrote: > >> This patchset introduces a new variant of queued spinlocks - the > >> realtime queued spinlocks. The purpose of this new

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-05 Thread Daniel Bristot de Oliveira
On 01/04/2017 04:25 PM, Waiman Long wrote: >> OK, so a single numerical field isn't sufficient to describe priority >> anymore, since we added DEADLINE support things have gotten a lot more >> complex. > From what I read from the code, DL tasks all have the same priority that > is higher than any o

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-04 Thread Waiman Long
On 01/04/2017 10:55 AM, Steven Rostedt wrote: > On Wed, 4 Jan 2017 10:25:14 -0500 > Waiman Long wrote: > > >> I know that in -RT kernel, all the non-raw spinlocks are replaced by >> rtmutex which is a sleeping lock. This can have a real performance >> impact on systems with more than a few cores

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-04 Thread Steven Rostedt
On Wed, 4 Jan 2017 10:25:14 -0500 Waiman Long wrote: > I know that in -RT kernel, all the non-raw spinlocks are replaced by > rtmutex which is a sleeping lock. This can have a real performance > impact on systems with more than a few cores. The rtmutex isn't fair either. We do fine on 80+ CPUs

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-04 Thread Waiman Long
On 01/04/2017 07:49 AM, Peter Zijlstra wrote: > On Tue, Jan 03, 2017 at 01:00:23PM -0500, Waiman Long wrote: >> This patchset introduces a new variant of queued spinlocks - the >> realtime queued spinlocks. The purpose of this new variant is to >> support real spinlock in a realtime environment whe

Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-04 Thread Peter Zijlstra
On Tue, Jan 03, 2017 at 01:00:23PM -0500, Waiman Long wrote: > This patchset introduces a new variant of queued spinlocks - the > realtime queued spinlocks. The purpose of this new variant is to > support real spinlock in a realtime environment where high priority > RT tasks should be allowed to co

[RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

2017-01-03 Thread Waiman Long
This patchset introduces a new variant of queued spinlocks - the realtime queued spinlocks. The purpose of this new variant is to support real spinlock in a realtime environment where high priority RT tasks should be allowed to complete its work ASAP. This means as little waiting time for spinlocks