Commit-ID: 627f364d24c009b61c9199b2c75006e35c294675
Gitweb: https://git.kernel.org/tip/627f364d24c009b61c9199b2c75006e35c294675
Author: Frederic Weisbecker
AuthorDate: Tue, 2 Apr 2019 18:02:43 +0200
Committer: Ingo Molnar
CommitDate: Thu, 18 Apr 2019 12:50:17 +0200
locking/lockdep
Commit-ID: c902a1e8d9c9b47cd8faa16892710247cdda9b02
Gitweb: https://git.kernel.org/tip/c902a1e8d9c9b47cd8faa16892710247cdda9b02
Author: Frederic Weisbecker
AuthorDate: Tue, 2 Apr 2019 18:02:42 +0200
Committer: Ingo Molnar
CommitDate: Thu, 18 Apr 2019 12:50:17 +0200
locking/lockdep
Commit-ID: 0d2cc3b3453254f1c56f9456ba03e092ed4cfb72
Gitweb: https://git.kernel.org/tip/0d2cc3b3453254f1c56f9456ba03e092ed4cfb72
Author: Frederic Weisbecker
AuthorDate: Tue, 2 Apr 2019 18:02:41 +0200
Committer: Ingo Molnar
CommitDate: Thu, 18 Apr 2019 12:50:17 +0200
locking/lockdep
On Tue, Apr 16, 2019 at 01:20:09PM +0200, Peter Zijlstra wrote:
> On Sat, Apr 13, 2019 at 02:35:45AM +0200, Frederic Weisbecker wrote:
> > On Thu, Apr 11, 2019 at 12:46:32PM +0200, Peter Zijlstra wrote:
> > Same here:
> >
> > As above, we clear bitnr0 (LOCK_*_READ o
On Thu, Apr 11, 2019 at 12:46:32PM +0200, Peter Zijlstra wrote:
> On Wed, Apr 10, 2019 at 04:28:48AM +0200, Frederic Weisbecker wrote:
> > Should I re-issue the set or you do the changes?
>
> I've made it like so; does that work? In particular, do the comments
> make sense?
On Tue, Apr 09, 2019 at 03:03:52PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 02, 2019 at 06:02:44PM +0200, Frederic Weisbecker wrote:
> > @@ -1988,45 +1961,151 @@ static int exclusive_bit(int new_bit)
> > return state | (dir ^ LOCK_USAGE_DIR_MASK);
> > }
> >
)
Mainline 8452| 2652 |11962 |22415143
This patch 8452| 1518 | 7090 |12835602
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c | 212
: dd2ea3a0bffdc3e140dd4af085bae7f9f9a08d6d
Thanks,
Frederic
---
Frederic Weisbecker (4):
locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS &&
CONFIG_PROVE_LOCKING
locking/lockdep: Map remaining magic numbers to lock usage mask names
locking/lockdep: Use expanded masks on fin
now.
So move them inside the appropriate
CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING section.
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/
Clarify the code with mapping some more constant numbers that haven't
been named after their corresponding LOCK_USAGE_* symbol.
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions
In order to optimize check_irq_usage() and factorize all the IRQ usage
validations we'll need to be able to check multiple lock usage bits at
once. Prepare the low level usage mask check functions for that purpose.
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
On Wed, Mar 27, 2019 at 06:48:41PM +0100, Borislav Petkov wrote:
> On Wed, Mar 27, 2019 at 04:17:25PM +0100, Borislav Petkov wrote:
> Ok, after adding some debug output, it looks like this (newlines mine):
>
> [ 200.921625][ T8029]repro-80290d..4 200923254us :
>
On Fri, Mar 01, 2019 at 08:51:38AM -0800, Linus Torvalds wrote:
> On Thu, Feb 28, 2019 at 7:45 PM Frederic Weisbecker
> wrote:
> >
> > Numbers are indeed missing. In fact this patchset mostly just brings an
> > infrastructure. We have yet to pinpoint the most late
On Thu, Feb 28, 2019 at 09:33:15AM -0800, Linus Torvalds wrote:
> On Thu, Feb 28, 2019 at 9:12 AM Frederic Weisbecker
> wrote:
> >
> > So this set should hopefully address all reviews from the v2, and
> > fix all reports from the extremely useful (as always) Kbuild
-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Peter Zijlstra
---
arch/s390/include/asm/hardirq.h | 4
mark_lock_irq() is going to deal with lock usages that gather multiple
softirq vectors at once. Therefore the validation through valid_state()
will need to handle expanded usage masks.
So enhance valid_state() to that purpose.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc
Define the softirq vectors through macros so that we can later include
them in the automated definition of lockdep usage states.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E
check to the updated semantics. We can't deduce much
from softirq_count() alone anymore except when it's 0.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc
The common code between both versions of __local_bh_disable_ip(), whether
CONFIG_TRACE_IRQFLAGS is on or off, is going to grow up in order to
support vector masking granularity.
Merge these versions together to prepare for that.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
From: Frederic Weisbecker
Using the bottom-half masking APIs defined in linux/bottom-half.h won't
be possible without passing the relevant softirq vectors that are
currently defined in linux/interrupt.h
Yet we can't include linux/interrupt.h from linux/bottom-half.h due to
circular dependencies
From: Frederic Weisbecker
All softirqs must be set enabled on boot.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc
viewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Peter Zijlstra
---
kernel/l
There is no need to process softirqs if none of those pending are
enabled. Check about that early to avoid unnecessary overhead.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E
ror of softirq_count() because there is no per vector masking API
yet.
When this full masking counter is non 0, all softirq vectors are
explicitly disabled.
Suggested-by: Linus Torvalds
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc:
Remove the old protections that prevented softirqs from interrupting any
softirq-disabled context. Now that we can disable specific vectors on
a given piece of code, we want to be able to soft-interrupt those places
with other vectors.
Reviewed-by: David S. Miller
Signed-off-by: Frederic
This is a usage example of spin_lock_bh_mask(). NET_RX, TIMER and
TASKLET are the three softirqs that have been reported by lockdep to
be used for this socket lock, at least on my own usecases.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel
__local_bh_disable_ip() is neither for strict internal use nor does it
require the caller to disable hardirqs. Probaby a celebration for ancient
behaviour.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc
state with NET_RX_SOFTIRQ disabled
local_bh_enable_mask(bh);
Suggested-by: Linus Torvalds
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Moln
));
[...]
spin_unlock_bh_mask(lock, bh);
Suggested-by: Linus Torvalds
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej
ied by
lockdep_softirq_enter/exit()
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
From: Frederic Weisbecker
All softirqs must be set enabled on boot.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus
From: Frederic Weisbecker
All softirqs must be set enabled on boot.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus
We are going to extend the softirq bits with an enabled vector mask.
Provide the field with a more generic name to later layout the pending
states on the lower bits and the enabled states on the higher bits.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho
This reverts commit 9aee5f8a7e30330d0a8f4c626dc924ca5590aba5.
We are going to need the 16 high bits above in order to implement
a softirq enable mask. x86 is the only architecture that doesn't use
unsigned int to implement softirq_pending.
Reviewed-by: David S. Miller
Signed-off-by: Frederic
is to provide the necessary APIs to control
the per-vector enable bits.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc
Pass the softirq vector number to lockdep on callback execution so that
we know which one is involved while holding a lock. We will then be able
to pick up the proper LOCK_USED_IN_*_SOFTIRQ index to perform the
finegrained verifications.
Reviewed-by: David S. Miller
Signed-off-by: Frederic
version
that won't execute do_softirq() in the end.
Clarify this straight in the name. It may help reviewers who are already
familiar with functions such as preempt_enable_no_resched().
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
From: Frederic Weisbecker
Use the subsystem as the prefix to name the __softirq_data accessors.
They are going to be extended and want a more greppable and standard
naming sheme.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc
From: Frederic Weisbecker
All softirqs must be set enabled on boot.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus
| |
| |
RCU_SOFTIRQHI_SOFTIRQ bits
bits
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S
Since mark_lock() may now be passed more than one usage at once, make
sure to expand the lock usage structure in order to report all of them
while in verbose mode logging.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc
We are going to save as much traces as we have softirq vectors involved
in a given usage. Expand the stack trace record code accordingly.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc
. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c | 4
Loosely handle all the softirq vectors verbosity under the same
function.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c | 30
and @lockB
If no incompatible use is found, the verification never goes beyond
step 2 which means at most two iterations.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc
In order to perform softirq vector-finegrained locking validation we'll
need to be able to check multiple vector usages at once. Prepare the low
level usage mask check functions for that purpose.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel
have 4 hardirq bits + NR_SOFTIRQS * 4 + 1 bit (LOCK_USED) = 45
bits. Therefore we need a 64 bits mask.
Reviewed-by: David S. Miller
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
softirq/soft-interruptible-v2
HEAD: 63c89028058f5920d4b5a9d38452fa4623469583
Thanks,
Frederic
---
Frederic Weisbecker (37):
locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS &&
CONFIG_PROVE_LOCKI
valid_state() and print_usage*() functions are not used beyond locking
correctness checks. So move them inside the appropriate
CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING section.
Sadly the "unused function" warning wouldn't fire because valid_state()
is inline.
Signe
as it has unpredictable behaviour, depending on architecture backend.
Therefore the shift on each iteration is cut in two parts:
1) Shift by the first set bit number (can't exceed 63)
2) Shift again by 1 because __ffs64() counts from zero
Inspired-by: Linus Torvalds
Signed-off-by: Frederic
usage, lower level functions dealing with validation can expand the
struct lock_usage to a usage mask through lock_usage_mask().
For now, vector is always 0 until we get the proper vector finegrained
informations on softirq usage events.
Reviewed-by: David S. Miller
Signed-off-by: Frederic
On Wed, Feb 27, 2019 at 12:14:29PM +0100, Sebastian Andrzej Siewior wrote:
> On 2019-02-12 18:14:15 [+0100], Frederic Weisbecker wrote:
> > diff --git a/include/linux/bottom_half.h b/include/linux/bottom_half.h
> > index 240419382978..ef9e4c752f56 100644
> > --- a/includ
On Wed, Feb 27, 2019 at 12:04:04PM +0100, Sebastian Andrzej Siewior wrote:
> On 2019-02-12 18:14:14 [+0100], Frederic Weisbecker wrote:
> > __local_bh_disable_ip() is neither for strict internal use nor does it
> > require the caller to disable hardirqs. Probaby a celebrat
On Wed, Feb 27, 2019 at 10:54:10AM +0100, Sebastian Andrzej Siewior wrote:
> On 2019-02-12 18:14:02 [+0100], Frederic Weisbecker wrote:
> > --- /dev/null
> > +++ b/include/linux/softirq_vector.h
> > @@ -0,0 +1,10 @@
> could you please add a spdx header/identifier here?
Ah right, will do.
Thanks.
On Wed, Feb 13, 2019 at 11:47:13AM -0800, Linus Torvalds wrote:
> On Wed, Feb 13, 2019 at 7:16 AM Frederic Weisbecker
> wrote:
> > >
> > > If "vectors" only has the high hit set, you end up with "fs" having
> > > the value "64"
On Thu, Feb 14, 2019 at 11:33:44PM +0100, Heiner Kallweit wrote:
> On 14.02.2019 22:47, Thomas Gleixner wrote:
> > On Thu, 14 Feb 2019, Heiner Kallweit wrote:
> >> On 24.01.2019 20:37, Heiner Kallweit wrote:
>
> >>> Hi Frederic,
> >>> is the update debug patch still to come?
> >
> > Heiner,
On Tue, Feb 12, 2019 at 09:47:39AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:15 AM Frederic Weisbecker
> wrote:
> >
> >
> > +static int save_trace_mask(struct lock_class *class, u64 mask)
> > +{
> > + int bit = 0;
> > +
> > +
On Tue, Feb 12, 2019 at 09:45:52AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker
> wrote:
> >
> > +
> > + while (vectors) {
> > + long fs = __ffs64(vectors) + 1;
> > +
> > +
On Tue, Feb 12, 2019 at 09:38:42AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker
> wrote:
> >
> > +static u64 lock_usage_mask(struct lock_usage *usage)
> > +{
> > + return BIT(usage->bit);
> > +}
>
>
On Tue, Feb 12, 2019 at 09:40:09AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker
> wrote:
> >
> > The usage mask is going to expand to validate softirq related usages in
> > a per-vector finegrained way.
>
> So here you s
On Tue, Feb 05, 2019 at 07:34:31PM +0100, Denys Vlasenko wrote:
> SOFTIRQ is a counter.
> Why here:
>
> #define in_serving_softirq()(softirq_count() & SOFTIRQ_OFFSET)
> #define in_task() (!(preempt_count() & \
>(NMI_MASK | HARDIRQ_MASK |
>
__local_bh_disable_ip() is neither for strict internal use nor does it
require the caller to disable hardirqs. Probaby a celebration for ancient
behaviour.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E
ed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Peter Zijlstra
---
kernel/locking/lockdep.c
This reverts commit 9aee5f8a7e30330d0a8f4c626dc924ca5590aba5.
We are going to need the 16 high bits above in order to implement
a softirq enable mask. x86 is the only architecture that doesn't use
unsigned int to implement softirq_pending.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho
This is a usage example of spin_lock_bh_mask(). NET_RX, TIMER and
TASKLET are the three softirqs that have been reported by lockdep to
be used for this socket lock, at least on my own usecases.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
bf
Thanks,
Frederic
---
Frederic Weisbecker (32):
locking/lockdep: Use expanded masks on find_usage_*() functions
locking/lockdep: Introduce struct lock_usage
locking/lockdep: Convert usage_mask to u64
locking/lockdep: Test all incompatible scenario at once in
check
ied by
lockdep_softirq_enter/exit()
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
Cc: Pe
));
[...]
spin_unlock_bh_mask(lock, bh);
Suggested-by: Linus Torvalds
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus Torvalds
version
that won't execute do_softirq() in the end.
Clarify this straight in the name. It may help reviewers who are already
familiar with functions such as preempt_enable_no_resched().
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc
From: Frederic Weisbecker
Using the bottom-half masking APIs defined in linux/bottom-half.h won't
be possible without passing the relevant softirq vectors that are
currently defined in linux/interrupt.h
Yet we can't include linux/interrupt.h from linux/bottom-half.h due to
circular dependencies
state with NET_RX_SOFTIRQ disabled
local_bh_enable_mask(bh);
Suggested-by: Linus Torvalds
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewi
From: Frederic Weisbecker
All softirqs must be set enabled on boot.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus
ror of softirq_count() because there is no per vector masking API
yet.
When this full masking counter is non 0, all softirq vectors are
explicitly disabled.
Suggested-by: Linus Torvalds
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan
There is no need to process softirqs if none of those pending are
enabled. Check about that early to avoid unnecessary overhead.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
The common code between both versions of __local_bh_disable_ip(), whether
CONFIG_TRACE_IRQFLAGS is on or off, is going to grow up in order to
support vector masking granularity.
Merge these versions together to prepare for that.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc
Remove the old protections that prevented softirqs from interrupting any
softirq-disabled context. Now that we can disable specific vectors on
a given piece of code, we want to be able to soft-interrupt those places
with other vectors.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Expand the effective usage bit on top of the lock usage bit/vector pair
while in verbose mode logging in mark_lock().
FIXME: This only handle the first bit in the mask. We may need to
iterate over all of them.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc
Loosely handle all the softirq vectors verbosity under the same
function.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc
check to the updated semantics. We can't deduce much
from softirq_count() alone anymore except when it's 0.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian A
mark_lock_irq() is going to deal with lock usages that gather multiple
softirq vectors at once. Therefore the validation through valid_state()
will need to handle expanded usage masks.
So enhance valid_state() to that purpose.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc
| |
| |
RCU_SOFTIRQHI_SOFTIRQ bits
bits
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc
Pass the softirq vector number to lockdep on callback execution so that
we know which one is involved while holding a lock. We will then be able
to pick up the proper LOCK_USED_IN_*_SOFTIRQ index to perform the
finegrained verifications.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho
mark_lock_irq() is going to deal with lock usages that gather multiple
softirq vectors at once. Therefore the validation through
check_usage_backwards() and check_usage_forwards() will need to handle
expanded usage masks.
So enhance those functions to that purpose.
Signed-off-by: Frederic
and not for others, we may spuriously ignore all the
verifications for the new vectors.
What we must check instead is a bit different: we have to make sure that
the new usage with all its vectors are entirely present in the current
usage mask before ignoring further checks.
Signed-off-by: Frederic
We are going to save as much traces as we have softirq vectors involved
in a given usage. Expand the stack trace record code accordingly.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S
Define the softirq vectors through macros so that we can later include
them in the automated definition of lockdep usage states.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
and @lockB
If no incompatible use is found, the verification never goes beyond
step 2 which means at most two iterations.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
We are going to extend the softirq bits with an enabled vector mask.
Provide the field with a more generic name to later layout the pending
states on the lower bits and the enabled states on the higher bits.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc
We are going to need a nand version of softirq_pending_or() in order
to clear specific bits from the pending mask.
But instead of naming the mutators after their implementation, rather
name them after their high level purpose.
Suggested-by: Linus Torvalds
Signed-off-by: Frederic Weisbecker
Cc
is to provide the necessary APIs to control
the per-vector enable bits.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc: Sebastian Andrzej Siewior
Cc: Linus
From: Frederic Weisbecker
Use the subsystem as the prefix to name the __softirq_data accessors.
They are going to be extended and want a more greppable and standard
naming sheme.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan
In order to perform softirq vector-finegrained locking validation we'll
need to be able to check multiple vector usages at once. Prepare the low
level usage mask check functions for that purpose.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas
have 4 hardirq bits + NR_SOFTIRQS * 4 + 1 bit (LOCK_USED) = 45
bits. Therefore we need a 64 bits mask.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
Cc: Joel Fernandes
Cc: Thomas Gleixner
Cc: Pavan Kondeti
Cc: Paul E . McKenney
Cc: David S . Miller
Cc: Ingo Molnar
Cc
usage, lower level functions dealing with validation can expand the
struct lock_usage to a usage mask through lock_usage_mask().
For now, vector is always 0 until we get the proper vector finegrained
informations on softirq usage events.
Signed-off-by: Frederic Weisbecker
Cc: Mauro Carvalho Chehab
On Wed, Jan 23, 2019 at 06:25:26PM +1000, Nicholas Piggin wrote:
> Frederic Weisbecker's on January 17, 2019 3:54 am:
> > On Mon, Jan 14, 2019 at 04:47:45PM +1000, Nicholas Piggin wrote:
> >> We have a supercomputer site testing nohz_full to reduce jitter with
> >> good results, but they want CPU0
Commit-ID: bba2a8f1f974a45ca6ceaf688b2be7bc1c418a2f
Gitweb: https://git.kernel.org/tip/bba2a8f1f974a45ca6ceaf688b2be7bc1c418a2f
Author: Frederic Weisbecker
AuthorDate: Fri, 28 Dec 2018 06:02:01 +0100
Committer: Ingo Molnar
CommitDate: Mon, 21 Jan 2019 11:18:56 +0100
locking/lockdep
Commit-ID: 436a49ae7b693161c4fdf98b575ef16243dc2dfa
Gitweb: https://git.kernel.org/tip/436a49ae7b693161c4fdf98b575ef16243dc2dfa
Author: Frederic Weisbecker
AuthorDate: Fri, 28 Dec 2018 06:02:00 +0100
Committer: Ingo Molnar
CommitDate: Mon, 21 Jan 2019 11:18:54 +0100
locking/lockdep
On Mon, Jan 14, 2019 at 04:47:45PM +1000, Nicholas Piggin wrote:
> We have a supercomputer site testing nohz_full to reduce jitter with
> good results, but they want CPU0 to be nohz_full. That happens to be
> the boot CPU, which is disallowed by the nohz_full code.
>
> They have existing job
On Fri, Dec 28, 2018 at 12:11:12AM +0100, Heiner Kallweit wrote:
>
> # tracer: nop
> #
> # _-=> irqs-off
> # / _=> need-resched
> #| / _---=> hardirq/softirq
> #|| / _--=>
701 - 800 of 8299 matches
Mail list logo