All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rcu 0/1] RCU tasks updates for v6.8
@ 2023-12-12 17:43 Neeraj Upadhyay (AMD)
  2023-12-12 17:43 ` [PATCH rcu 1/1] rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu Neeraj Upadhyay (AMD)
  0 siblings, 1 reply; 2+ messages in thread
From: Neeraj Upadhyay (AMD) @ 2023-12-12 17:43 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, paulmck, Neeraj.Upadhyay

Hello,

This series contains RCU tasks updates:

1.      rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu.


Thanks
Neeraj

------------------------------------------------------------------------

 tasks.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH rcu 1/1] rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu
  2023-12-12 17:43 [PATCH rcu 0/1] RCU tasks updates for v6.8 Neeraj Upadhyay (AMD)
@ 2023-12-12 17:43 ` Neeraj Upadhyay (AMD)
  0 siblings, 0 replies; 2+ messages in thread
From: Neeraj Upadhyay (AMD) @ 2023-12-12 17:43 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, rostedt, paulmck, Neeraj.Upadhyay,
	Boqun Feng, Joel Fernandes, Neeraj Upadhyay

From: "Paul E. McKenney" <paulmck@kernel.org>

The task_struct structure's ->rcu_tasks_idle_cpu can be concurrently
read and written from the RCU Tasks grace-period kthread and from the
CPU on which the task_struct structure's task is running.  This commit
therefore marks the accesses appropriately.

Reported-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
---
 kernel/rcu/tasks.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index f54d5782eca0..732ad5b39946 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -975,7 +975,7 @@ static void check_holdout_task(struct task_struct *t,
 	    t->rcu_tasks_nvcsw != READ_ONCE(t->nvcsw) ||
 	    !rcu_tasks_is_holdout(t) ||
 	    (IS_ENABLED(CONFIG_NO_HZ_FULL) &&
-	     !is_idle_task(t) && t->rcu_tasks_idle_cpu >= 0)) {
+	     !is_idle_task(t) && READ_ONCE(t->rcu_tasks_idle_cpu) >= 0)) {
 		WRITE_ONCE(t->rcu_tasks_holdout, false);
 		list_del_init(&t->rcu_tasks_holdout_list);
 		put_task_struct(t);
@@ -993,7 +993,7 @@ static void check_holdout_task(struct task_struct *t,
 		 t, ".I"[is_idle_task(t)],
 		 "N."[cpu < 0 || !tick_nohz_full_cpu(cpu)],
 		 t->rcu_tasks_nvcsw, t->nvcsw, t->rcu_tasks_holdout,
-		 t->rcu_tasks_idle_cpu, cpu);
+		 data_race(t->rcu_tasks_idle_cpu), cpu);
 	sched_show_task(t);
 }
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-12 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 17:43 [PATCH rcu 0/1] RCU tasks updates for v6.8 Neeraj Upadhyay (AMD)
2023-12-12 17:43 ` [PATCH rcu 1/1] rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu Neeraj Upadhyay (AMD)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.