Re: [PATCH v3 5/4] srcu: Document __srcu_read_{,un}lock_fast() implicit RCU readers

2025-07-23 Thread Joel Fernandes
On 7/23/2025 9:32 AM, joelagn...@nvidia.com wrote: > > >> On Jul 22, 2025, at 6:17 PM, Paul E. McKenney wrote: >> >> This commit documents the implicit RCU readers that are implied by the >> this_cpu_inc() and atomic_long_inc() operations in __srcu_read_lock_fast() >> and __srcu_read_unlock_

Re: [PATCH] rcu: Fix delayed execution of hurry callbacks

2025-07-23 Thread Joel Fernandes
trace logs, identified the root cause, >> > and >> > proposed this upstream change. >> > >> > Cheng-Jui Wang: >> > Provided many valuable suggestions during the debugging process, >> > repeatedly found breakthroughs when we were stuck, and helped >> > identify >> > the root cause. >> > >> > Lorry Luo: >> > Assisted in verifying whether rcu-hurry-callback was executed too >> > long >> > or deferred, supported with testing, and helped with communication. >> > >> > Weiyangyang: >> > Main tester who discovered the regression scenario, confirmed that >> > enabling CONFIG_LAZY_RCU caused the regression, and verified that >> > this >> > patch resolves the issue >> >> Nice team work :-) >> > Thanks :) >> > >> > Note: >> > With my limited understanding of lazy RCU, I am not fully confident >> > that >> > this is a real issue. In my opinion, hurry callbacks should not be >> > delayed by other events such as firstBQ trace event. >> > If my understanding is incorrect, I would greatly appreciate any >> > guidance or clarification from the maintainers. >> >> Your understanding looks quite right! >> > Glad to know I was on the right track. > >> Reviewed-by: Frederic Weisbecker >> >> Since the issue is there for 3 years now and was introduced with >> the CONFIG_LAZY_RCU new feature, it can probably wait a few weeks >> for the next merge window. Nice, thanks! Reviewed-by: Joel Fernandes I suggest let us add the Fixes tag too so that stable gets it. thanks, - Joel

Re: [PATCH v3 5/4] srcu: Document __srcu_read_{,un}lock_fast() implicit RCU readers

2025-07-23 Thread Joel Fernandes
> On Jul 22, 2025, at 6:17 PM, Paul E. McKenney wrote: > > This commit documents the implicit RCU readers that are implied by the > this_cpu_inc() and atomic_long_inc() operations in __srcu_read_lock_fast() > and __srcu_read_unlock_fast(). While in the area, fix the documentation > of the mem

Re: [PATCH -next] rcu: docs: Requirements.rst: Abide by conventions of kernel documentation

2025-07-23 Thread Joel Fernandes
x27;t use rust doc's > dialect of ``. > - Instead of emphasizing headings by **strong emphasis**, use sub-level > title adornments, in this case "^^" and make them proper > sub-sections under "Hotplug CPU". > > Signed-off-by:

Re: [PATCH v3 3/4] srcu: Add guards for notrace variants of SRCU-fast readers

2025-07-22 Thread Joel Fernandes
On Mon, Jul 21, 2025 at 09:24:32AM -0700, Paul E. McKenney wrote: > This adds the usual scoped_guard(srcu_fast_notrace, &my_srcu) and > guard(srcu_fast_notrace)(&my_srcu). > > Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes thanks, - Joel > Cc: Mathieu

Re: [PATCH v3 2/4] srcu: Add srcu_read_lock_fast_notrace() and srcu_read_unlock_fast_notrace()

2025-07-22 Thread Joel Fernandes
or more information. > + */ > +static inline struct srcu_ctr __percpu *srcu_read_lock_fast_notrace(struct > srcu_struct *ssp) > + __acquires(ssp) Should these also be marked with 'notrace' attribute? I am not sure what the precedent is, I do see a few examples of 'notrace' and

Re: [PATCH v3 1/4] srcu: Move rcu_is_watching() checks to srcu_read_{,un}lock_fast()

2025-07-22 Thread Joel Fernandes
ad_lock_fast() and srcu_read_unlock_fast(). This commit therefore > moves these checks to srcu_read_lock_fast(), srcu_read_unlock_fast(), > srcu_down_read_fast(), and srcu_up_read_fast(). > > Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes thanks, - Joel > Cc: Math

Re: [PATCH v4 0/6] binder: Set up KUnit tests for alloc

2025-07-21 Thread Joel Fernandes
binder: Convert binder_alloc selftests to KUnit > binder: encapsulate individual alloc test cases Looks good to me! And I learnt a bunch of kunit from reading this too. :) Reviewed-by: Joel Fernandes - Joel

Re: [PATCH -next 0/6] Patches for v6.17

