On Wed, Jul 23, 2025 at 01:27:56PM -0700, Paul E. McKenney wrote:
> This commit adds no-trace variants of the srcu_read_lock_fast() and
> srcu_read_unlock_fast() functions for tracing use.
>
> [ paulmck: Apply notrace feedback from Joel Fernandes, Steven Rostedt, and
> Mathieu Desnoyers. ]
>
> L
On Thu, Jul 10, 2025 at 07:06:09AM -0700, Breno Leitao wrote:
> Hello Boqun,
>
> On Tue, Jun 24, 2025 at 08:11:01PM -0700, Boqun Feng wrote:
> > Erik Lundgren and Breno Leitao reported [1] a case where
> > lockdep_unregister_key() can be called from time critical code pathe
On Thu, Jul 10, 2025 at 05:56:00PM -0700, Paul E. McKenney wrote:
> On Sun, Apr 13, 2025 at 11:00:51PM -0700, Boqun Feng wrote:
> > For a general purpose hazard pointers implemenation, always busy waiting
> > is not an option. It may benefit some special workload, but overall i
On Wed, Jul 09, 2025 at 10:22:04PM +0200, Benno Lossin wrote:
[...]
> >> > > +impl Drop for SetOnce {
> >> > > +fn drop(&mut self) {
> >> > > +if self.init.load(Acquire) == 2 {
> >> > > +// SAFETY: By the type invariants of `Self`,
> >> > > `self.init ==
On Wed, Jul 09, 2025 at 08:22:16PM +0200, Benno Lossin wrote:
> On Wed Jul 9, 2025 at 12:34 PM CEST, Andreas Hindborg wrote:
> > "Benno Lossin" writes:
> >> On Tue Jul 8, 2025 at 10:54 AM CEST, Andreas Hindborg wrote:
> >>> "Boqun Feng" write
On Mon, Jul 07, 2025 at 03:38:58PM +0200, Alice Ryhl wrote:
> On Mon, Jul 7, 2025 at 3:32 PM Andreas Hindborg wrote:
> >
> > Introduce the `SetOnce` type, a container that can only be written once.
> > The container uses an internal atomic to synchronize writes to the internal
> > value.
> >
> > S
On Thu, Jun 26, 2025 at 03:16:49AM -0700, Christoph Hellwig wrote:
> On Wed, Jun 25, 2025 at 07:08:57AM -0700, Boqun Feng wrote:
> > Sure, I will put one for the future version, here is the gist:
>
> Thanks a lot!
>
> > The updater's wait can finish immediately i
On Wed, Jun 25, 2025 at 08:25:52AM -0400, Mathieu Desnoyers wrote:
> On 2025-06-24 23:10, Boqun Feng wrote:
> > Hi,
> >
> > This is the official first version of simple hazard pointers following
> > the RFC:
> >
> >
> > https://lore.ke
On Wed, Jun 25, 2025 at 03:56:05PM +0200, Frederic Weisbecker wrote:
> Le Tue, Jun 24, 2025 at 08:10:57PM -0700, Boqun Feng a écrit :
> > +static void synchronize_shazptr_normal(void *ptr)
> > +{
> > + int cpu;
> > + unsigned long blocking_grp_mask = 0;
> > +
On Wed, Jun 25, 2025 at 05:05:11AM -0700, Christoph Hellwig wrote:
> On Tue, Jun 24, 2025 at 08:10:53PM -0700, Boqun Feng wrote:
> > Hi,
> >
> > This is the official first version of simple hazard pointers following
> > the RFC:
>
> Can you please put an explan
On Wed, Jun 25, 2025 at 11:52:04AM -0400, Waiman Long wrote:
[...]
> > +/*
> > + * Acquire a hazptr slot and begin the hazard pointer critical section.
> > + *
> > + * Must be called with preemption disabled, and preemption must remain
> > disabled
> > + * until shazptr_clear().
> > + */
> > +stat
On Wed, Jun 25, 2025 at 10:25:23AM -0400, Mathieu Desnoyers wrote:
> On 2025-06-24 23:10, Boqun Feng wrote:
> [...]
> > +
> > +static inline void shazptr_clear(struct shazptr_guard guard)
> > +{
> > + /* Only clear the slot when the outermost guard is
On Wed, Jun 25, 2025 at 01:59:29PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 24, 2025 at 08:11:01PM -0700, Boqun Feng wrote:
>
> > + /* Need preemption disable for using shazptr. */
> > + guard(preempt)();
> > +
> > + /* Protect the list search with sha
Add the refscale test for shazptr to measure the reader side
performance.
Signed-off-by: Boqun Feng
---
kernel/rcu/refscale.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index f11a7c2af778
For synchronization mechanisms similar to RCU, there could be no "grace
period" concept (e.g. hazard pointers), therefore allow
rcu_scale_ops::get_gp_seq to be a NULL pointer for these cases, and
simply treat started and finished grace period as 0.
Signed-off-by: Boqun Feng
---
shazptr here can achieve the
same/better synchronization time without the need to send IPI. Hence use
shazptr here.
Reported-by: Erik Lundgren
Reported-by: Breno Leitao
Link:
https://lore.kernel.org/all/20250321-lockdep-v1-1-78b732d19...@debian.org/ [1]
Signed-off-by: Boqun Feng
---
kernel
Add two rcu_scale_ops to include tests from simple hazard pointers
(shazptr). One is with evenly distributed readers, and the other is with
all WILDCARD readers. This could show the best and worst case scenarios
for the synchronization time of simple hazard pointers.
Signed-off-by: Boqun Feng
synchronize_shaptr().
Signed-off-by: Boqun Feng
---
kernel/locking/shazptr.c | 28 +---
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/kernel/locking/shazptr.c b/kernel/locking/shazptr.c
index a8559cb559f8..b3f7e8390eb2 100644
--- a/kernel/locking/shazptr.c
gned-off-by: Boqun Feng
---
kernel/locking/shazptr.c | 277 ++-
1 file changed, 276 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/shazptr.c b/kernel/locking/shazptr.c
index 991fd1a05cfd..a8559cb559f8 100644
--- a/kernel/locking/shazptr.c
+++ b/kernel
Add the refscale test for shazptr, which starts another shazptr critical
section inside an existing one to measure the reader side performance
when wildcard logic is triggered.
Signed-off-by: Boqun Feng
---
kernel/rcu/refscale.c | 40 +++-
1 file changed, 39
p. 491-504, June 2004
Link:
https://lore.kernel.org/lkml/20240917143402.930114-1-boqun.f...@gmail.com/ [2]
Signed-off-by: Boqun Feng
---
include/linux/shazptr.h | 73
kernel/locking/Makefile | 2 +-
kernel/locking/shazptr.c | 29
3
od duration: 600.214
Maximum grace-period duration: 4126.94
Boqun Feng (8):
Introduce simple hazard pointers
shazptr: Add refscale test
shazptr: Add refscale test for wildcard
shazptr: Avoid synchronize_shaptr() busy waiting
shazptr: Allow skip self scan in synchronize_shaptr
On Thu, Jun 12, 2025 at 07:46:12PM +0200, Uladzislau Rezki wrote:
> On Thu, Jun 12, 2025 at 10:30:38AM -0700, Boqun Feng wrote:
> >
> >
> > On Tue, Jun 10, 2025, at 12:33 PM, Joel Fernandes wrote:
> > > On 6/10/2025 1:34 PM, Uladzislau Rezki (Sony) wrote:
> >
On Thu, Jun 12, 2025, at 10:30 AM, Boqun Feng wrote:
> On Tue, Jun 10, 2025, at 12:33 PM, Joel Fernandes wrote:
>> On 6/10/2025 1:34 PM, Uladzislau Rezki (Sony) wrote:
>>> Currently the call_rcu() API does not check whether a callback
>>> pointer is NULL. If NULL is
inter dereference and a kernel crash.
>>
>> To prevent this and improve debuggability, this patch adds a check
>> for NULL and emits a kernel stack trace to help identify a faulty
>> caller.
>>
>> Signed-off-by: Uladzislau Rezki (Sony)
>
> Reviewed-by:
On Wed, Jun 11, 2025 at 09:16:05AM -0700, Paul E. McKenney wrote:
> On Wed, Jun 11, 2025 at 09:05:06AM -0700, Boqun Feng wrote:
> > On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote:
> > > During rcu_read_unlock_special(), if this happens during irq_exit(), we
>
On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote:
> During rcu_read_unlock_special(), if this happens during irq_exit(), we
> can lockup if an IPI is issued. This is because the IPI itself triggers
> the irq_exit() path causing a recursive lock up.
>
> This is precisely what Xiongfen
On Tue, Jun 10, 2025 at 01:26:46AM +0200, Frederic Weisbecker wrote:
> Le Mon, Jun 09, 2025 at 12:49:06PM -0700, Boqun Feng a écrit :
> > Hi Joel,
> >
> > On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote:
> > > During rcu_read_unlock_special(), if this
Hi Joel,
On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote:
> During rcu_read_unlock_special(), if this happens during irq_exit(), we
> can lockup if an IPI is issued. This is because the IPI itself triggers
> the irq_exit() path causing a recursive lock up.
>
> This is precisely wha
On Mon, May 05, 2025 at 02:02:09PM +0800, David Gow wrote:
> On Sat, 3 May 2025 at 05:51, Miguel Ojeda wrote:
> >
> > Currently, return values of KUnit `#[test]` functions are ignored.
> >
> > Thus introduce support for `-> Result` functions by checking their
> > returned values.
> >
> > At the sa
e asm therefore the
compiler barrier should be implemented in inline asm as well.
Signed-off-by: Boqun Feng
---
rust/helpers/barrier.c | 18 ++
rust/helpers/helpers.c | 1 +
rust/kernel/sync.rs | 1 +
rust/kernel/sync/barrier.rs | 67 +++
]
Link: https://github.com/nbdd0121/field-projection [3]
Link: https://kangrejos.com/2023 [4]
Signed-off-by: Boqun Feng
---
rust/kernel/sync/rcu.rs | 275 +++-
1 file changed, 274 insertions(+), 1 deletion(-)
diff --git a/rust/kernel/sync/rcu.rs b/rust/ke
the `AllowAtomic` trait to
include a customized `Send` semantics, that is: `impl AllowAtomic` has
to be safe to be transferred across thread boundaries.
Suggested-by: Alice Ryhl
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic.rs | 24
rust/kernel/sync/atomi
ue.
We can either take the approach in the current patch and add byte_add()
later on if needed, or start with ptr_add() and byte_add() naming.
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic.rs | 29 +
1 file changed, 29 insertions(+)
diff --git a/rust/kerne
if inline helpers are not available.
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic.rs | 71 ++
1 file changed, 71 insertions(+)
diff --git a/rust/kernel/sync/atomic.rs b/rust/kernel/sync/atomic.rs
index d197b476e3bc..6008d65594a2 100644
--- a/rust
Add generic atomic support for basic unsigned types that have an
`AtomicImpl` with the same size and alignment.
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic.rs | 80 ++
1 file changed, 80 insertions(+)
diff --git a/rust/kernel/sync/atomic.rs b/rust
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic/generic.rs | 102 +
1 file changed, 102 insertions(+)
diff --git a/rust/kernel/sync/atomic/generic.rs
b/rust/kernel/sync/atomic/generic.rs
index 73aacfac381b..2de4cdbce58e 100644
--- a/rust/kernel/sync/atomic/generic.
ich must be
exclusive to the function, therefore it's unsafe to use some shared
pointer. But maybe I'm missing something?
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic/generic.rs | 122 +
1 file changed, 122 insertions(+)
diff --git a/rust/kernel/syn
mature enough (unless the implementer is a
`#[repr(transparent)]` new type).
`AtomicImpl` types are automatically `AllowAtomic`, and so far only
basic operations load() and store() are introduced.
Signed-off-by: Boqun Feng
---
rust/kernel/sync/atomic.rs | 2 +
rust/kernel/sync/atomic
variants an
operation has, and it also make it easier to unify the implementation of
all ordering variants in one method via generic. The `IS_RELAXED` and
`ORDER` associate consts are for generic function to pick up the
particular implementation specified by an ordering annotation.
Signed-off-by
: Boqun Feng
---
rust/helpers/atomic.c | 1038 +
rust/helpers/helpers.c|1 +
scripts/atomic/gen-atomics.sh |1 +
scripts/atomic/gen-rust-atomic-helpers.sh | 65 ++
4 files changed, 1105 insertions(+)
create mode
models and data races.
Also bump my role to the maintainer of ATOMIC INFRASTRUCTURE to reflect
my responsiblity on the Rust atomic mod.
Signed-off-by: Boqun Feng
---
MAINTAINERS| 4 +-
rust/kernel/sync.rs| 1 +
rust/kernel/sync/atomic.rs | 19
rust/kernel
from Alice Ryhl.
I'm hoping to at least get the first 8 patches (atomic operations on
normal integer) in a good shape so that we can have them in v6.16.
Thanks!
Regards,
Boqun
Boqun Feng (12):
rust: Introduce atomic API helpers
rust: sync: Add basic atomic operation mapping framework
rus
On Sat, Nov 02, 2024 at 03:35:36PM +0800, David Gow wrote:
> On Fri, 1 Nov 2024 at 14:04, Boqun Feng wrote:
> >
> > Hi,
> >
> > This is another RFC version of LKMM atomics in Rust, you can find the
> > previous versions:
> >
> > v1
p. 491-504, June 2004
Link:
https://lore.kernel.org/lkml/20240917143402.930114-1-boqun.f...@gmail.com/ [2]
Signed-off-by: Boqun Feng
---
include/linux/shazptr.h | 73
kernel/locking/Makefile | 2 +-
kernel/locking/shazptr.c | 29
3
Add two rcu_scale_ops to include tests from simple hazard pointers
(shazptr). One is with evenly distributed readers, and the other is with
all WILDCARD readers. This could show the best and worst case scenarios
for the synchronization time of simple hazard pointers.
Signed-off-by: Boqun Feng
shazptr here can achieve the
same/better synchronization time without the need to send IPI. Hence use
shazptr here.
Reported-by: Erik Lundgren
Reported-by: Breno Leitao
Link:
https://lore.kernel.org/lkml/20250321-lockdep-v1-1-78b732d19...@debian.org/
Signed-off-by: Boqun Feng
---
kernel/locking
For synchronization mechanisms similar to RCU, there could be no "grace
period" concept (e.g. hazard pointers), therefore allow
rcu_scale_ops::get_gp_seq to be a NULL pointer for these cases, and
simply treat started and finished grace period as 0.
Signed-off-by: Boqun Feng
---
Add the refscale test for shazptr, which starts another shazptr critical
section inside an existing one to measure the reader side performance
when wildcard logic is triggered.
Signed-off-by: Boqun Feng
---
kernel/rcu/refscale.c | 40 +++-
1 file changed, 39
synchronize_shaptr().
Signed-off-by: Boqun Feng
---
kernel/locking/shazptr.c | 28 +---
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/kernel/locking/shazptr.c b/kernel/locking/shazptr.c
index a8559cb559f8..b3f7e8390eb2 100644
--- a/kernel/locking/shazptr.c
Add the refscale test for shazptr to measure the reader side
performance.
Signed-off-by: Boqun Feng
---
kernel/rcu/refscale.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index f11a7c2af778
gned-off-by: Boqun Feng
---
kernel/locking/shazptr.c | 277 ++-
1 file changed, 276 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/shazptr.c b/kernel/locking/shazptr.c
index 991fd1a05cfd..a8559cb559f8 100644
--- a/kernel/locking/shazptr.c
+++ b/kernel
faster, so please take a look in case I'm missing
something ;-) Thanks!
The patchset is based on v6.15-rc1.
Boqun Feng (8):
Introduce simple hazard pointers
shazptr: Add refscale test
shazptr: Add refscale test for wildcard
shazptr: Avoid synchronize_shaptr() busy waiting
shazptr: Allow
Hi Linus,
Please pull the following RCU fixes:
The following changes since commit 467c890f2d1ad6de9fd1dbd196fdc8f3ee63190a:
Merge branches 'docs.2025.02.04a', 'lazypreempt.2025.03.04a',
'misc.2025.03.04a', 'srcu.2025.02.05a' and 'torture.2025.02.05a' (2025-03-04
18:47:32 -0800)
are availabl
On Fri, Mar 21, 2025 at 10:28:06AM +0800, David Gow wrote:
[...]
> > Anyway, KUnit `#[test]`s are in -- I was not planning to merge this
> > now anyway, it should be reviewed a bit more.
>
I agree this whole series should wait a bit, but do we want to merge
patch #1 as early as possible (maybe ri
cu: handle unstable rdp in rcu_read_unlock_strict()
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
osnoise: provide quiescent states
rcu: limit PREEMPT_RCU configurations
Boqun Feng (2):
rcutorture: Update ->extendables check for lazy preemption
On Wed, Feb 19, 2025 at 07:43:08AM -0500, Joel Fernandes wrote:
> poll_state_synchronize_srcu() uses rcu_seq_done() unlike
> poll_state_synchronize_rcu() which uses rcu_seq_done_exact().
>
> The rcu_seq_done_exact() makes more sense for polling API, as with
> this API, there is a higher chance th
On Sun, Feb 16, 2025 at 06:29:54PM -0800, Boqun Feng wrote:
> Hi Yongliang,
>
> On Sun, Feb 16, 2025 at 04:41:09PM +0800, Yongliang Gao wrote:
> > From: Yongliang Gao
> >
> > When counting the number of hardirqs in the x86 architecture,
> > it is essential t
ot;)
Signed-off-by: Uladzislau Rezki (Sony)
Reviewed-by: Paul E. McKenney
Link: https://lore.kernel.org/r/20250227131613.52683-3-ure...@gmail.com
Signed-off-by: Boqun Feng
---
include/linux/rcupdate_wait.h | 3 +++
kernel/rcu/tree.c | 8 +++-
2 files changed, 6 insertions(+), 5 dele
y
Signed-off-by: Uladzislau Rezki (Sony)
Link: https://lore.kernel.org/r/20250227131613.52683-2-ure...@gmail.com
Signed-off-by: Boqun Feng
---
tools/testing/selftests/rcutorture/configs/rcu/TREE05.boot | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/rcutorture/
egative it will
be adjusted to num_online_cpus() during torture initialization.
Reviewed-by: Paul E. McKenney
Signed-off-by: Uladzislau Rezki (Sony)
Link: https://lore.kernel.org/r/20250227131613.52683-1-ure...@gmail.com
Signed-off-by: Boqun Feng
---
kernel/rcu/rcutorture.c | 22 --
-4f19-bdda-cf50b9314832@paulmck-laptop
Signed-off-by: Boqun Feng
---
include/linux/printk.h | 6 ++
kernel/printk/printk.c | 4 +---
kernel/reboot.c| 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 42
nk:
https://lore.kernel.org/r/bd911cd9-1fe9-447c-85e0-ea811a1dc896@paulmck-laptop
Signed-off-by: Boqun Feng
---
kernel/context_tracking.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 938c48952d26..fb5be6e9b
t for the next grace period to start) both have parenthesized
grace-period sequence numbers.
Signed-off-by: Paul E. McKenney
Signed-off-by: Boqun Feng
---
kernel/rcu/tree_nocb.h | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/kernel/rcu/tree_nocb.
b9b-8a69-95336e74e8f4@paulmck-laptop/
[1]
Link: https://lore.kernel.org/rcu/20250303001507.GA3994772@joelnvbox/ [2]
Link: https://lore.kernel.org/rcu/Z8bcUsZ9IpRi1QoP@pc636/ [3]
Reviewed-by: Joel Fernandes
Signed-off-by: Boqun Feng
---
kernel/rcu/rcu.h | 2 +-
kernel/rcu/tree.c | 15 +++-
: Zilin Guan
Signed-off-by: Paul E. McKenney
Signed-off-by: Boqun Feng
---
kernel/rcu/tree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 475f31deed14..e4c0ce600b2b 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.
Hi,
Please find the upcoming miscellaneous RCU changes. The changes can also
be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git
misc.2025.03.04a
Regards,
Boqun
Paul E. McKenney (6):
rcu: Split rcu_report_exp_cpu_mult() mask parameter and use for
tracing
rc
From: "Paul E. McKenney"
This commit renames the rcu_report_exp_cpu_mult() function from "mask"
to "mask_in" and introduced a "mask" local variable to better support
upcoming event-tracing additions.
Signed-off-by: Paul E. McKenney
Cc: Freder
On Tue, Mar 04, 2025 at 11:56:18AM +0100, Uladzislau Rezki wrote:
> On Tue, Mar 04, 2025 at 11:52:26AM +0100, Uladzislau Rezki wrote:
> > > > Did I get that right?
> > > >
> > >
> > > Other than I'm unable to follow what do you mean "WH has not been
> > > injected, so nothing to wait on", maybe b
On Sun, Mar 02, 2025 at 07:15:07PM -0500, Joel Fernandes wrote:
> On Fri, Feb 28, 2025 at 05:08:49PM -0800, Paul E. McKenney wrote:
> > On Fri, Feb 28, 2025 at 11:59:55AM -0800, Paul E. McKenney wrote:
> > > On Fri, Feb 28, 2025 at 08:12:51PM +0100, Uladzislau Rezki wrote:
> > > > Hello, Paul!
> >
On Mon, Mar 03, 2025 at 12:00:40PM -0500, Joel Fernandes wrote:
[...]
>
> I see the original patch "rcu: Fix get_state_synchronize_rcu_full() GP-start
> detection" is not yet on -next. Once we are convinced about the fix, do we
> want to squash the fix into this patch and have Boqun take it?
>
W
or kernels built with CONFIG_PROVE_RCU=y, which use the polled
grace-period APIs, which can and do complain bitterly when this sequence
of events occurs. Not only that, there might be some future RCU
grace-period mechanism that pulls this sequence of events from theory
into practice. This commit
On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote:
> On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote:
> > Hi Ulad,
> >
> > I put these three patches into next (and misc.2025.02.27a) for some
> > testing, hopefully it all goes well and they ca
Hi Ulad,
I put these three patches into next (and misc.2025.02.27a) for some
testing, hopefully it all goes well and they can make it v6.15.
A few tag changed below:
On Thu, Feb 27, 2025 at 02:16:13PM +0100, Uladzislau Rezki (Sony) wrote:
> Switch for using of get_state_synchronize_rcu_full() an
On Wed, Feb 26, 2025 at 09:48:52PM +0100, Uladzislau Rezki wrote:
> Hello, Boqun.
>
> > Hi Ulad,
> >
> > On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote:
> > > Switch for using of get_state_synchronize_rcu_full() and
> > > poll_state_synchronize_rcu_full() pair for debug a
Hi Ulad,
On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote:
> Switch for using of get_state_synchronize_rcu_full() and
> poll_state_synchronize_rcu_full() pair for debug a normal
> synchronize_rcu() call.
>
> Just using "not" full APIs to identify if a grace period
> is pass
this trick to fold srcu_read_lock_nmisafe()
into srcu_read_lock(), but this would need careful thought, review,
and performance analysis. Though those smp_mb() calls might well make
performance a non-issue.
Reported-by: Alexei Starovoitov
Signed-off-by: Paul E. McKenney
Signed-off-by:
tov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index a0df80baaccf..317eab82a5f0 100644
--- a/include/lin
by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 34 ++
1 file changed, 34 insertions(+)
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 317eab82a5f0..900b0d5c0
igned-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 10 +-
include/linux/srcutiny.h | 3 +++
include/linux/srcutree.h | 1 +
3 files changed, 5 insertions(+),
pdates the srcu_read_unlock_lite()
kernel-doc header to say that its idx parameter must be obtained
from srcu_read_lock_lite() and the srcu_read_unlock_nmisafe()
kernel-doc header to say that its idx parameter must be obtained from
srcu_read_lock_nmisafe().
Signed-off-by: Paul E. McKenney
Signed-off
. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 47 ++--
include/linux/srcutiny.h | 22 +++
include/linux/srcut
as an RCU
acceptance test.
Signed-off-by: Paul E. McKenney
Signed-off-by: Boqun Feng
---
tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P.boot
b/tools/testing/selftests/rcutorture/c
Overstreet
Cc:
Signed-off-by: Boqun Feng
---
kernel/rcu/refscale.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
index 1b47376acdc4..f11a7c2af778 100644
--- a/kernel/rcu/refscale.c
+++ b/
street
Cc:
Signed-off-by: Boqun Feng
---
kernel/rcu/rcutorture.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 1d2de50fb5d6..1bd3eaa0b8e7 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -677,6 +677,7 @@ s
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcutree.h | 9 -
kernel/rcu/srcutree.c| 4 ++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/linux/srcutree.h b/include/linux/
[ paulmck: Apply kernel test robot feedback. ]
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcutree.h | 9 -
kernel/rcu/srcutree.c| 6 ++
2 files c
assert_held() to srcu_get_delay() itself.
Reported-by: syzbot+16a19b06125a2963e...@syzkaller.appspotmail.com
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
kernel/rcu/srcutree.c | 11 ++-
1
From: "Paul E. McKenney"
This commit makes Tree SRCU updates independent of ->srcu_idx, then
drop ->srcu_idx.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux
e addition of the _fast() flavor
of SRCU will change that.
Signed-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 3 +++
kernel/rcu/srcutree.c | 6 +++---
2 files changed, 6
ned-off-by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 2 +-
include/linux/srcutiny.h | 2 +-
include/linux/srcutree.h | 10 ++
3 files changed, 8 insertions(+), 6
Z qiang
Signed-off-by: Paul E. McKenney
Tested-by: kernel test robot
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcutree.h | 9 +
kernel/rcu/srcutree.c| 23 +--
2 f
nney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcutree.h | 13 +++--
kernel/rcu/srcutree.c| 115 +++
2 files changed, 66 insertions(+), 62 deletions(-)
diff --git
by: Paul E. McKenney
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
kernel/rcu/rcutorture.c | 2 ++
kernel/rcu/srcutree.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/rcutorture.c b
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
include/linux/srcu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index d7ba46e74f58..f6f779b9d9ff 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -47,7 +4
mptibility, primarily
surrounding its interaction with rcutorture and early boot.
Signed-off-by: Paul E. McKenney
Cc: Ankur Arora
Cc: Alexei Starovoitov
Cc: Andrii Nakryiko
Cc: Peter Zijlstra
Cc: Kent Overstreet
Cc:
Signed-off-by: Boqun Feng
---
kernel/rcu/rcu.h | 9 ++---
kernel/rcu/
Hi,
Please find the upcoming changes in SRCU for v6.15. The changes can also
be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git
srcu.2025.02.05a
Regards,
Boqun
Paul E. McKenney (20):
srcu: Make Tiny SRCU able to operate in preemptible kernels
srcu: Define SRCU
> R: Daniel Lustig
> > -R: Joel Fernandes
> > +R: Joel Fernandes
> > L: linux-kernel@vger.kernel.org
> > L: linux-a...@vger.kernel.org
> > L: l...@lists.linux.dev
> > @@ -19671,7 +19671,7 @@ READ-COPY UPDATE (RCU)
> > M: "Paul E. McKenney"
> > M: Frederic Weisbecker (kernel/rcu/tree_nocb.h)
> > M: Neeraj Upadhyay (kernel/rcu/tasks.h)
> > -M: Joel Fernandes
> > +M: Joel Fernandes
> > M: Josh Triplett
> > M: Boqun Feng
> > M: Uladzislau Rezki
> > --
> > 2.34.1
> >
Hi Yongliang,
On Sun, Feb 16, 2025 at 04:41:09PM +0800, Yongliang Gao wrote:
> From: Yongliang Gao
>
> When counting the number of hardirqs in the x86 architecture,
> it is essential to add arch_irq_stat_cpu to ensure accuracy.
>
> For example, a CPU loop within the rcu_read_lock function.
>
>
Hi Tamir,
On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote:
> Convert this unit test to a KUnit test.
>
I would like to know the pros and cons between kunit tests and
kselftests, maybe someone Cced can answer that? It'll be good to put
these in the commit log as well.
Regards,
B
1 - 100 of 1122 matches
Mail list logo