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

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
o I will put it in my rcu/dev branch as well so it is easy for Neeraj to take. thanks, - Joel

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
gt;>>>> + rcu_current_is_nocb_kthread(rdp) || >>>>> + (IS_ENABLED(CONFIG_PREEMPT_RT) && >>>>> +current == rdp->rcu_cpu_kthread_task)), >>>> >>>> Isn't it safe also on !CONFIG_PREEMPT_RT ? >>> >>> For !CONFIG_PREEMPT_RT and in rcuc kthreads, it's also safe, >>> but the following check will passed : >>> >>> (!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) && >>> rdp == this_cpu_ptr(&rcu_data)) >> >> I think the fact that it already passes for !PREEMPT_RT does not matter, >> because >> it simplifies the code so drop the PREEMPT_RT check? >> >> Or will softirq_count() not work? It appears to have special casing for >> PREEMPT_RT's local_bh_disable(): >> >> ( ( !(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) || >> softirq_count() ) >>&& rdp == this_cpu_ptr(&rcu_data)) ) > > Thank you for Joel's reply, I also willing to accept such > modifications and resend :) . Thanks, I am Ok with either approach whichever you and Frederic together decide. I can then pull this in for the v6.16 merge window once you resend, thanks! - Joel

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 withi

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

2025-04-28 Thread Joel Fernandes
t it safe also on !CONFIG_PREEMPT_RT ? > > For !CONFIG_PREEMPT_RT and in rcuc kthreads, it's also safe, > but the following check will passed : > > (!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) && > rdp == this_cpu_ptr(&rcu_data)) I think the fact that it already passes for !PREEMPT_RT does not matter, because it simplifies the code so drop the PREEMPT_RT check? Or will softirq_count() not work? It appears to have special casing for PREEMPT_RT's local_bh_disable(): ( ( !(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) || softirq_count() ) && rdp == this_cpu_ptr(&rcu_data)) ) thanks, - Joel

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
test on my employer's test systems, which > have Rust set up correctly, and skip it on my laptop, which has a strange > FrankenRust due to my early playing around with that language. > Or we teach kunit.py to not require a mrproper? :-) I wonder why it needs to do that. I may run into that too considering my other kernel project requires me to mess around with rust. thanks, - Joel

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

2025-04-18 Thread Joel Fernandes
Just to be on the same page, is the concern about the slowness of mrproper or that it kills the kernel build artifacts requiring a clean build? What kind of improvement are we looking for and why would this patch in its current form not work? thanks, - Joel > Other thoughts? > > Thanx, Paul

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

2025-04-18 Thread Joel Fernandes
Just to be on the same page, is the concern about the slowness of mrproper or that it kills the kernel build artifacts requiring a clean build? What kind of improvement are we looking for and why would this patch in its current form not work? thanks, - Joel > Other thoughts? > > Thanx, Paul

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(+

[PATCH 3/7] rcu/cpu_stall_cputime: fix the hardirq count for x86 architecture

2025-04-18 Thread Joel Fernandes
1090842.sfi6qpgs-...@intel.com/ Signed-off-by: Yongliang Gao Reviewed-by: Neeraj Upadhyay Link: https://lore.kernel.org/r/20250216084109.3109837-1-leonyl...@gmail.com Signed-off-by: Boqun Feng Signed-off-by: Joel Fernandes --- kernel/rcu/tree.c | 10 +++--- kernel/rcu/tree.h |

[PATCH 0/7] Miscellaneous RCU changes for v6.16

2025-04-18 Thread Joel Fernandes
ke-up from offline softirq" I Hsin Cheng (1): rust: sync: rcu: Mark Guard methods as inline Joel Fernandes (1): MAINTAINERS: Update Joel's email address Paul E. McKenney (1): doc: Update LWN RCU API links in whatisRCU.rst Wei Yang (1): doc/RCU/listRCU: refine example code for el

[PATCH 1/7] MAINTAINERS: Update Joel's email address

2025-04-18 Thread Joel Fernandes
Update MAINTAINERS file to reflect changes to Joel's email address for upstream work. Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 96b827049501..8eb7e05

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

2025-04-18 Thread Joel Fernandes
rproper parameter to torture.sh to make the user explicitly ask for it? Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/torture.sh | 45 +++ 1 file changed, 45 insertions(+)

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

2025-04-18 Thread Joel Fernandes
t robot feedback. ] Signed-off-by: Paul E. McKenney Tested-by: kernel test robot Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index d2728e95a69b..079