2025-07-21 Thread Joel Fernandes
> On Jul 21, 2025, at 12:29 AM, Neeraj upadhyay wrote: > > Hi, > > On Sun, Jul 20, 2025 at 10:01 AM Akira Yokosawa wrote: > > ... > >> There seems to be a couple of issues in the S-O-B chains of commits listed >> below (in rcu/next): >> >> * dcf1668449c9 ("rcu: Document GP init vs hotplu

[PATCH -next 6/6] [please squash] fixup! rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-15 Thread Joel Fernandes
Please squash few comment-related changes courtesy of review from Frederic. Signed-off-by: Joel Fernandes --- kernel/rcu/tree.h| 10 ++ kernel/rcu/tree_plugin.h | 7 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h

[PATCH -next 2/6] rcu: Refactor expedited handling check in rcu_read_unlock_special()

2025-07-15 Thread Joel Fernandes
: Joel Fernandes --- kernel/rcu/tree_plugin.h | 83 +++- 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 1ee0d34ec333..ffe6eb5d8e34 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu

[PATCH -next 1/6] smp: Document preemption and stop_machine() mutual exclusion

2025-07-15 Thread Joel Fernandes
by: Paul E. McKenney Co-developed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes --- kernel/smp.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 974f3a3962e8..23d51a8e582d 100644 --- a/kernel/smp.c +++ b/ke

[PATCH -next 0/6] Patches for v6.17

2025-07-15 Thread Joel Fernandes
Just a repost of patches with tags, for our consideration into v6.17. All have tags, and the last commit is a fixup for the deadloop patch which can be squashed into the original patch. Joel Fernandes (6): smp: Document preemption and stop_machine() mutual exclusion rcu: Refactor expedited

Re: commit 3284e4adca9b causes hang on boot with CONFIG_PREEMPT_RT=y

2025-07-11 Thread Joel Fernandes
On 7/11/2025 7:00 PM, Bert Karwatzki wrote: > When booting linux next-20250711 (with CONFIG_PREEMPT_RT=y) on my MSI Alpha > 15 > Laptop running debian sid amd64 the boot process hangs with the last > messages displayed on screen being: > > fbcon: amdgpudrmfb (fb0) is primary device > Console

Re: [PATCH -rcu -next 4/7] rcu: Remove redundant check for irq state during unlock

2025-07-11 Thread Joel Fernandes
On 7/11/2025 1:18 PM, Paul E. McKenney wrote: > On Fri, Jul 11, 2025 at 12:30:08PM -0400, Joel Fernandes wrote: >> >> >> On 7/10/2025 8:00 PM, Paul E. McKenney wrote: >>> On Tue, Jul 08, 2025 at 10:22:21AM -0400, Joel Fernandes wrote: >>>> The ch

Re: [PATCH -rcu -next 4/7] rcu: Remove redundant check for irq state during unlock

2025-07-11 Thread Joel Fernandes
On 7/11/2025 12:30 PM, Joel Fernandes wrote: > > > On 7/10/2025 8:00 PM, Paul E. McKenney wrote: >> On Tue, Jul 08, 2025 at 10:22:21AM -0400, Joel Fernandes wrote: >>> The check for irqs_were_disabled is redundant in >>> rcu_unlock_needs_exp_handling() as t

Re: [PATCH -rcu -next 4/7] rcu: Remove redundant check for irq state during unlock

2025-07-11 Thread Joel Fernandes
On 7/10/2025 8:00 PM, Paul E. McKenney wrote: > On Tue, Jul 08, 2025 at 10:22:21AM -0400, Joel Fernandes wrote: >> The check for irqs_were_disabled is redundant in >> rcu_unlock_needs_exp_handling() as the caller already checks for this. >> This includes the boost case as

Re: [PATCH rcu 5/5] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-10 Thread Joel Fernandes
On 7/9/2025 8:48 AM, Frederic Weisbecker wrote: > Le Wed, Jul 09, 2025 at 04:11:18PM +0530, neeraj.upadh...@kernel.org a écrit : >> From: Joel Fernandes >> >> During rcu_read_unlock_special(), if this happens during irq_exit(), we >> can lockup if an IPI is issu

[PATCH -rcu -next 2/7] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-08 Thread Joel Fernandes
need_qs, true); + rcu_read_unlock(); + Reported-by: Xiongfeng Wang Closes: https://lore.kernel.org/all/9acd5f9f-6732-7701-6880-4b51190aa...@huawei.com/ Tested-by: Qi Xi Signed-off-by: Joel Fernandes --- kernel/rcu/tree.h| 11 ++- kernel/rcu/tree_plugin.h | 23 +

[PATCH -rcu -next 4/7] rcu: Remove redundant check for irq state during unlock

2025-07-08 Thread Joel Fernandes
rcu_unlock_needs_exp_handling() function, as the conditions became more easier to read. Signed-off-by: Joel Fernandes --- kernel/rcu/tree_plugin.h | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index e20c17163c13

[PATCH -rcu -next 3/7] rcu: Refactor expedited handling check in rcu_read_unlock_special()

2025-07-08 Thread Joel Fernandes
Extract the complex expedited handling condition in rcu_read_unlock_special() into a separate function rcu_unlock_needs_exp_handling() with detailed comments explaining each condition. This improves code readability. No functional change intended. Signed-off-by: Joel Fernandes --- kernel/rcu

[PATCH -rcu -next 1/7] smp: Document preemption and stop_machine() mutual exclusion

