[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

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

  1   2   3   4   5   6   7   8   9   10   >