[PATCH 11/12] torture: Add --do-{,no-}normal to torture.sh

2025-04-18 Thread Joel Fernandes
ly KCSAN runs. Note that specifying "--do-no-kasan --do-no-kcsan --do-no-normal" gets normal runs, so you should not try to use this as a synonym for --do-none. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/torture.sh | 30 +

[PATCH 07/12] rcutorture: Comment invocations of tick_dep_set_task()

2025-04-18 Thread Joel Fernandes
und kernel execution. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 7eccc74e60a7..ea40f3ad32dc 100644 --- a/kernel/rcu/rcutortur

[PATCH 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()

2025-04-18 Thread Joel Fernandes
months ago. Therefore, mark them deprecated. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7b28ad331742..de8ed5efc5b1 100755 --- a/scripts/checkpatc

[PATCH 04/12] rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RT

2025-04-18 Thread Joel Fernandes
ing of RCU callbacks. If it turns out to be possible to make kernels built with CONFIG_PREEMPT_RT=y to tolerate testing of both, both will be enabled. [ paulmck: Apply Sebastian Siewior feedback. ] Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior Signed-off-by: Joel Fernandes --- too

[PATCH 08/12] rcutorture: Complain if an ->up_read() is delayed more than 10 seconds

2025-04-18 Thread Joel Fernandes
is delayed for more than ten seconds. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index ea40f3ad32dc..d2728e95a69b 100644 --

[PATCH 03/12] rcutorture: Split out beginning and end from rcu_torture_one_read()

2025-04-18 Thread Joel Fernandes
ad() while still using the same validation code. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 124 ++-- 1 file changed, 81 insertions(+), 43 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutortu

[PATCH 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-18 Thread Joel Fernandes
an per-reader array looking for elements whose readers have ended. This kthread sleeps between one and two milliseconds between consecutive scans. [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Apply Z qiang feedback. ] Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernan

[PATCH 06/12] rcutorture: Pull rcu_torture_updown() loop body into new function

2025-04-18 Thread Joel Fernandes
re test and the current structure being in use remain in the rcu_torture_updown() function. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 46 ++--- 1 file changed, 25 insertions(+), 21 deletions(-) diff --g

[PATCH 01/12] rcutorture: Make srcu_lockdep.sh check kernel Kconfig

2025-04-18 Thread Joel Fernandes
t verifies that the .config file has lockdep enabled. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../testing/selftests/rcutorture/bin/srcu_lockdep.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcut

[PATCH 02/12] rcutorture: Make srcu_lockdep.sh check reader-conflict handling

2025-04-18 Thread Joel Fernandes
therefore adds such tests to srcu_lockdep.sh. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/srcu_lockdep.sh | 31 +++ 1 file changed, 31 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh b/too

[PATCH 13/14] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-18 Thread Joel Fernandes
hen for 5 minutes, we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe this is reasonable since we at least add a little bit of testing for usecases where ->gpwrap is set. Tested-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h| 4

[PATCH 14/14] rcutorture: Fix issue with re-using old images on ARM64

2025-04-18 Thread Joel Fernandes
by: Paul E. McKenney Signed-off-by: Joel Fernandes --- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh index ad

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

2025-04-18 Thread Joel Fernandes
rproper parameter to torture.sh to make the user explicitly ask for it? Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/torture.sh | 45 +++ 1 file changed, 45 insertions(+)

[PATCH 10/14] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()

2025-04-18 Thread Joel Fernandes
months ago. Therefore, mark them deprecated. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3d22bf863eec..b3b1939ccd19 100755 --- a/scripts/checkpatc

[PATCH 11/14] torture: Add --do-{,no-}normal to torture.sh

2025-04-18 Thread Joel Fernandes
ly KCSAN runs. Note that specifying "--do-no-kasan --do-no-kcsan --do-no-normal" gets normal runs, so you should not try to use this as a synonym for --do-none. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/torture.sh | 30 +

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

2025-04-18 Thread Joel Fernandes
t robot feedback. ] Signed-off-by: Paul E. McKenney Tested-by: kernel test robot Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 0b998609c7dc..402

[PATCH 07/14] rcutorture: Comment invocations of tick_dep_set_task()

2025-04-18 Thread Joel Fernandes
und kernel execution. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index daa55ff05570..25010666576b 100644 --- a/kernel/rcu/rcutortur

[PATCH 08/14] rcutorture: Complain if an ->up_read() is delayed more than 10 seconds

2025-04-18 Thread Joel Fernandes
is delayed for more than ten seconds. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 25010666576b..0b998609c7dc 100644 --

[PATCH 05/14] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-18 Thread Joel Fernandes
an per-reader array looking for elements whose readers have ended. This kthread sleeps between one and two milliseconds between consecutive scans. [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Apply Z qiang feedback. ] [ joel: Fix build error: hrtimer_init is replaced by hrtimer_se

[PATCH 06/14] rcutorture: Pull rcu_torture_updown() loop body into new function

2025-04-18 Thread Joel Fernandes
re test and the current structure being in use remain in the rcu_torture_updown() function. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 44 ++--- 1 file changed, 24 insertions(+), 20 deletions(-) diff --g

[PATCH 03/14] rcutorture: Split out beginning and end from rcu_torture_one_read()

2025-04-18 Thread Joel Fernandes
ad() while still using the same validation code. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 124 ++-- 1 file changed, 81 insertions(+), 43 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutortu

[PATCH 04/14] rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RT

2025-04-18 Thread Joel Fernandes
ing of RCU callbacks. If it turns out to be possible to make kernels built with CONFIG_PREEMPT_RT=y to tolerate testing of both, both will be enabled. [ paulmck: Apply Sebastian Siewior feedback. ] Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior Signed-off-by: Joel Fernandes --- too

[PATCH 02/14] rcutorture: Make srcu_lockdep.sh check reader-conflict handling

2025-04-18 Thread Joel Fernandes
therefore adds such tests to srcu_lockdep.sh. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../selftests/rcutorture/bin/srcu_lockdep.sh | 31 +++ 1 file changed, 31 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh b/too

[PATCH 01/14] rcutorture: Make srcu_lockdep.sh check kernel Kconfig

2025-04-18 Thread Joel Fernandes
t verifies that the .config file has lockdep enabled. Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- .../testing/selftests/rcutorture/bin/srcu_lockdep.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcut

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

2025-04-18 Thread Joel Fernandes
Hi, Please find the upcoming miscellaneous RCU changes. The changes can also be found at: git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git torture.2025.04.18a Thanks. Joel Fernandes (2): rcutorture: Perform more frequent testing of ->gpwrap rcutorture: Fix issue w

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

2025-04-16 Thread Joel Fernandes
> On Apr 15, 2025, at 8:19 PM, Paul E. McKenney wrote: > > On Mon, Apr 14, 2025 at 11:05:45AM -0400, Joel Fernandes wrote: >> On 4/10/2025 2:29 PM, Paul E. McKenney wrote: >>>> +static int rcu_gpwrap_lag_init(void) >>>> +{ >>>> +if (g

Re: [PATCH v2 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-15 Thread Joel Fernandes
18446744073709551218 f0x0 ->state 0x2 cpu 4 [ 9515.833356] ??? Writer stall state RTWS_SYNC(21) g18446744073709551218 f0x0 ->state 0x2 cpu 4 It bisected to just this patch. thanks, - Joel

[PATCH v4 1/2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-15 Thread Joel Fernandes
hen for 5 minutes, we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe this is reasonable since we at least add a little bit of testing for usecases where ->gpwrap is set. Tested-by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h| 4

Re: [PATCH v4 2/2] rcutorture: Fix issue with re-using old images on ARM64

2025-04-15 Thread Joel Fernandes
On 4/15/2025 9:36 AM, Joel Fernandes wrote: > On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 > instance > instead of 36 for starting. > > Fix it by checking for Image files, instead of bzImage which ARM does > not seem to have. With

[PATCH v4 2/2] rcutorture: Fix issue with re-using old images on ARM64

2025-04-15 Thread Joel Fernandes
by: Paul E. McKenney Signed-off-by: Joel Fernandes --- kernel/rcu/rcutorture.c | 3 ++- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutortu

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

2025-04-14 Thread Joel Fernandes
unusual case for a built-in? On the other hand if the issue is with providing the user with a way to disable gpwrap testing, that should IMO be another parameter than setting the _mins parameters to be 0. But I think we may not want this testing disabled since it is already "self-disabled" for the first 25 miutes. Thoughts? Thanks! - Joel

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

2025-04-14 Thread Joel Fernandes
On 4/14/2025 10:24 AM, Paul E. McKenney wrote: > On Mon, Apr 14, 2025 at 08:07:24AM -0400, Joel Fernandes wrote: >> >> >>> On Apr 11, 2025, at 3:18 PM, Paul E. McKenney wrote: >>> >>> On Fri, Apr 11, 2025 at 05:36:32AM -, Joel Fernandes wrote: &

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

2025-04-14 Thread Joel Fernandes
> On Apr 11, 2025, at 3:18 PM, Paul E. McKenney wrote: > > On Fri, Apr 11, 2025 at 05:36:32AM -0000, Joel Fernandes wrote: >> Hello, Paul, >> >>> On Fri, 11 Apr 2025 05:33:16 GMT, "Paul E. McKenney" wrote: >>> On Thu, Apr 10, 2025 at 11:5

Re: [PATCH 1/4] sysctl: move u8 register test to lib/test_sysctl.c

2025-04-11 Thread Joel Granados
On Wed, Apr 09, 2025 at 10:26:56AM -0700, Kees Cook wrote: > On Fri, Mar 21, 2025 at 01:47:24PM +0100, Joel Granados wrote: > > If the test added in commit b5ffbd139688 ("sysctl: move the extra1/2 > > boundary check of u8 to sysctl_check_table_array") is run as a module,

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

2025-04-10 Thread Joel Fernandes
Hello, Paul, On Fri, 11 Apr 2025 05:33:16 GMT, "Paul E. McKenney" wrote: > On Thu, Apr 10, 2025 at 11:54:13AM -0700, Paul E. McKenney wrote: > > On Thu, Apr 10, 2025 at 11:29:03AM -0700, Paul E. McKenney wrote: > > > On Thu, Apr 10, 2025 at 11:03:27AM

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

2025-04-10 Thread Joel Fernandes
Hello, Paul, On Fri, 11 Apr 2025 05:33:16 GMT, "Paul E. McKenney" wrote: > On Thu, Apr 10, 2025 at 11:54:13AM -0700, Paul E. McKenney wrote: > > On Thu, Apr 10, 2025 at 11:29:03AM -0700, Paul E. McKenney wrote: > > > On Thu, Apr 10, 2025 at 11:03:27AM

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

2025-04-10 Thread Joel Fernandes
hen for 5 minutes, we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe this is reasonable since we at least add a little bit of testing for usecases where ->gpwrap is set. Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h| 4

Re: rcutorture: Perform more frequent testing of ->gpwrap

2025-04-10 Thread Joel Fernandes
gt; > > > > static enum cpuhp_state rcutor_hp; > > > > > > > > +static struct hrtimer ovf_lag_timer; > > > > +static bool ovf_lag_active; > > > > > > Same "ovf" naming complaint as before. > > > > Ok. Done. > > > > > > +} > > > > + > > > > +static int rcu_torture_ovf_lag_init(void) > > > > +{ > > > > + if (ovf_cycle_mins <= 0 || ovf_active_mins <= 0) { > > > > + pr_alert("rcu-torture: lag timing parameters must be > > > > positive\n"); > > > > + return -EINVAL; > > > > + } > > > > > > Why not refuse to start this portion of the test when CONFIG_SMP =n > > > or something other than vanilla RCU? No need to fail the test, just > > > print something saying that this testing won't be happening. > > > > Got it, will do. > > Again, thank you! I changed this to, something like: if (cur_ops->set_gpwrap_lag && rcu_gpwrap_lag_init()) goto unwind; So it will only test RCU flavor. However, to your point - for TINY, we would still start the timer which will be a NOOP. But considering it is 5 minutes every 30 minutes, maybe that's Ok? ;-) We could also have a ops pointer ->can_test_gpwrap_lag() which returns FALSE for Tiny, but then it is adding more ops pointers. thanks, - Joel

[PATCH v3 2/2] rcutorture: Fix issue with re-using old images on ARM64

2025-04-10 Thread Joel Fernandes
On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 instance instead of 36 for starting. Fix it by checking for Image files, instead of bzImage which ARM does not seem to have. With this I see all 36 instances running at the same time in the batch. Signed-of

Re: [PATCH v2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-10 Thread Joel Fernandes
On 4/10/2025 9:54 AM, Joel Fernandes wrote: > Currently, the ->gpwrap is not tested (at all per my testing) due to the > requirement of a large delta between a CPU's rdp->gp_seq and its node's > rnp->gpseq. > > This results in no testing of ->gpwrap bein

[PATCH v2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-10 Thread Joel Fernandes
hen for 5 minutes, we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe this is reasonable since we at least add a little bit of testing for usecases where ->gpwrap is set. Signed-off-by: Joel Fernandes --- kernel/rcu/rcu.h| 4

Re: rcutorture: Perform more frequent testing of ->gpwrap

2025-04-10 Thread Joel Fernandes
gt; > > > > static enum cpuhp_state rcutor_hp; > > > > > > > > +static struct hrtimer ovf_lag_timer; > > > > +static bool ovf_lag_active; > > > > > > Same "ovf" naming complaint as before. > > > > Ok. Done. > > > > > > +} > > > > + > > > > +static int rcu_torture_ovf_lag_init(void) > > > > +{ > > > > + if (ovf_cycle_mins <= 0 || ovf_active_mins <= 0) { > > > > + pr_alert("rcu-torture: lag timing parameters must be > > > > positive\n"); > > > > + return -EINVAL; > > > > + } > > > > > > Why not refuse to start this portion of the test when CONFIG_SMP =n > > > or something other than vanilla RCU? No need to fail the test, just > > > print something saying that this testing won't be happening. > > > > Got it, will do. > > Again, thank you! I changed this to, something like: if (cur_ops->set_gpwrap_lag && rcu_gpwrap_lag_init()) goto unwind; So it will only test RCU flavor. However, to your point - for TINY, we would still start the timer which will be a NOOP. But considering it is 5 minutes every 30 minutes, maybe that's Ok? ;-) We could also have a ops pointer ->can_test_gpwrap_lag() which returns FALSE for Tiny, but then it is adding more ops pointers. thanks, - Joel

  1   2   3   4   5   6   7   8   9   10   >