2025-07-08 Thread Joel Fernandes
by: Paul E. McKenney Co-developed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes --- Just reduced LOC of that first paragraph by indent, and some minor nits from Peter. Removed the comments in stop machine and kept few comments in smp.c. kernel/smp.c | 26 +- 1 file c

Re: [PATCH v2] smp: Document preemption and stop_machine() mutual exclusion

2025-07-08 Thread Joel Fernandes
On 7/8/2025 3:21 AM, Peter Zijlstra wrote: > On Mon, Jul 07, 2025 at 10:19:52AM -0400, Joel Fernandes wrote: > >> From: Joel Fernandes >> Subject: [PATCH] smp: Document preemption and stop_machine() mutual exclusion >> >> Recently while revising RCU'

Re: [PATCH RFC 1/3] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-07 Thread Joel Fernandes
On 7/7/2025 10:04 AM, Paul E. McKenney wrote: > On Mon, Jul 07, 2025 at 01:26:56PM +, qiang.zh...@linux.dev wrote: >>> >>> Signed-off-by: Joel Fernandes >>> >>> --- >>> >>> kernel/rcu/tree.h | 11 ++- >>> >>&

Re: [PATCH v2] smp: Document preemption and stop_machine() mutual exclusion

2025-07-07 Thread Joel Fernandes
On Mon, Jul 07, 2025 at 09:50:50AM +0200, Peter Zijlstra wrote: > On Sat, Jul 05, 2025 at 01:23:27PM -0400, Joel Fernandes wrote: > > Recently while revising RCU's cpu online checks, there was some discussion > > around how IPIs synchronize with hotplug. > > >

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-07-06 Thread Joel Fernandes
- Joel > > > Best regards, > > Qi > > > On 2025/7/5 21:12, Joel Fernandes wrote: >> On Thu, Jul 03, 2025 at 09:04:31AM +0800, Xiongfeng Wang wrote: >>> >>> On 2025/7/3 1:24, Joel Fernandes wrote: >>>> >>>> On 7/2/202

Re: [PATCH RFC 2/3] rcu: Refactor expedited handling check in rcu_read_unlock_special()

2025-07-06 Thread Joel Fernandes
Hi Paul, On 7/6/2025 1:18 PM, Paul E. McKenney wrote: > On Sat, Jul 05, 2025 at 04:39:16PM -0400, Joel Fernandes wrote: >> Extract the complex expedited handling condition in rcu_read_unlock_special() >> into a separate function rcu_unlock_needs_exp_handling() with detailed >>

Re: [PATCH RFC 1/3] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-06 Thread Joel Fernandes
> On Jul 6, 2025, at 1:26 PM, Paul E. McKenney wrote: > > On Sun, Jul 06, 2025 at 01:13:31PM -0400, Joel Fernandes wrote: >>> On 7/6/2025 1:08 PM, Paul E. McKenney wrote: >>> On Sat, Jul 05, 2025 at 04:39:15PM -0400, Joel Fernandes wrote: >>

Re: [PATCH RFC 1/3] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-06 Thread Joel Fernandes
On 7/6/2025 1:08 PM, Paul E. McKenney wrote: > On Sat, Jul 05, 2025 at 04:39:15PM -0400, Joel Fernandes wrote: >> Signed-off-by: Joel Fernandes > > Definitely headed in the right direction, though it does need just a > little bit more detail in the commit log. ;-) >

Re: [PATCH RFC 1/3] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-05 Thread Joel Fernandes
Bleh, my commit message got lost, but hey this is an RFC ;-) For context, it repairs this issue: https://lore.kernel.org/all/9acd5f9f-6732-7701-6880-4b51190aa...@huawei.com/ Will add commit message when sending non-RFC later. thanks, - Joel On 7/5/2025 4:39 PM, Joel Fernandes wrote: > Sig

[PATCH RFC 2/3] rcu: Refactor expedited handling check in rcu_read_unlock_special()

2025-07-05 Thread Joel Fernandes
Extract the complex expedited handling condition in rcu_read_unlock_special() into a separate function rcu_unlock_needs_exp_handling() with detailed comments explaining each condition. This improves code readability. No functional change intended. Signed-off-by: Joel Fernandes --- kernel/rcu

[PATCH RFC 3/3] rcu: Remove redundant check for irq state during unlock

2025-07-05 Thread Joel Fernandes
rcu_unlock_needs_exp_handling() function, as the conditions became more easier to read. Signed-off-by: Joel Fernandes --- kernel/rcu/tree_plugin.h | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index

[PATCH RFC 1/3] rcu: Fix rcu_read_unlock() deadloop due to IRQ work

2025-07-05 Thread Joel Fernandes
Signed-off-by: Joel Fernandes --- kernel/rcu/tree.h| 11 ++- kernel/rcu/tree_plugin.h | 29 ++--- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 3830c19cf2f6..f8f612269e6e 100644 --- a/kernel/rcu

[PATCH v2] smp: Document preemption and stop_machine() mutual exclusion

2025-07-05 Thread Joel Fernandes
pdates CPU masks and flushes IPIs with interrupts disabled, and cannot proceed while any CPU (including the IPI sender) has preemption disabled. Cc: Andrea Righi Cc: Paul E. McKenney Cc: Frederic Weisbecker Cc: r...@vger.kernel.org Co-developed-by: Frederic Weisbecker Signed-off-by: Joel Fernand

