Re: [PATCH v2 1/7] locking: Introduce local_lock()

2020-05-25 Thread Sebastian Andrzej Siewior
On 2020-05-25 09:12:14 [+0200], Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > ( The other departure from spinlocks is that the 'spinlock_t' name, > > without underscores, while making the API names such as spin_lock() > > with an underscore, was a conscious didactic choice. Applying

Re: [PATCH v2 1/7] locking: Introduce local_lock()

2020-05-25 Thread Sebastian Andrzej Siewior
On 2020-05-25 09:01:39 [+0200], Ingo Molnar wrote: > > * Sebastian Andrzej Siewior wrote: > > > From: Thomas Gleixner > > > > To address this PREEMPT_RT introduced the concept of local_locks which are > > strictly per CPU. > > > +++ b/include/linux/locallock_internal.h > > @@ -0,0 +1,90 @@ >

Re: [PATCH v2 1/7] locking: Introduce local_lock()

2020-05-25 Thread Ingo Molnar
* Ingo Molnar wrote: > ( The other departure from spinlocks is that the 'spinlock_t' name, > without underscores, while making the API names such as spin_lock() > with an underscore, was a conscious didactic choice. Applying that > principle to local locks gives us the

Re: [PATCH v2 1/7] locking: Introduce local_lock()

2020-05-25 Thread Ingo Molnar
* Sebastian Andrzej Siewior wrote: > From: Thomas Gleixner > > To address this PREEMPT_RT introduced the concept of local_locks which are > strictly per CPU. > +++ b/include/linux/locallock_internal.h > @@ -0,0 +1,90 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _LINUX_LOCALLOCK_H

[PATCH v2 1/7] locking: Introduce local_lock()

2020-05-24 Thread Sebastian Andrzej Siewior
From: Thomas Gleixner preempt_disable() and local_irq_disable/save() are in principle per CPU big kernel locks. This has several downsides: - The protection scope is unknown - Violation of protection rules is hard to detect by instrumentation - For PREEMPT_RT such sections, unless in