Query regarding __hrtimer_get_next_event()

2017-10-26 Thread Neeraj Upadhyay
Hi, We have one query regarding the __hrtimer_get_next_event(). The expires_next.tv64 is set to 0 if it is < 0. We observed an hrtimer interrupt storm for one of the hrtimers with below properties: * Expires for the hrtimer was set to KTIME_MAX. * cpu base was HRTIMER_BASE_REALTIME with negative

Re: Query regarding __hrtimer_get_next_event()

2017-10-26 Thread Neeraj Upadhyay
c = 15152092) ts_delta = (tv_sec = -1508803200, tv_nsec = -767601) wall_to_monotonic is bigger than the ts_delta, so leading to wall_to_monotonic become positive value, resulting in -ve off_real. Thanks Neeraj On 10/26/2017 06:27 PM, Thomas Gleixner wrote: On Thu, 26 Oct 2017, Neeraj Upadhyay wro

Query regarding srcu_funnel_exp_start()

2017-10-27 Thread Neeraj Upadhyay
Hi, One query regarding srcu_funnel_exp_start() function in kernel/rcu/srcutree.c. static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp, unsigned long s) { if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))

Re: Query regarding srcu_funnel_exp_start()

2017-10-27 Thread Neeraj Upadhyay
On 10/27/2017 05:56 PM, Paul E. McKenney wrote: On Fri, Oct 27, 2017 at 02:23:07PM +0530, Neeraj Upadhyay wrote: Hi, One query regarding srcu_funnel_exp_start() function in kernel/rcu/srcutree.c. static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp

Re: Query regarding srcu_funnel_exp_start()

2017-10-27 Thread Neeraj Upadhyay
On 10/28/2017 03:50 AM, Paul E. McKenney wrote: On Fri, Oct 27, 2017 at 10:15:04PM +0530, Neeraj Upadhyay wrote: On 10/27/2017 05:56 PM, Paul E. McKenney wrote: On Fri, Oct 27, 2017 at 02:23:07PM +0530, Neeraj Upadhyay wrote: Hi, One query regarding srcu_funnel_exp_start() function in kernel

Re: [PATCH] workqueue: Handle race between wake up and rebind

2018-01-16 Thread Neeraj Upadhyay
On 01/16/2018 11:05 PM, Tejun Heo wrote: Hello, Neeraj. On Mon, Jan 15, 2018 at 02:08:12PM +0530, Neeraj Upadhyay wrote: - kworker/0:0 gets chance to run on cpu1; while processing a work, it goes to sleep. However, it does not decrement pool->nr_running. This is because WORKER_REBO

Re: [PATCH] workqueue: Handle race between wake up and rebind

2018-01-18 Thread Neeraj Upadhyay
On 01/18/2018 08:32 AM, Lai Jiangshan wrote: On Wed, Jan 17, 2018 at 4:08 AM, Neeraj Upadhyay wrote: On 01/16/2018 11:05 PM, Tejun Heo wrote: Hello, Neeraj. On Mon, Jan 15, 2018 at 02:08:12PM +0530, Neeraj Upadhyay wrote: - kworker/0:0 gets chance to run on cpu1; while processing a

[PATCH] workqueue: Handle race between wake up and rebind

2018-01-15 Thread Neeraj Upadhyay
his by deferring the work to some other idle worker, if the current worker is not bound to its pool's CPU. Signed-off-by: Neeraj Upadhyay --- kernel/workqueue.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 43d18cb..71c0023 1006

[GIT PULL] RCU changes for v6.12

2024-09-13 Thread Neeraj Upadhyay
_RCU_CORE rcu/nocb: Remove SEGCBLIST_KTHREAD_CB rcu/nocb: Simplify (de-)offloading state machine rcu/nocb: Fix RT throttling hrtimer armed from offline CPU rcu/nocb: Conditionally wake up rcuo if not already waiting on GP rcu/nocb: Remove superfluous memory bar

[RFC 0/6] Managed Percpu Refcount

2024-09-15 Thread Neeraj Upadhyay
ion. 4. Updates to torture test to test runtime mode switches from managed to unmanaged modes. 5. Switch Label refcount management to percpu ref in atomic mode. 6. Switch Label refcount management to managed mode. Highly appreciate any feedback/suggestions on the design approach. [1] https://lo

[RFC 1/6] percpu-refcount: Add managed mode for RCU released objects

2024-09-15 Thread Neeraj Upadhyay
ReInit D(RI/M) - Dead with ReInit and Managed PerCPU Ref Ops: KLL - Kill REI - Reinit RES - Resurrect Once a percpu ref is switched to managed mode, it cannot be switched to any other active mode. On reinit/resurrect, managed ref is reinitialized in managed mode. Signed-off-by: Neeraj Upadh

[RFC 2/6] percpu-refcount: Add torture test for percpu refcount

2024-09-15 Thread Neeraj Upadhyay
Add torture test to verify percpu managed mode operations, verifying that a percpu ref does not have non-zero count when all users have dropped their reference and that there is no early release of the ref while users hold references to it. Signed-off-by: Neeraj Upadhyay --- .../admin-guide

[RFC 3/6] percpu-refcount: Extend managed mode to allow runtime switching

