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

2025-07-23 Thread Joel Fernandes
ode comment suggestions, it may make sense to provide a bigger comment suggesting these than providing them inline as you did. And also calling out the tracing usecase in the comments for additional usecase clarification. I could provide a patch to do all this soon, as we discussed, as well (unle

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
eviously used pre-empt-disabling in the use cases. Or is the rationale for this something else? I would probably spell this out more in a longer comment above the if/else, than modify the inline comments. But I am probably misunderstood the whole thing. :-( -Joel > > Signed-off-by

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
t; scripts/checkpatch.pl would have complained about those missing >> Signed-off-by: tags. >> >>> >>> .../Data-Structures/Data-Structures.rst | 32 + >>> .../RCU/Design/Requirements/Requirements.rst | 128 ++ >> >> I'm seeing sub-optimal uses of reST markups in Requirements.rst from kernel >> documentation stand point. >> >> I'm going to submit a patch or two to improve them, but I can't promise when. >> They will likely be only cosmetic cleanups and I'm OK with it upstreamed as >> it is. >> > > Thanks! Thanks, I appreciate that! - Joel > > > - Neeraj

[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
found the first bad commit to be > > 3284e4adca9b ("rcu: Fix rcu_read_unlock() deadloop due to IRQ work") This commit is still using old code which was fixed in the last day. Here is the new commit: https://web.git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git/commit/?h=next&id=2e154d164418e1eaadbf5dc58cbf19e7be8fdc67 Thanks! - Joel

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
On 7/6/2025 11:06 PM, Qi Xi wrote: > Hi Joel, > > After reverting the previous 2 commits and applying the new bugfix, the > problem > is resolved now. > > Thanks for your help! Thanks! I will add your Tested-by tag to the commit and will post for further review.

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_

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 2/5] sysctl: Removed unused variable

2025-06-27 Thread Joel Granados
Remove unaligned_dump_stack from sysctl.h; it is no longer used or defined. Signed-off-by: Joel Granados --- include/linux/sysctl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 30bcbc59d12d2f4cec7545e7ee3f5ea5f0eefbd7

[PATCH 5/5] sysctl: rename kern_table -> sysctl_subsys_table

2025-06-27 Thread Joel Granados
Renamed sysctl table from kern_table to sysctl_subsys_table and grouped the two arch specific ctls to the end of the array. 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

[PATCH 4/5] kernel/sys.c: Move overflow{uid,gid} sysctl into kernel/sys.c

2025-06-27 Thread Joel Granados
the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- kernel/sys.c| 30 ++ kernel/sysctl.c | 18 -- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index adc0de0aa364aebb23999f621717a5

[PATCH 3/5] uevent: mv uevent_helper into kobject_uevent.c

2025-06-27 Thread Joel Granados
Move both uevent_helper table into lib/kobject_uevent.c. Place the registration early in the initcall order with postcore_initcall. 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

[PATCH 0/5] sysctl: Remove last two ctl_tables from the kern_table array

2025-06-27 Thread Joel Granados
ing done by running sysctl selftests on x86_64 and 0-day. Comments/Suggestions greatly appreciated [1] https://lore.kernel.org/20250509-jag-mv_ctltables_iter2-v1-0-d0ad83f5f...@kernel.org Signed-off-by: Joel Granados --- Joel Granados (5): sysctl: Nixify sysctl.sh sysctl: Remo

[PATCH 1/5] sysctl: Nixify sysctl.sh

2025-06-27 Thread Joel Granados
Use "#!/usr/bin/env bash" instead of "#!/bin/bash". Needed for testing in nix environments as they only provide /usr/bin/env at the standard location. Signed-off-by: Joel Granados --- tools/testing/selftests/sysctl/sysctl.sh | 2 +- 1 file changed, 1 insertion(+), 1 delet

[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
>> >> so this in the rcu_core() which is part of RCU. >> >> But, anyway Joel should decide. I shared my opinion :) >> > > Of course, my point is that the urgency is not high enough so we have to > put it in rcu/fixes, but it's a fix, and if Joel had the t

[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
ync_wq", WQ_MEM_RECLAIM, 0); > WARN_ON(!sync_wq); > > + if (num_possible_cpus() <= WAKE_FROM_GP_CPU_THRESHOLD) > + WRITE_ONCE(rcu_normal_wake_from_gp, 1); > + I think this will get weird if user explictly specifies rcutree.rcu_normal_wake_from_gp=0 ? Then we're silently overriding the param. Maybe, initialize it to -1, and then if it was set 0 by user, don't override it. But otherwise, set it to 1. Per your third patch, '1' is a default, not a forced value. thanks, - Joel

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
a VM? >> >> Sorry, I communicate with the teams who maintain the syzkaller tools. He said >> I can't send the syskaller binary out of the company. Sorry, but I can help >> to >> reproduce. It's not complicate and not time consuming. >> >> I found

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

2025-06-04 Thread Joel Fernandes
On 6/3/2025 11:37 PM, Qi Xi wrote: > Hi Joel, > > The patch works as expected. Previously, the issue triggered a soft lockup > within ~10 minutes, but after applying the fix, the system ran stably for 30+ > minutes without any issues. Great to hear! Thanks for testing. I/we will r

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
rocess at the end of a grace period. 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 already if the grace period was over

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 01/12] module: Move modprobe_path and modules_disabled ctl_tables into the module subsys

2025-05-19 Thread Joel Granados
On Thu, May 15, 2025 at 02:45:22PM +0200, Petr Pavlu wrote: > On 5/15/25 12:04, Joel Granados wrote: > > On Thu, May 15, 2025 at 10:04:53AM +0200, Petr Pavlu wrote: > >> On 5/9/25 14:54, Joel Granados wrote: > >>> Move module sysctl (modprobe_path and modules_disab

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 01/12] module: Move modprobe_path and modules_disabled ctl_tables into the module subsys

2025-05-15 Thread Joel Granados
On Thu, May 15, 2025 at 10:04:53AM +0200, Petr Pavlu wrote: > On 5/9/25 14:54, Joel Granados wrote: > > Move module sysctl (modprobe_path and modules_disabled) out of sysctl.c > > and into the modules subsystem. Make the modprobe_path variable static > > as it no longer

Re: [PATCH 07/12] Input: sysrq: mv sysrq into drivers/tty/sysrq.c

2025-05-13 Thread Joel Granados
On Fri, May 09, 2025 at 10:10:28AM -0700, Kees Cook wrote: > On Fri, May 09, 2025 at 02:54:11PM +0200, Joel Granados wrote: > > Move both sysrq ctl_table and supported sysrq_sysctl_handler helper > > function into drivers/tty/sysrq.c. Replaced the __do_proc_dointvec in > >

Re: [PATCH 01/12] module: Move modprobe_path and modules_disabled ctl_tables into the module subsys

2025-05-13 Thread Joel Granados
On Fri, May 09, 2025 at 09:09:44AM -0700, Luis Chamberlain wrote: > On Fri, May 09, 2025 at 02:54:05PM +0200, Joel Granados wrote: > > diff --git a/kernel/module/kmod.c b/kernel/module/kmod.c > > index > > 25f25381251281a390b273cd8a734c92b960113a..5701629adc27b4bb508

Re: [PATCH 09/12] sysctl: move cad_pid into kernel/pid.c

2025-05-13 Thread Joel Granados
On Fri, May 09, 2025 at 12:01:24PM -0700, Kees Cook wrote: > On Fri, May 09, 2025 at 02:54:13PM +0200, Joel Granados wrote: > > Move cad_pid as well as supporting function proc_do_cad_pid into > > kernel/pic.c. Replaced call to __do_proc_dointvec with proc_dointvec > > inside

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

2025-05-09 Thread Joel Fernandes
add additional warnings for checking this invariant? Also from the other thread, it sounds like there is more work to do here (related patches so I'd like to defer this to 6.17 - feel free to keep posting patches for this work though). Thanks! - Joel > --- > kernel/rcu/tree_nocb

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

2025-05-09 Thread Joel Fernandes
h? >> >> If the CONFIG_DEBUG_PREEMPT=y, the following code will cause >> a warning in rcuop kthreads: >> >> WARN_ON_ONCE(!rcu_rdp_is_offloaded(rdp)) > > I keep forgetting that, indeed! > > Looks good then, thanks. > > Reviewed-by: Frederic Weisbecker > Applying for v6.16 with the tag. thanks, - Joel

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

2025-05-09 Thread Joel Fernandes
in CONFIG_PREEMPT_RT=y > kernels) when there is an unexpected rcu_read_lock() in the case where > there was either local_bh_disable() or rcu_read_lock_bh() in effect. > > So I would expect that the CONFIG_PREEMPT_RT=y version of both > local_bh_disable() and rcu_read_lock_bh() would contain rcu_read_lock(). > > And in fact, rcu_read_lock_bh() invokes local_bh_disable(), > which, for CONFIG_PREEMPT_RT=y invokes __local_bh_disable_ip() in > kernel/softirq.c, which on the outermost local_bh_disabe() really does > invoke rcu_read_lock(). > > So this one looks good as well! > > Reviewed-by: Paul E. McKenney It is a fix so applying with the review tag, for 6.16, thanks! - Joel

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
On 5/9/2025 8:54 AM, Joel Granados wrote: > Move sysctl_panic_on_rcu_stall and sysctl_max_rcu_stall_to_panic into > the kernel/rcu subdirectory. Make these static in tree_stall.h and > removed them as extern from panic.h as their scope is now confined into > one file. > >

[PATCH 10/12] sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c

2025-05-09 Thread Joel Granados
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 --- kernel/panic.c | 10 ++ kernel/sysctl.c | 10 -- 2 files changed, 10 insertions(+), 10 deletions

[PATCH 09/12] sysctl: move cad_pid into kernel/pid.c

2025-05-09 Thread Joel Granados
subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- kernel/pid.c| 32 kernel/sysctl.c | 31 --- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/kernel/pid.c b

[PATCH 07/12] Input: sysrq: mv sysrq into drivers/tty/sysrq.c

2025-05-09 Thread Joel Granados
subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- drivers/tty/sysrq.c | 38 ++ kernel/sysctl.c | 30 -- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/drivers/tty

[PATCH 11/12] sysctl: Remove (very) old file changelog

2025-05-09 Thread Joel Granados
These comments are older than 2003 and therefore do not bare any relevance on the current state of the sysctl.c file. Remove them as they confuse more than clarify. Signed-off-by: Joel Granados --- kernel/sysctl.c | 16 1 file changed, 16 deletions(-) diff --git a/kernel

[PATCH 01/12] module: Move modprobe_path and modules_disabled ctl_tables into the module subsys

2025-05-09 Thread Joel Granados
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 --- include/linux/kmod.h | 1 - kernel/module/kmod.c | 32 +++- kernel/sysctl.c | 20 3

[PATCH 05/12] parisc/power: Move soft-power into power.c

2025-05-09 Thread Joel Granados
Move the soft-power ctl table into parisc/power.c. As a consequence the pwrsw_enabled var is made static. 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 --- drivers

[PATCH 12/12] sysctl: Remove superfluous includes from kernel/sysctl.c

2025-05-09 Thread Joel Granados
are no longer needed as intermediate includes == Include == linux/filter.h linux/binfmts.h Signed-off-by: Joel Granados --- kernel/sysctl.c | 20 1 file changed, 20 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index

[PATCH 00/12] sysctl: Move sysctls to their respective subsystems (second batch)

2025-05-09 Thread Joel Granados
To: Luis Chamberlain To: Petr Pavlu To: Sami Tolvanen To: Daniel Gomez To: Kees Cook To: Peter Zijlstra To: Ingo Molnar To: Will Deacon To: Boqun Feng To: Waiman Long To: Paul E. McKenney To: Frederic Weisbecker To: Neeraj Upadhyay To: Joel Fernandes To: Josh Triplett To: Uladzisl

[PATCH 06/12] fork: mv threads-max into kernel/fork.c

2025-05-09 Thread Joel Granados
make sysctl_max_threads static as it no longer needs to be exported into sysctl.c. 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 --- include/linux/sysctl.h | 3

[PATCH 08/12] sysctl: Move tainted ctl_table into kernel/panic.c

2025-05-09 Thread Joel Granados
Move the ctl_table with the "tainted" proc_name into kernel/panic.c. With it moves the proc_tainted helper function. 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: Joe

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

2025-05-09 Thread Joel Granados
subsystems which will reduce the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- include/linux/panic.h | 2 -- kernel/rcu/tree_stall.h | 33 +++-- kernel/sysctl.c | 20 3 files changed, 31 insertions(+), 24 deletions

[PATCH 04/12] mm: move randomize_va_space into memory.c

2025-05-09 Thread Joel Granados
the merge conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- kernel/sysctl.c | 9 - mm/memory.c | 18 ++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index fd76f0e1d490940a67d72403d72d20

[PATCH 02/12] locking/rtmutex: Move max_lock_depth into rtmutex.c

2025-05-09 Thread Joel Granados
conflicts in kernel/sysctl.c. Signed-off-by: Joel Granados --- include/linux/rtmutex.h | 2 -- kernel/locking/rtmutex.c | 23 +++ kernel/locking/rtmutex_api.c | 5 - kernel/sysctl.c | 12 4 files changed, 23 insertions(+), 19 deletions

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

  1   2   3   4   5   6   7   8   9   10   >