[PATCH] smp: Document preemption and stop_machine() mutual exclusion

2025-07-05 Thread Joel Fernandes
pdates CPU masks and flushes IPIs with interrupts disabled, and cannot proceed while any CPU (including the IPI sender) has preemption disabled. Cc: Andrea Righi Cc: Paul E. McKenney Cc: Frederic Weisbecker Cc: r...@vger.kernel.org Co-developed-by: Frederic Weisbecker Signed-off-by: Joel

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-07-05 Thread Joel Fernandes
On Thu, Jul 03, 2025 at 09:04:31AM +0800, Xiongfeng Wang wrote: > > > On 2025/7/3 1:24, Joel Fernandes wrote: > > > > > > On 7/2/2025 6:59 AM, Joel Fernandes wrote: > >> > >> > >> On 7/2/2025 5:14 AM, Qi Xi wrote: > >>> Hi

[PATCH v6 14/14] selftests/sched_ext: Add test for DL server total_bw consistency

2025-07-02 Thread Joel Fernandes
runs CPU stress threads to ensure DL server bandwidth values stabilize before checking consistency. This helps catch potential issues with DL server bandwidth accounting during sched_ext transitions. Signed-off-by: Joel Fernandes --- tools/testing/selftests/sched_ext/Makefile | 1 + tools

[PATCH v6 12/14] selftests/sched_ext: Add test for sched_ext dl_server

2025-07-02 Thread Joel Fernandes
From: Andrea Righi Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class. [ Joel: Replaced occurences of CFS in the test with EXT. ] Signed-off-by: Joel Fernandes Signed-off-by: Andrea Righi --- tools/testing/selftests/sched_ext/Makefile| 1

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-07-02 Thread Joel Fernandes
On 7/2/2025 6:59 AM, Joel Fernandes wrote: > > > On 7/2/2025 5:14 AM, Qi Xi wrote: >> Hi Joel, >> >> After applying the 2 patches, the problem still exists. Compared to the >> previous >> fixes which did solve the problem, the difference is ct_in_

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-07-02 Thread Joel Fernandes
On 7/2/2025 5:14 AM, Qi Xi wrote: > Hi Joel, > > After applying the 2 patches, the problem still exists. Compared to the > previous > fixes which did solve the problem, the difference is ct_in_irq() in the first > patch. > > I am wondering why "nesting != CT_NESTING_IRQ_NONIDLE" is added? >

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-07-01 Thread Joel Fernandes
On 7/1/2025 5:20 AM, Qi Xi wrote: > Hello everyone, > > Friendly ping about this problem :) > Ah, thanks for checking. The fix is slated for kernel 6.17. If you want to test it, could you apply it in advance from the RCU tree? You need these 2: https://git.kernel.org/pub/scm/linux/kernel/g

[PATCH v5 14/14] selftests/sched_ext: Add test for DL server total_bw consistency

2025-06-20 Thread Joel Fernandes
runs CPU stress threads to ensure DL server bandwidth values stabilize before checking consistency. This helps catch potential issues with DL server bandwidth accounting during sched_ext transitions. Signed-off-by: Joel Fernandes --- tools/testing/selftests/sched_ext/Makefile | 1 + tools

[PATCH v5 12/14] selftests/sched_ext: Add test for sched_ext dl_server

2025-06-20 Thread Joel Fernandes
From: Andrea Righi Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class. [ Joel: Replaced occurences of CFS in the test with EXT. ] Signed-off-by: Joel Fernandes Signed-off-by: Andrea Righi --- tools/testing/selftests/sched_ext/Makefile| 1

[GIT PULL] RCU fixes for v6.16 -rc3

2025-06-20 Thread Joel Fernandes
Hi Linus, The following changes since commit 11313e2f78128c948e9b4eb58b3dacfc30964700: Merge tag 'gpio-fixes-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux (2025-06-20 10:07:56 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/ke

[PATCH v2] refscale: Add tests for local_irq_disable() vs local_interrupt_disable()

2025-06-19 Thread Joel Fernandes
c: Boqun Feng Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/refscale.c | 73 --- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index f11a7c2af778..ac6e2391d672 100

[PATCH] refscale: Add tests for local_irq_disable() vs local_interrupt_disable()

2025-06-19 Thread Joel Fernandes
c: Boqun Feng Cc: r...@vger.kernel.org Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/refscale.c | 50 +-- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index 461a433e3f53..ac6e2391d672 100

[PATCH v4 13/15] selftests/sched_ext: Add test for sched_ext dl_server

2025-06-17 Thread Joel Fernandes
From: Andrea Righi Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class. [ Joel: Replaced occurences of CFS in the test with EXT. ] Signed-off-by: Joel Fernandes Signed-off-by: Andrea Righi --- tools/testing/selftests/sched_ext/Makefile| 1

Re: [PATCH 1/3] rcu: Return early if callback is not specified

2025-06-16 Thread Joel Fernandes
On 6/12/2025 5:03 PM, Boqun Feng wrote: [..] > >> The kernel robot reports it and it is already a strong indication that >> the subsystem is not hardened against invalid inputs: >> >> "BUG: unable to handle kernel NULL pointer dereference in rcu_core (3)" >> >> so this in the rcu_core() which i

