Commit 5d4c90d7 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu-tasks: RCU Tasks Trace grace-period kthread has implicit QS



Because the task driving the grace-period kthread is in quiescent state
throughout, this commit excludes it from the list of tasks from which
a quiescent state is needed.

This does mean that attaching a sleepable BPF program to function in
kernel/rcu/tasks.h is a bad idea, by the way.

Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: KP Singh <kpsingh@kernel.org>
parent 897ba84d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1433,8 +1433,9 @@ static void rcu_tasks_trace_pertask(struct task_struct *t,
				    struct list_head *hop)
{
	// During early boot when there is only the one boot CPU, there
	// is no idle task for the other CPUs. Just return.
	if (unlikely(t == NULL))
	// is no idle task for the other CPUs.  Also, the grace-period
	// kthread is always in a quiescent state.  Either way, just return.
	if (unlikely(t == NULL) || t == current)
		return;

	rcu_st_need_qs(t, 0);