2024-09-15 Thread Neeraj Upadhyay
de using percpu_ref_switch_to_atomic(). Signed-off-by: Neeraj Upadhyay --- include/linux/percpu-refcount.h | 3 +- lib/percpu-refcount.c | 248 +++- 2 files changed, 88 insertions(+), 163 deletions(-) diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount

[RFC 4/6] percpu-refcount-torture: Extend test with runtime mode switches

2024-09-15 Thread Neeraj Upadhyay
Extend the test to exercise runtime switching from managed mode to other reinitable active modes. Signed-off-by: Neeraj Upadhyay --- lib/percpu-refcount-torture.c | 41 +-- lib/percpu-refcount.c | 12 +- 2 files changed, 50 insertions(+), 3

[RFC 5/6] apparmor: Switch labels to percpu refcount in atomic mode

2024-09-15 Thread Neeraj Upadhyay
. - Displacement of aa_label struct members to different cacheline, as percpu ref takes 2 pointers space. - Moving of the atomic counter outside of the cacheline of the aa_label struct. Signed-off-by: Neeraj Upadhyay --- security/apparmor/include/label.h | 16 security

[RFC 6/6] apparmor: Switch labels to percpu ref managed mode

2024-09-15 Thread Neeraj Upadhyay
Cache Domains apparmor=on (percpuref) scaling eff (%) 8C16T 1 100% 16C32T 2 96% 24C48T 3 94% 48C96T 6 93% 96C192T12 90% Signed-off-b

Re: [PATCH] rcu/tree: Fix self wakeups for grace period kthread

2019-03-12 Thread Neeraj Upadhyay
On 3/12/19 7:20 AM, Steven Rostedt wrote: On Fri, 8 Mar 2019 15:16:18 +0530 Neeraj Upadhyay wrote: Update the code to match the comment that self wakeup of grace period kthread is allowed from interrupt handler, and softirq handler, running in the grace period kthread's context. Pr

[PATCH] arm64: Add part number for Arm Cortex-A78

2021-02-17 Thread Neeraj Upadhyay
Add the MIDR part number info for the Arm Cortex-A78. Signed-off-by: Neeraj Upadhyay --- arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index ef5b040..3aced88 100644 --- a/arch/arm64

Re: [PATCH] arm64: Add part number for Arm Cortex-A78

2021-02-17 Thread Neeraj Upadhyay
On 2/17/2021 10:36 PM, Will Deacon wrote: On Wed, Feb 17, 2021 at 10:14:11PM +0530, Neeraj Upadhyay wrote: Add the MIDR part number info for the Arm Cortex-A78. Signed-off-by: Neeraj Upadhyay --- arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH] rcu: Trace cbs accelerated without leaf rnp node lock held

2021-01-11 Thread Neeraj Upadhyay
Trace cbs which are accelerated without rnp lock help in rcu_accelerate_cbs_unlocked(). Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 338b817..097990a

[PATCH] rcu: Only trace when cbs are accelerated

2021-01-11 Thread Neeraj Upadhyay
Fix rcu_accelerate_cbs() traces to only trace when cbs are accelerated in current call. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 804e543..338b817 100644 --- a/kernel

[PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu

2021-01-11 Thread Neeraj Upadhyay
Correctly trace whether the outgoing cpu blocks current gp in rcutree_dying_cpu(). Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 097990a..1f4bff4 100644 --- a/kernel/rcu/tree.c

[PATCH] rcu: Fix dynticks_nmi_nesting underflow check in rcu_is_cpu_rrupt_from_idle

2020-12-23 Thread Neeraj Upadhyay
for these smp_call_function() callbacks running from idle loop. However, this commit missed updating a preexisting underflow check of dynticks_nmi_nesting, which checks for a non zero positive value. Fix this warning and while at it, read the counter only once. Signed-off-by: Neeraj Upadhyay --- Hi, I wa

Re: [PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu

2021-01-12 Thread Neeraj Upadhyay
On 1/12/2021 11:01 PM, Paul E. McKenney wrote: On Mon, Jan 11, 2021 at 05:15:58PM +0530, Neeraj Upadhyay wrote: Correctly trace whether the outgoing cpu blocks current gp in rcutree_dying_cpu(). Signed-off-by: Neeraj Upadhyay Good catch, queued, thank you! Please see below for my usual

Re: [PATCH 01/13] rcu/nocb: Fix potential missed nocb_timer rearm

2021-03-03 Thread Neeraj Upadhyay
e entry. This commit fixes this bug by resetting rdp->nocb_defer_wakeup everytime we delete the ->nocb_timer. Fixes: d1b222c6be1f (rcu/nocb: Add bypass callback queueing) Cc: Stable Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes

Re: [PATCH RFC tip/core/rcu 1/5] srcu: Make Tiny SRCU use multi-bit grace-period counter

2020-11-19 Thread Neeraj Upadhyay
Hi Paul, On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods. This polling needs to distinguish between an SRCU instance being idle on the one hand or in the middle of a grace period on the other. This commi

AMU extension v1 support for cortex A76, A77, A78 CPUs

2020-11-19 Thread Neeraj Upadhyay
Hi, For ARM cortex A76, A77, A78 cores (which as per TRM, support AMU) AA64PFR0[47:44] field is not set, and AMU does not get enabled for them. Can you please provide support for these CPUs in cpufeature.c? Thanks Neeraj -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a

Re: [PATCH RFC tip/core/rcu 3/5] srcu: Provide internal interface to start a Tree SRCU grace period

2020-11-20 Thread Neeraj Upadhyay
mess with queuing? Locking considerations, of course! Link: https://lore.kernel.org/rcu/20201112201547.gf3365...@moria.home.lan/ Reported-by: Kent Overstreet Signed-off-by: Paul E. McKenney --- Reviewed-by: Neeraj Upadhyay Thanks Neeraj kernel/rcu/srcut

Re: [PATCH RFC tip/core/rcu 2/5] srcu: Provide internal interface to start a Tiny SRCU grace period

2020-11-20 Thread Neeraj Upadhyay
Tiny SRCU call_srcu() function into callback-queuing and start-grace-period portions, with the latter in a new function named srcu_gp_start_if_needed(). Link: https://lore.kernel.org/rcu/20201112201547.gf3365...@moria.home.lan/ Reported-by: Kent Overstreet Signed-off-by: Paul E. McKenney --- Reviewed-

Re: [PATCH RFC tip/core/rcu 4/5] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-20 Thread Neeraj Upadhyay
Hi Paul, On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods, so this commit supplies get_state_synchronize_srcu(), start_poll_synchronize_srcu(), and poll_state_synchronize_srcu() for this purpose. The first

Re: [PATCH RFC tip/core/rcu 5/5] srcu: Provide polling interfaces for Tree SRCU grace periods

2020-11-20 Thread Neeraj Upadhyay
On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods, so this commit supplies get_state_synchronize_srcu(), start_poll_synchronize_srcu(), and poll_state_synchronize_srcu() for this purpose. The first can be

Re: [PATCH v2 tip/core/rcu 4/6] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-23 Thread Neeraj Upadhyay
On 11/24/2020 2:42 AM, Paul E. McKenney wrote: On Mon, Nov 23, 2020 at 10:13:13AM +0530, Neeraj Upadhyay wrote: On 11/21/2020 6:29 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods, so this commi

Re: [PATCH v2 tip/core/rcu 1/6] srcu: Make Tiny SRCU use multi-bit grace-period counter

2020-11-23 Thread Neeraj Upadhyay
On 11/24/2020 1:25 AM, Paul E. McKenney wrote: On Mon, Nov 23, 2020 at 10:01:13AM +0530, Neeraj Upadhyay wrote: On 11/21/2020 6:29 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods. This polling needs to d

Re: AMU extension v1 support for cortex A76, A77, A78 CPUs

2020-11-23 Thread Neeraj Upadhyay
Thanks Marc, Vladimir, Mark, Sudeep for your inputs! Thanks Neeraj On 11/20/2020 3:43 PM, Mark Rutland wrote: On Fri, Nov 20, 2020 at 09:09:00AM +, Vladimir Murzin wrote: On 11/20/20 8:56 AM, Marc Zyngier wrote: On 2020-11-20 04:30, Neeraj Upadhyay wrote: Hi, For ARM cortex A76, A77

Re: [PATCH v2 tip/core/rcu 1/6] srcu: Make Tiny SRCU use multi-bit grace-period counter

2020-11-24 Thread Neeraj Upadhyay
On 11/24/2020 10:48 AM, Neeraj Upadhyay wrote: On 11/24/2020 1:25 AM, Paul E. McKenney wrote: On Mon, Nov 23, 2020 at 10:01:13AM +0530, Neeraj Upadhyay wrote: On 11/21/2020 6:29 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interfac

Re: [PATCH v2 tip/core/rcu 4/6] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-24 Thread Neeraj Upadhyay
On 11/25/2020 1:00 AM, Paul E. McKenney wrote: On Tue, Nov 24, 2020 at 10:44:24AM +0530, Neeraj Upadhyay wrote: On 11/24/2020 2:42 AM, Paul E. McKenney wrote: On Mon, Nov 23, 2020 at 10:13:13AM +0530, Neeraj Upadhyay wrote: On 11/21/2020 6:29 AM, paul...@kernel.org wrote: From: "

Re: [PATCH v2 tip/core/rcu 5/6] srcu: Provide polling interfaces for Tree SRCU grace periods

2020-11-26 Thread Neeraj Upadhyay
Overstreet [ paulmck: Add EXPORT_SYMBOL_GPL() per kernel test robot feedback. ] [ paulmck: Apply feedback from Neeraj Upadhyay. ] Link: https://lore.kernel.org/lkml/20201117004017.GA7444@paulmck-ThinkPad-P72/ Signed-off-by: Paul E. McKenney --- For version in -rcu dev Reviewed-by: Neeraj Upadhyay

Re: [PATCH v2 tip/core/rcu 6/6] srcu: Document polling interfaces for Tree SRCU grace periods

2020-11-27 Thread Neeraj Upadhyay
547.gf3365...@moria.home.lan/ Reported-by: Kent Overstreet Signed-off-by: Paul E. McKenney --- Reviewed-by: Neeraj Upadhyay Thanks Neeraj Documentation/RCU/Design/Requirements/Requirements.rst | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/

Re: [PATCH v2 tip/core/rcu 1/6] srcu: Make Tiny SRCU use multi-bit grace-period counter

2020-11-28 Thread Neeraj Upadhyay
On 11/28/2020 7:46 AM, Paul E. McKenney wrote: On Wed, Nov 25, 2020 at 10:03:26AM +0530, Neeraj Upadhyay wrote: On 11/24/2020 10:48 AM, Neeraj Upadhyay wrote: On 11/24/2020 1:25 AM, Paul E. McKenney wrote: On Mon, Nov 23, 2020 at 10:01:13AM +0530, Neeraj Upadhyay wrote: On 11/21/2020

Re: [PATCH RFC tip/core/rcu 5/5] srcu: Provide polling interfaces for Tree SRCU grace periods

2020-11-22 Thread Neeraj Upadhyay
On 11/21/2020 5:46 AM, Paul E. McKenney wrote: On Fri, Nov 20, 2020 at 05:31:43PM +0530, Neeraj Upadhyay wrote: On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods, so this commi

Re: [PATCH RFC tip/core/rcu 4/5] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-22 Thread Neeraj Upadhyay
On 11/21/2020 5:43 AM, Paul E. McKenney wrote: On Fri, Nov 20, 2020 at 05:28:32PM +0530, Neeraj Upadhyay wrote: Hi Paul, On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods, so this commi

Re: [PATCH v2 tip/core/rcu 4/6] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-22 Thread Neeraj Upadhyay
Overstreet [ paulmck: Add EXPORT_SYMBOL_GPL() per kernel test robot feedback. ] [ paulmck: Apply feedback from Neeraj Upadhyay. ] Link: https://lore.kernel.org/lkml/20201117004017.GA7444@paulmck-ThinkPad-P72/ Signed-off-by: Paul E. McKenney --- include/linux/rcupdate.h | 2 ++ include/linux/srcu.

Re: [PATCH v2 tip/core/rcu 1/6] srcu: Make Tiny SRCU use multi-bit grace-period counter

2020-11-22 Thread Neeraj Upadhyay
On 11/21/2020 6:29 AM, paul...@kernel.org wrote: From: "Paul E. McKenney" There is a need for a polling interface for SRCU grace periods. This polling needs to distinguish between an SRCU instance being idle on the one hand or in the middle of a grace period on the other. This commit there

Re: [PATCH RFC tip/core/rcu 4/5] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-22 Thread Neeraj Upadhyay
On 11/22/2020 11:31 PM, Paul E. McKenney wrote: On Sun, Nov 22, 2020 at 07:57:26PM +0530, Neeraj Upadhyay wrote: On 11/21/2020 5:43 AM, Paul E. McKenney wrote: On Fri, Nov 20, 2020 at 05:28:32PM +0530, Neeraj Upadhyay wrote: Hi Paul, On 11/17/2020 6:10 AM, paul...@kernel.org wrote: From

Re: [PATCH v2 tip/core/rcu 4/6] srcu: Provide polling interfaces for Tiny SRCU grace periods

2020-11-22 Thread Neeraj Upadhyay
Overstreet [ paulmck: Add EXPORT_SYMBOL_GPL() per kernel test robot feedback. ] [ paulmck: Apply feedback from Neeraj Upadhyay. ] Link: https://lore.kernel.org/lkml/20201117004017.GA7444@paulmck-ThinkPad-P72/ Signed-off-by: Paul E. McKenney --- include/linux/rcupdate.h | 2 ++ include/linux/srcu.

[PATCH] rcu: tree_plugin: Dump specified number of blocked tasks

2019-03-29 Thread Neeraj Upadhyay
dump_blkd_tasks() uses 10 as the max number of blocked tasks, which are printed. However, it has an argument which provides that number. So, use the argument value instead. As all callers currently pass 10 as the number, there isn't any impact. Signed-off-by: Neeraj Upadhyay --- kerne

[PATCH] rcu: tree_stall: Correctly unlock root node in rcu_check_gp_start_stall

2019-03-29 Thread Neeraj Upadhyay
Only unlock the root node, if current node (rnp) is not root node. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree_stall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index f65a73a..0651833 100644 --- a/kernel/rcu

Re: [PATCH] rcu: tree_stall: Correctly unlock root node in rcu_check_gp_start_stall

2019-03-29 Thread Neeraj Upadhyay
On 3/29/19 6:58 PM, Mukesh Ojha wrote: On 3/29/2019 4:57 PM, Neeraj Upadhyay wrote: Only unlock the root node, if current node (rnp) is not root node. Signed-off-by: Neeraj Upadhyay ---   kernel/rcu/tree_stall.h | 4 +++-   1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH] rcu: tree_stall: Correctly unlock root node in rcu_check_gp_start_stall

2019-03-29 Thread Neeraj Upadhyay
On 3/30/19 2:57 AM, Paul E. McKenney wrote: On Fri, Mar 29, 2019 at 07:52:15PM +0530, Neeraj Upadhyay wrote: On 3/29/19 6:58 PM, Mukesh Ojha wrote: On 3/29/2019 4:57 PM, Neeraj Upadhyay wrote: Only unlock the root node, if current node (rnp) is not root node. Signed-off-by: Neeraj

Re: [PATCH v2] pinctrl: qcom: Add irq_enable callback for msm gpio

2019-06-25 Thread Neeraj Upadhyay
On 6/25/19 2:28 PM, Linus Walleij wrote: On Mon, Jun 17, 2019 at 11:35 AM Neeraj Upadhyay wrote: From: Srinivas Ramana Introduce the irq_enable callback which will be same as irq_unmask except that it will also clear the status bit before unmask. This will help in clearing any erroneous

[PATCH v3] pinctrl: qcom: Add irq_enable callback for msm gpio

2019-06-25 Thread Neeraj Upadhyay
that these unexpected interrupts gets cleared. Signed-off-by: Srinivas Ramana Signed-off-by: Neeraj Upadhyay --- Changes since v2: - Renamed function to msm_gpio_irq_clear_unmask() drivers/pinctrl/qcom/pinctrl-msm.c | 25 - 1 file changed, 24 insertions(+), 1 deletion

Re: [PATCH] arm64: Explicitly set pstate.ssbs for el0 on kernel entry

2019-07-18 Thread Neeraj Upadhyay
Hi Marc, On 7/9/19 7:52 PM, Marc Zyngier wrote: On 09/07/2019 15:18, Neeraj Upadhyay wrote: Hi Marc, On 7/9/19 6:38 PM, Marc Zyngier wrote: Hi Neeraj, On 09/07/2019 12:22, Neeraj Upadhyay wrote: For cpus which do not support pstate.ssbs feature, el0 might not retain spsr.ssbs. This is

[PATCH] arm64: Explicitly set pstate.ssbs for el0 on kernel entry

2019-07-09 Thread Neeraj Upadhyay
capability is uniformly provided. Signed-off-by: Neeraj Upadhyay --- arch/arm64/kernel/cpu_errata.c | 16 arch/arm64/kernel/entry.S | 26 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel

Re: [PATCH] arm64: Explicitly set pstate.ssbs for el0 on kernel entry

2019-07-09 Thread Neeraj Upadhyay
Hi Marc, On 7/9/19 6:38 PM, Marc Zyngier wrote: Hi Neeraj, On 09/07/2019 12:22, Neeraj Upadhyay wrote: For cpus which do not support pstate.ssbs feature, el0 might not retain spsr.ssbs. This is problematic, if this task migrates to a cpu supporting this feature, thus relying on its state to

[PATCH] rcu/tree_plugin: Fix nohz status in stall warning

2019-03-08 Thread Neeraj Upadhyay
Fix stall warning, to show correct nohz marker. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 97dba50..93da32c 100644 --- a/kernel/rcu/tree_plugin.h +++ b

[PATCH] rcu/rcutorture: Fix expected forward progress duration in oom notifier

2019-03-08 Thread Neeraj Upadhyay
Fix a possible miscalculation in rcutorture_oom_notify(), for the expected forward progress duration of current forward progress test. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel

Re: [PATCH] rcu/tree_plugin: Fix nohz status in stall warning

2019-03-08 Thread Neeraj Upadhyay
On 3/9/19 2:48 AM, Paul E. McKenney wrote: On Fri, Mar 08, 2019 at 11:51:49PM +0530, Neeraj Upadhyay wrote: Fix stall warning, to show correct nohz marker. Signed-off-by: Neeraj Upadhyay Good eyes, thank you! I applied and pushed all three with modified commit logs. Please check to

[PATCH] rcu/tree: Fix self wakeups for grace period kthread

2019-03-08 Thread Neeraj Upadhyay
ff-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index acd6ccf..57cac6d 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1585,7 +1585,7 @@ static bool rcu_future_gp_cleanup(struct rcu_node

[PATCH] cpu/hotplug: Fix acquire of st->should_run in cpuhp_thread_fun()

2018-09-04 Thread Neeraj Upadhyay
The smp_mb() in cpuhp_thread_fun() appears to be misplaced, and need to be after the load of st->should_run, to prevent reordering of the later load/stores w.r.t. the load of st->should_run. Signed-off-by: Neeraj Upadhyay --- kernel/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

Re: [PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu()

2018-09-05 Thread Neeraj Upadhyay
On 09/05/2018 05:53 PM, Thomas Gleixner wrote: On Wed, 5 Sep 2018, Thomas Gleixner wrote: On Tue, 4 Sep 2018, Neeraj Upadhyay wrote: ret = cpuhp_down_callbacks(cpu, st, target); if (ret && st->state > CPUHP_TEARDOWN_CPU &&

Re: [PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu()

2018-09-05 Thread Neeraj Upadhyay
On 09/05/2018 06:47 PM, Thomas Gleixner wrote: On Wed, 5 Sep 2018, Neeraj Upadhyay wrote: On 09/05/2018 05:53 PM, Thomas Gleixner wrote: And looking closer this is a general issue. Just that the TEARDOWN state makes it simple to observe. It's universaly broken, when the first tea

Re: [PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu()

2018-09-06 Thread Neeraj Upadhyay
On 09/06/2018 01:48 PM, Thomas Gleixner wrote: On Thu, 6 Sep 2018, Neeraj Upadhyay wrote: On 09/05/2018 06:47 PM, Thomas Gleixner wrote: On Wed, 5 Sep 2018, Neeraj Upadhyay wrote: On 09/05/2018 05:53 PM, Thomas Gleixner wrote: And looking closer this is a general issue. Just that the

[PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu()

2018-09-03 Thread Neeraj Upadhyay
reset directly in _cpu_down(). Fixes: 4dddfb5faa61 ("smp/hotplug: Rewrite AP state machine core") Signed-off-by: Neeraj Upadhyay --- kernel/cpu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index aa7fe85..9f49edb 100644 --

[PATCH] arm64: mm: fix __page_to_voff definition

2016-10-21 Thread Neeraj Upadhyay
Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'. Fixes: 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping") Signed-off-by: Neeraj Upadhyay --- arch/

[PATCH] rcu/tree: Remove CONFIG_PREMPT_RCU check in force_qs_rnp

2020-06-22 Thread Neeraj Upadhyay
leanup the code to avoid any confusion around the need for boosting, for !CONFIG_PREMPT_RCU. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 6226bfb..57c904b 100644 --- a/kernel/

Re: [PATCH] rcu/tree: Force quiescent state on callback overload

2020-06-22 Thread Neeraj Upadhyay
Hi Paul, On 6/23/2020 4:23 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 09:16:24AM +0530, Neeraj Upadhyay wrote: Hi Paul, On 6/22/2020 8:43 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 01:30:31AM +0530, Neeraj Upadhyay wrote: Hi Paul, On 6/22/2020 1:20 AM, Paul E. McKenney

Re: [PATCH] rcu/tree: Remove CONFIG_PREMPT_RCU check in force_qs_rnp

2020-06-22 Thread Neeraj Upadhyay
Hi Paul, On 6/23/2020 4:48 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 11:37:03PM +0530, Neeraj Upadhyay wrote: Remove CONFIG_PREMPT_RCU check in force_qs_rnp(). Originally, this check was required to skip executing fqs failsafe for rcu-sched, which was added in commit a77da14ce9af

Re: [PATCH v2] rcu/tree: nocb: Avoid raising softirq when there are ready to execute CBs

2020-10-08 Thread Neeraj Upadhyay
were invoked by the rcuoc kthread. This provides further evidence that there is no need to invoke rcu_core() for offloaded callbacks that are ready to invoke. Cc: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Review

Re: [PATCH v6 1/4] rcu/tree: Make rcu_do_batch count how many callbacks were executed

2020-10-14 Thread Neeraj Upadhyay
On 9/23/2020 8:52 PM, Joel Fernandes (Google) wrote: Currently, rcu_do_batch() depends on the unsegmented callback list's len field to know how many CBs are executed. This fields counts down from 0 as CBs are dequeued. It is possible that all CBs could not be run because of reaching limits in

Re: [PATCH v6 3/4] rcu/trace: Add tracing for how segcb list changes

2020-10-14 Thread Neeraj Upadhyay
On 9/23/2020 8:52 PM, Joel Fernandes (Google) wrote: Track how the segcb list changes before/after acceleration, during queuing and during dequeuing. This has proved useful to discover an optimization to avoid unwanted GP requests when there are no callbacks accelerated. The overhead is minim

Queries on ARM SDEI Linux kernel code

2020-10-14 Thread Neeraj Upadhyay
Hi James, Have few queries on ARM SDEI Linux code. Queries are listed below; can you please help provide your insights on these? 1. Looks like interrupt bind interface (SDEI_1_0_FN_SDEI_INTERRUPT_BIND) is not available for clients to use; can you please share information on why it is not pro

Re: Queries on ARM SDEI Linux kernel code

2020-10-21 Thread Neeraj Upadhyay
Hi James, Sorry for late reply. Thanks for your comments! On 10/16/2020 9:57 PM, James Morse wrote: Hi Neeraj, On 15/10/2020 07:07, Neeraj Upadhyay wrote: 1. Looks like interrupt bind interface (SDEI_1_0_FN_SDEI_INTERRUPT_BIND) is not available for clients to use; can you please share

[PATCH] rcu: Check and report missed fqs timer wakeup on RCU stall

2020-11-11 Thread Neeraj Upadhyay
timed wait, which is done in RCU_GP_WAIT_FQS) its possible that RCU kthread never wakes up. Report the same from stall warnings, if GP thread is in RCU_GP_WAIT_FQS state, and the timeout has elapsed and the kthread is not woken. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 25 +

Re: [PATCH] rcu: Check and report missed fqs timer wakeup on RCU stall

2020-11-16 Thread Neeraj Upadhyay
Hi Paul, On 11/12/2020 1:01 AM, Paul E. McKenney wrote: On Wed, Nov 11, 2020 at 07:37:37PM +0530, Neeraj Upadhyay wrote: For a new grace period request, RCU GP kthread transitions through following states: a. [RCU_GP_WAIT_GPS] -> [RCU_GP_DONE_GPS] Initial state, where GP kthread waits fo

[PATCH V2] rcu: Check and report missed fqs timer wakeup on RCU stall

2020-11-16 Thread Neeraj Upadhyay
timed wait, which is done in RCU_GP_WAIT_FQS) its possible that RCU kthread never wakes up. Report the same from stall warnings, if GP thread is in RCU_GP_WAIT_FQS state, and the timeout has elapsed and the kthread is not woken. Signed-off-by: Neeraj Upadhyay --- Changes in V2: - Documentation

Re: [PATCH v9 2/7] rcu/segcblist: Add counters to segcblist datastructure

2020-11-04 Thread Neeraj Upadhyay
andes (Google) --- Reviewed-by: Neeraj Upadhyay include/linux/rcu_segcblist.h | 1 + kernel/rcu/rcu_segcblist.c| 120 ++ kernel/rcu/rcu_segcblist.h| 2 - 3 files changed, 79 insertions(+), 44 deletions(-) diff --git a/include/linux/rcu_segcblist.h b/

Re: [PATCH v9 3/7] srcu: Fix invoke_rcu_callbacks() segcb length adjustment

2020-11-04 Thread Neeraj Upadhyay
ength. Reviewed-by: Frederic Weisbecker Suggested-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) --- Reviewed-by: Neeraj Upadhyay kernel/rcu/srcutree.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c

Re: [PATCH v9 4/7] rcu/trace: Add tracing for how segcb list changes

2020-11-04 Thread Neeraj Upadhyay
minimal as each segment's length is now stored in the respective segment. Reviewed-by: Frederic Weisbecker Reviewed-by: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 25 + kernel/rcu/rcu_segcblist.c

[PATCH] rcu/tree: Correctly handle single cpu check in rcu_blocking_is_gp

2020-09-21 Thread Neeraj Upadhyay
t path waits for all read side sections, where incoming/outgoing cpus are considered online, for RCU i.e. after rcu_cpu_starting() and before rcu_report_dead(). Signed-off-by: Neeraj Upadhyay --- Below is the reproducer for issue described in point 3; this snippet is based on klitmus generated te

Re: [PATCH V2] rcu/tree: Correctly handle single cpu check in rcu_blocking_is_gp

2020-09-23 Thread Neeraj Upadhyay
Hi Paul, On 9/24/2020 2:33 AM, Paul E. McKenney wrote: On Wed, Sep 23, 2020 at 12:59:33PM +0530, Neeraj Upadhyay wrote: Currently, for non-preempt kernels (with CONFIG_PREEMPTION=n), rcu_blocking_is_gp() checks (with preemption disabled), whether there is only one cpu online. It uses

[PATCH] rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config

2020-09-23 Thread Neeraj Upadhyay
Clarify the "x" in rcuox/N naming in RCU_NOCB_CPU config description. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/Kconfig | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index b71e21f..5b22747 100644 --- a/

Re: [PATCH] rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config

2020-09-24 Thread Neeraj Upadhyay
Hi Paul, On 9/25/2020 4:29 AM, Paul E. McKenney wrote: On Thu, Sep 24, 2020 at 12:04:10PM +0530, Neeraj Upadhyay wrote: Clarify the "x" in rcuox/N naming in RCU_NOCB_CPU config description. Signed-off-by: Neeraj Upadhyay Applied with a few additional updates as shown below.

Re: [PATCH] rcu/tree: Correctly handle single cpu check in rcu_blocking_is_gp

2020-09-23 Thread Neeraj Upadhyay
Hi Paul, On 9/23/2020 1:59 AM, Paul E. McKenney wrote: On Tue, Sep 22, 2020 at 01:15:57AM +0530, Neeraj Upadhyay wrote: Currently, for non-preempt kernels (with CONFIG_PREEMPTION=n), rcu_blocking_is_gp() checks (with preemption disabled), whether there is only one cpu online. It uses

[PATCH V2] rcu/tree: Correctly handle single cpu check in rcu_blocking_is_gp

2020-09-23 Thread Neeraj Upadhyay
ordering gurantees. rcu_state.n_online_cpus update from control cpu would result in unnecessary calls to synchronize_rcu() slow path during the CPU-online process, but that should have negligible impact. Signed-off-by: Neeraj Upadhyay --- Changes in V2: - Make rcu_state.n_online_cpus int, instead of atomic

[PATCH v2] pinctrl: qcom: Add irq_enable callback for msm gpio

2019-06-17 Thread Neeraj Upadhyay
that these unexpected interrupts gets cleared. Signed-off-by: Srinivas Ramana Signed-off-by: Neeraj Upadhyay --- Changes since v1: - Extracted common code into __msm_gpio_irq_unmask(). drivers/pinctrl/qcom/pinctrl-msm.c | 25 - 1 file changed, 24 insertions(+), 1 deletion

Re: Fwd: Re: [PATCH] pinctrl: qcom: Clear status bit on irq_unmask

2019-06-17 Thread Neeraj Upadhyay
Quoting tengf...@codeaurora.org (2019-06-11 03:41:26) On 2019-06-10 22:51, Stephen Boyd wrote: > Quoting Linus Walleij (2019-06-07 14:08:10) >> On Fri, May 31, 2019 at 8:52 AM Tengfei Fan >> wrote: >> >> > The gpio interrupt status bit is getting set after the >> > irq is disabled and causi

Re: Fwd: Re: [PATCH] pinctrl: qcom: Clear status bit on irq_unmask

2019-06-17 Thread Neeraj Upadhyay
Thanks for the review, Linus. On 6/17/19 5:20 PM, Linus Walleij wrote: On Mon, Jun 17, 2019 at 12:35 PM Neeraj Upadhyay wrote: Hi Stephen, there is one use case with is not covered by commit b55326dc969e ( "pinctrl: msm: Really mask level interrupts to prevent latching"). That ha

[PATCH] rcu/tree: Force quiescent state on callback overload

2020-06-21 Thread Neeraj Upadhyay
On callback overload, we want to force quiescent state immediately, for the first and second fqs. Enforce the same, by including RCU_GP_FLAG_OVLD flag, in fqsstart check. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH] rcu/tree: Force quiescent state on callback overload

2020-06-21 Thread Neeraj Upadhyay
Hi Paul, On 6/22/2020 1:20 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 12:07:27AM +0530, Neeraj Upadhyay wrote: On callback overload, we want to force quiescent state immediately, for the first and second fqs. Enforce the same, by including RCU_GP_FLAG_OVLD flag, in fqsstart check

Re: [PATCH] rcu/tree: Force quiescent state on callback overload

2020-06-21 Thread Neeraj Upadhyay
Hi Paul, On 6/22/2020 8:43 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 01:30:31AM +0530, Neeraj Upadhyay wrote: Hi Paul, On 6/22/2020 1:20 AM, Paul E. McKenney wrote: On Mon, Jun 22, 2020 at 12:07:27AM +0530, Neeraj Upadhyay wrote: On callback overload, we want to force quiescent

Query regarding pseudo nmi support on GIC V3 and request_nmi()

2020-05-07 Thread Neeraj Upadhyay
Hi, I have one query regarding pseudo NMI support on GIC v3; from what I could understand, GIC v3 supports pseudo NMI setup for SPIs and PPIs. However the request_nmi() in irq framework requires NMI to be per cpu interrupt source (it checks for IRQF_PERCPU). Can you please help understand this

Re: Query regarding pseudo nmi support on GIC V3 and request_nmi()

2020-05-08 Thread Neeraj Upadhyay
Hi Marc, On 5/8/2020 4:15 PM, Marc Zyngier wrote: On Thu, 07 May 2020 17:06:19 +0100, Neeraj Upadhyay wrote: Hi, I have one query regarding pseudo NMI support on GIC v3; from what I could understand, GIC v3 supports pseudo NMI setup for SPIs and PPIs. However the request_nmi() in irq

Re: Query regarding pseudo nmi support on GIC V3 and request_nmi()

2020-05-08 Thread Neeraj Upadhyay
Hi Marc, On 5/8/2020 5:57 PM, Marc Zyngier wrote: On Fri, 8 May 2020 16:36:42 +0530 Neeraj Upadhyay wrote: Hi Marc, On 5/8/2020 4:15 PM, Marc Zyngier wrote: On Thu, 07 May 2020 17:06:19 +0100, Neeraj Upadhyay wrote: Hi, I have one query regarding pseudo NMI support on GIC v3; from what

Re: Query regarding pseudo nmi support on GIC V3 and request_nmi()

2020-05-08 Thread Neeraj Upadhyay
Hi Marc, On 5/8/2020 6:23 PM, Marc Zyngier wrote: On Fri, 8 May 2020 18:09:00 +0530 Neeraj Upadhyay wrote: Hi Marc, On 5/8/2020 5:57 PM, Marc Zyngier wrote: On Fri, 8 May 2020 16:36:42 +0530 Neeraj Upadhyay wrote: Hi Marc, On 5/8/2020 4:15 PM, Marc Zyngier wrote: On Thu, 07 May

Re: Query regarding pseudo nmi support on GIC V3 and request_nmi()

2020-05-08 Thread Neeraj Upadhyay
Hi Marc, Thanks a lot for your comments. I will work on exploring how SDEI can be used for it. Thanks Neeraj On 5/8/2020 9:41 PM, Marc Zyngier wrote: On Fri, 08 May 2020 14:34:10 +0100, Neeraj Upadhyay wrote: Hi Marc, On 5/8/2020 6:23 PM, Marc Zyngier wrote: On Fri, 8 May 2020 18:09

Query regarding synchronize_sched_expedited and resched_cpu

2017-09-15 Thread Neeraj Upadhyay
Hi, We have one query regarding the behavior of RCU expedited grace period, for scenario where resched_cpu() in sync_sched_exp_handler() fails to acquire the rq lock and returns w/o setting the need_resched. In this case, how do we ensure that the CPU notify rcu about the end of sched grace perio

[PATCH] cgroup: Fix potential race between cgroup_exit and cpuset_attach

2017-08-30 Thread Neeraj Upadhyay
data abort Fix this by adding a checking to verify that css is set from cgroup_taskset_first(), before proceeding. Signed-off-by: Neeraj Upadhyay --- Hi, We observed this issue for cgroup code corresponding to stable v4.4.85 snapshot 3144d81 ("cgroup, kthread: close race window where new

[PATCH] cgroup: Fix potential race between cgroup_exit and migrate path

2017-08-30 Thread Neeraj Upadhyay
) cgroup_pidlist_start() css_task_iter_next() __put_task_struct() Fix this problem, by moving the css_set and cg_list fetch in cgroup_exit() inside css_set lock. Signed-off-by: Neeraj Upadhyay --- Hi, We observed this issue for cgroup code corresponding to stable v4.4.85 snapshot

Re: Query regarding synchronize_sched_expedited and resched_cpu

2017-09-16 Thread Neeraj Upadhyay
On 09/17/2017 06:30 AM, Paul E. McKenney wrote: On Fri, Sep 15, 2017 at 04:44:38PM +0530, Neeraj Upadhyay wrote: Hi, We have one query regarding the behavior of RCU expedited grace period, for scenario where resched_cpu() in sync_sched_exp_handler() fails to acquire the rq lock and returns w

Re: [PATCH] cgroup: Fix potential race between cgroup_exit and migrate path

2017-09-04 Thread Neeraj Upadhyay
On 08/31/2017 06:42 AM, Tejun Heo wrote: On Wed, Aug 30, 2017 at 06:03:19PM -0700, Tejun Heo wrote: Oops, more like the following. diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index df2e0f1..6f34025 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -683,7 +68

  1   2   3   >