[PATCH v3 10/10] selftests/sched_ext: Add test for sched_ext dl_server

2025-06-12 Thread Joel Fernandes
From: Andrea Righi Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class. [ Joel: Replaced occurences of CFS in the test with EXT. ] Signed-off-by: Joel Fernandes Signed-off-by: Andrea Righi --- tools/testing/selftests/sched_ext/Makefile| 1

Re: [PATCH v2 2/2] Documentation/kernel-parameters: Update rcu_normal_wake_from_gp doc

2025-06-11 Thread Joel Fernandes
On 6/11/2025 1:56 PM, Uladzislau Rezki (Sony) wrote: > Update the documentation about rcu_normal_wake_from_gp parameter. > > Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Joel Fernandes Thanks. > --- > Documentation/admin-guide/kernel-parameters.txt | 3 ++- >

Re: [PATCH v2 1/2] rcu: Enable rcu_normal_wake_from_gp on small systems

2025-06-11 Thread Joel Fernandes
king up GP-waiters earlier and decoupling synchronize_rcu() > callers from regular callback handling. > > A benchmark running 64 parallel jobs(system with 64 CPUs) invoking > synchronize_rcu() demonstrates a notable latency reduction with the > setting enabled. Reviewed-by: Jo

Re: [PATCH 1/3] rcu: Return early if callback is not specified

2025-06-10 Thread Joel Fernandes
his 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: Joel Fernandes I will add this first one (only this one since we're discussing the others) to a new rc

Re: [PATCH 2/3] rcu: Enable rcu_normal_wake_from_gp on small systems

2025-06-10 Thread Joel Fernandes
On 6/10/2025 1:34 PM, Uladzislau Rezki (Sony) wrote: > Automatically enable the rcu_normal_wake_from_gp parameter on > systems with a small number of CPUs. The activation threshold > is set to 16 CPUs. > > This helps to reduce a latency of normal synchronize_rcu() API > by waking up GP-waiters

Re: [PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-10 Thread Joel Fernandes
On 6/10/2025 8:23 AM, Frederic Weisbecker wrote: > Le Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes a écrit : >> 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 >>

Re: [PATCH 1/2] context_tracking: Provide helper to determine if we're in IRQ

2025-06-09 Thread Joel Fernandes
On 6/9/2025 2:01 PM, Joel Fernandes wrote: > context_tracking keeps track of whether we're handling IRQ well after > the preempt masks give take it off their books. We need this > functionality in a follow-up patch to fix a bug. Provide a helper API > for the same. > &

[PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-09 Thread Joel Fernandes
701-6880-4b51190aa...@huawei.com/ Tested-by: Xiongfeng Wang Signed-off-by: Joel Fernandes --- kernel/rcu/tree_plugin.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 3c0b686f..53d8b3415776 100644 --- a/kernel/rcu/t

[PATCH 1/2] context_tracking: Provide helper to determine if we're in IRQ

2025-06-09 Thread Joel Fernandes
context_tracking keeps track of whether we're handling IRQ well after the preempt masks give take it off their books. We need this functionality in a follow-up patch to fix a bug. Provide a helper API for the same. Signed-off-by: Joel Fernandes --- include/linux/context_tracking_irq.h

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-05 Thread Joel Fernandes
On 6/4/2025 8:26 AM, Paul E. McKenney wrote: >>> Or just don't send subsequent self-IPIs if we just sent one for the >>> rdp. Chances are, if we did not get the scheduler's attention during >>> the first one, we may not in subsequent ones I think. Plus we do send >>> other IPIs a

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-04 Thread Joel Fernandes
oll this into a proper patch and will provide it once have something ready. - Joel > > Thanks, > Qi > > On 2025/6/4 11:25, Xiongfeng Wang wrote: >> On 2025/6/4 9:35, Joel Fernandes wrote: >>> On Tue, Jun 03, 2025 at 03:22:42PM -0400, Joel Fernandes wrote: &

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On Tue, Jun 03, 2025 at 03:22:42PM -0400, Joel Fernandes wrote: > > > On 6/3/2025 3:03 PM, Joel Fernandes wrote: > > > > > > On 6/3/2025 2:59 PM, Joel Fernandes wrote: > >> On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: > >>&

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On 6/3/2025 2:59 PM, Joel Fernandes wrote: > On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: >> Hi Joel, >> >> On 2025/5/29 0:30, Joel Fernandes wrote: >>> On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang >>> wrote: >>>> >

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On 6/3/2025 3:03 PM, Joel Fernandes wrote: > > > On 6/3/2025 2:59 PM, Joel Fernandes wrote: >> On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: >>> Hi Joel, >>> >>> On 2025/5/29 0:30, Joel Fernandes wrote: >>>> On W

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: > Hi Joel, > > On 2025/5/29 0:30, Joel Fernandes wrote: > > On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang > > wrote: > >> > >> Hi RCU experts, > >> > >> When I ran sysk

[PATCH v2 10/10] selftests/sched_ext: Add test for sched_ext dl_server

2025-06-02 Thread Joel Fernandes
From: Andrea Righi Add a selftest to validate the correct behavior of the deadline server for the ext_sched_class. [ Joel: Replaced occurences of CFS in the test with EXT. ] Signed-off-by: Andrea Righi Signed-off-by: Joel Fernandes --- tools/testing/selftests/sched_ext/Makefile| 1

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-05-28 Thread Joel Fernandes
On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang wrote: > > Hi RCU experts, > > When I ran syskaller in Linux 6.6 with CONFIG_PREEMPT_RCU enabled, I got > the following soft lockup. The Calltrace is too long. I put it in the end. > The issue can also be reproduced in the latest kernel. > > The issue

RCU changes for v6.16

2025-05-19 Thread Joel Fernandes
test on rcu_seq_done_exact() rcu: Remove swake_up_one_online() bandaid Revert "rcu/nocb: Fix rcuog wake-up from offline softirq" I Hsin Cheng (1): rust: sync: rcu: Mark Guard methods as inline Joel Fernandes (7): MAINTAINERS: Update Joel's email address

Re: [PATCH] MAINTAINERS: Update Zqiang's email address

2025-05-16 Thread Joel Fernandes
On 5/16/2025 7:20 AM, Zqiang wrote: > This patch updates Zqiang's email address to qiang.zh...@linux.dev. > > Signed-off-by: Zqiang Acked-by: Joel Fernandes Will apply for 6.16. Thanks, - Joel > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH] rcu/nocb: Fix possible invalid rdp's->nocb_cb_kthread pointer access

2025-05-09 Thread Joel Fernandes
On 5/7/2025 7:26 AM, Zqiang wrote: > In the preparation stage of CPU online, if the corresponding > the rdp's->nocb_cb_kthread does not exist, will be created, > there is a situation where the rdp's rcuop kthreads creation fails, > and then de-offload this CPU's rdp, does not assign this CPU's >

Re: [PATCH v2] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-09 Thread Joel Fernandes
On 5/9/2025 9:33 AM, Frederic Weisbecker wrote: > Le Thu, May 08, 2025 at 02:43:11PM +0800, Z qiang a écrit : >> On Thu, May 8, 2025 at 12:25 AM Frederic Weisbecker >> wrote: >>> On a second thought, isn't "rdp == this_cpu_ptr(&rcu_data)" enough? >> >> If the CONFIG_DEBUG_PREEMPT=y, the follow

Re: [PATCH] rcutorture: Fix rcutorture_one_extend_check() splat in RT kernels

2025-05-09 Thread Joel Fernandes
On 5/7/2025 5:04 PM, Paul E. McKenney wrote: > On Wed, May 07, 2025 at 07:26:03PM +0800, Zqiang wrote: >> For built with CONFIG_PREEMPT_RT=y kernels, running rcutorture >> tests resulted in the following splat: >> >> [ 68.797425] rcutorture_one_extend_check during change: Current 0x1 To >> a

Re: [PATCH] rcu/nocb: Fix possible invalid rdp's->nocb_cb_kthread pointer access

2025-05-09 Thread Joel Fernandes
On 5/9/2025 3:07 PM, Joel Fernandes wrote: > > > On 5/7/2025 7:26 AM, Zqiang wrote: >> In the preparation stage of CPU online, if the corresponding >> the rdp's->nocb_cb_kthread does not exist, will be created, >> there is a situation where the rdp's rcuop

Re: [PATCH 0/3] Make rcutorture safe(r) for arm64

2025-05-09 Thread Joel Fernandes
> TRACE01, and TRACE02 scenarios, preferably in a script. (But if you > want typing practice, don't let me stand in your way!) > > 1.Check for "Call trace:" as well as "Call Trace:". > > 2.Reduce TREE01 CPU overcommit. > > 3.Remove MAXSMP

Re: [PATCH 0/3] Make rcutorture safe(r) for arm64

2025-05-09 Thread Joel Fernandes
On 5/8/2025 7:42 PM, Paul E. McKenney wrote: > Hello! > > This series makes a few small updates to make rcutorture run better > on arm64 servers. Remaining issues include TREE07 .config issues > that are addressed by Mark Rutland's porting of PREEMPT_LAZY to arm64 > and by upcoming work to han

Re: [PATCH 0/5] Miscellaneous rcutorture updates

2025-05-09 Thread Joel Fernandes
On 5/8/2025 7:44 PM, Paul E. McKenney wrote: > Hello! > > This series provides miscellaneous rcutorture updates: > > 1.Suppress torture.sh "Zero time" messages for disabled tests. > > 2.Print number of RCU up/down readers and migrations. > > 3.Check for no up/down readers at task

Re: [PATCH 03/12] rcu: Move rcu_stall related sysctls into rcu/tree_stall.h

2025-05-09 Thread Joel Fernandes
This is part of a greater effort to move ctl tables into their > respective subsystems which will reduce the merge conflicts in > kernel/sysctl.c. > > Signed-off-by: Joel Granados For RCU: Reviewed-by: Joel Fernandes thanks, - Joel > --- > include/linux/panic.h |

Re: [PATCH v2] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-07 Thread Joel Fernandes
On 5/7/2025 12:31 PM, Frederic Weisbecker wrote: > Le Wed, May 07, 2025 at 12:06:29PM -0400, Joel Fernandes a écrit : >> >> >> On 5/7/2025 7:26 AM, Zqiang wrote: >>> For built with CONFIG_PROVE_RCU=y and CONFIG_PREEMPT_RT=y kernels, >>> Disable BH does no

Re: [PATCH v2] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-07 Thread Joel Fernandes
; corresponding cpu is online. > > This commit therefore add softirq_count() check for > Preempt-RT kernels. > > Suggested-by: Joel Fernandes > Signed-off-by: Zqiang > --- > kernel/rcu/tree_plugin.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-06 Thread Joel Fernandes
> On May 6, 2025, at 2:26 AM, Z qiang wrote: > >  >> >> >> >> >>> On 4/30/2025 12:14 PM, Joel Fernandes wrote: >>> >>> >>> On 4/30/2025 10:57 AM, Z qiang wrote: >>>>> >>>>> >>

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-05-05 Thread Joel Fernandes
On 4/30/2025 12:14 PM, Joel Fernandes wrote: > > > On 4/30/2025 10:57 AM, Z qiang wrote: >>> >>> >>> >>> On 4/28/2025 6:59 AM, Z qiang wrote: >>>>> >>>>> Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a

Re: [PATCH v2] rcu: Robustify rcu_is_cpu_rrupt_from_idle()

2025-05-02 Thread Joel Fernandes
On 4/29/2025 6:08 AM, Frederic Weisbecker wrote: > RCU relies on the context tracking nesting counter in order to determine > if it is running in extended quiescent state. > > However the context tracking nesting counter is not completely > synchronized with the actual context tracking state: >

Re: [PATCH 5/5] rcu/exp: Warn on CPU lagging for too long within hotplug IPI's blindspot

2025-05-02 Thread Joel Fernandes
On 5/1/2025 5:49 PM, Frederic Weisbecker wrote: > Le Wed, Apr 30, 2025 at 02:20:31AM +0000, Joel Fernandes a écrit : >> >> >>> On Apr 29, 2025, at 9:44 AM, Frederic Weisbecker >>> wrote: >> >> Hi Frederic, >> These all look good to me. Do

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-30 Thread Joel Fernandes
On 4/30/2025 10:57 AM, Z qiang wrote: >> >> >> >> On 4/28/2025 6:59 AM, Z qiang wrote: Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a écrit : > For Preempt-RT kernel, when enable CONFIG_PROVE_RCU Kconfig, > disable local bh in rcuc kthreads will not affect preempt_count(),

Re: [PATCH 5/5] rcu/exp: Warn on CPU lagging for too long within hotplug IPI's blindspot

2025-04-29 Thread Joel Fernandes
> On Apr 29, 2025, at 9:44 AM, Frederic Weisbecker wrote: Hi Frederic, These all look good to me. Do you wish for these to go into the upcoming merge window or can I push them to a for-Neeraj branch as he is doing the merge window after the next? Thanks, - Joel > > A CPU within hotplug o

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-28 Thread Joel Fernandes
On 4/28/2025 6:59 AM, Z qiang wrote: >> >> Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a écrit : >>> For Preempt-RT kernel, when enable CONFIG_PROVE_RCU Kconfig, >>> disable local bh in rcuc kthreads will not affect preempt_count(), >>> this resulted in the following splat: >>> >>> WARNING:

Re: [PATCH] tools/memory-model/Documentation: Fix SRCU section in explanation.txt

2025-04-22 Thread Joel Fernandes
On 4/22/2025 6:55 PM, Joel Fernandes wrote: > > > On 4/22/2025 1:56 PM, Paul E. McKenney wrote: >> On Tue, Apr 22, 2025 at 07:38:30PM +0200, Uladzislau Rezki (Sony) wrote: >>> The SRCU read-side critical sections describes the difference between >>> sr

Re: [PATCH] tools/memory-model/Documentation: Fix SRCU section in explanation.txt

2025-04-22 Thread Joel Fernandes
On 4/22/2025 1:56 PM, Paul E. McKenney wrote: > On Tue, Apr 22, 2025 at 07:38:30PM +0200, Uladzislau Rezki (Sony) wrote: >> The SRCU read-side critical sections describes the difference between >> srcu_down_read()/srcu_up_read() and srcu_read_lock()/srcu_read_unlock() >> in a way that a last pai

Re: [v3,1/2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-19 Thread Joel Fernandes
Hello, Paul, On April 20, 2025, 12:21 a.m. UTC Paul E. McKenney wrote: > On Wed, Apr 16, 2025 at 11:19:22AM +0000, Joel Fernandes wrote: > > > > > > > On Apr 15, 2025, at 8:19 PM, Paul E. McKenney wrote: > > > > > > On Mon, Apr 14, 2025 at 11:05:45A

Re: [12/14] torture: Add testing of RCU's Rust bindings to torture.sh

2025-04-19 Thread Joel Fernandes
Hi Paul, On 4/18/2025 6:45 PM, Paul E. McKenney wrote: > Suppose we fired up a guest OS and captured the console output. Is there > a way to make that guest OS shut down automatically at the end of the > test and to extract the test results? Ah, sorry, I thought you were already

Re: [12/14] torture: Add testing of RCU's Rust bindings to torture.sh

2025-04-18 Thread Joel Fernandes
Hello, Paul, On Fri, 18 Apr 2025 22:26:17 GMT, "Paul E. McKenney" wrote: > On Fri, Apr 18, 2025 at 08:32:46PM +0200, Miguel Ojeda wrote: > > On Fri, Apr 18, 2025 at 8:04 PM Paul E. McKenney wrot > e: > > > > > > Suppose we fired up a guest OS and captured the console output. Is ther > e > > > a

Re: [12/14] torture: Add testing of RCU's Rust bindings to torture.sh

2025-04-18 Thread Joel Fernandes
Hello, Paul, On Fri, 18 Apr 2025 22:26:17 GMT, "Paul E. McKenney" wrote: > On Fri, Apr 18, 2025 at 08:32:46PM +0200, Miguel Ojeda wrote: > > On Fri, Apr 18, 2025 at 8:04 PM Paul E. McKenney wrot > e: > > > > > > Suppose we fired up a guest OS and captured the console output. Is ther > e > > > a

Re: [PATCH 09/14] rcutorture: Check for ->up_read() without matching ->down_read()

2025-04-18 Thread Joel Fernandes
On 4/18/2025 12:09 PM, Joel Fernandes wrote: > From: "Paul E. McKenney" > > This commit creates counters in the rcu_torture_one_read_state_updown > structure that check for a call to ->up_read() that lacks a matching > call to ->down_read(). > > While in

Re: [PATCH 00/14] RCU torture changes for v6.16

2025-04-18 Thread Joel Fernandes
On 4/18/2025 12:09 PM, Joel Fernandes wrote: > Hi, > > Please find the upcoming miscellaneous RCU changes. The changes can also FYI: Sorry, s/miscellaneous/torture-related/ here. Also please ignore patches with "XX/12" in their subject, that was an error on my part. The

[PATCH 2/4] rcu: Add warning to ensure rcu_seq_done_exact() is working

2025-04-18 Thread Joel Fernandes
The previous patch improved the rcu_seq_done_exact() function by adding a meaningful constant for the guardband. Ensure that this is working for the future by a quick check during rcu_gp_init(). Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/tree.c | 6 ++ 1

[PATCH 0/4] Sequence counter related RCU changes for v6.16

2025-04-18 Thread Joel Fernandes
() Joel Fernandes (3): rcu: Replace magic number with meaningful constant in rcu_seq_done_exact() rcu: Add warning to ensure rcu_seq_done_exact() is working srcu: Use rcu_seq_done_exact() for polling API kernel/rcu/rcu.h | 14 +- kernel/rcu/srcutree.c | 2 +- kernel/rcu

[PATCH 4/4] srcu: Use rcu_seq_done_exact() for polling API

2025-04-18 Thread Joel Fernandes
dhyay Reviewed-by: Paul E. McKenney Reviewed-by: Kent Overstreet Cc: Kent Overstreet Signed-off-by: Joel Fernandes --- kernel/rcu/srcutree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c index 9a59b071501b..48047260697e 100644 --- a/k

[PATCH 3/4] rcu: Comment on the extraneous delta test on rcu_seq_done_exact()

2025-04-18 Thread Joel Fernandes
he example scenario describe above which a warning added in an earlier patch does. [ Comment wordsmithing by Joel ] Signed-off-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/k

[PATCH 1/4] rcu: Replace magic number with meaningful constant in rcu_seq_done_exact()

2025-04-18 Thread Joel Fernandes
making the intent clearer as well. Suggested-by: Frederic Weisbecker Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index eed2951a4962..5e1ee570bb27 100

[PATCH 5/7] Revert "rcu/nocb: Fix rcuog wake-up from offline softirq"

2025-04-18 Thread Joel Fernandes
/20241231170712.149394-4-frede...@kernel.org/ Reviewed-by: Usama Arif Reviewed-by: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Joel Fernandes --- kernel/rcu/tree_nocb.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/rcu/tree_nocb.h b/kernel

[PATCH 4/7] rust: sync: rcu: Mark Guard methods as inline

2025-04-18 Thread Joel Fernandes
pfx__kernel::sync::rcu::Guard::new 16 - -16 Total: Before=23365955, After=23365823, chg -0.00% Link: https://github.com/Rust-for-Linux/linux/issues/1145 Signed-off-by: I Hsin Cheng Reviewed-by: Joel Fernandes Reviewed-by: Benno Lossin Reviewed-by: Charalampos Mitrodimas Acked-by

[PATCH 2/7] rcu: Remove swake_up_one_online() bandaid

2025-04-18 Thread Joel Fernandes
frede...@kernel.org/ Reviewed-by: Usama Arif Reviewed-by: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Joel Fernandes --- kernel/rcu/tree.c | 34 +- kernel/rcu/tree_exp.h | 2 +- kernel/rcu/tree_nocb.h | 2 +- 3 files changed, 3 insertions(+

  1   2   3   4   5   6   7   8   9   10   >