Skip to content

Commit 0db7c32

Browse files
committed
rcu-tasks: Move RTGS_WAIT_CBS to beginning of rcu_tasks_kthread() loop
Early in debugging, it made some sense to differentiate the first iteration from subsequent iterations, but now this just causes confusion. This commit therefore moves the "set_tasks_gp_state(rtp, RTGS_WAIT_CBS)" statement to the beginning of the "for" loop in rcu_tasks_kthread(). Reported-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c4f113a commit 0db7c32

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/rcu/tasks.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
197197
* This loop is terminated by the system going down. ;-)
198198
*/
199199
for (;;) {
200+
set_tasks_gp_state(rtp, RTGS_WAIT_CBS);
200201

201202
/* Pick up any new callbacks. */
202203
raw_spin_lock_irqsave(&rtp->cbs_lock, flags);
@@ -236,8 +237,6 @@ static int __noreturn rcu_tasks_kthread(void *arg)
236237
}
237238
/* Paranoid sleep to keep this from entering a tight loop */
238239
schedule_timeout_idle(rtp->gp_sleep);
239-
240-
set_tasks_gp_state(rtp, RTGS_WAIT_CBS);
241240
}
242241
}
243242

0 commit comments

Comments
 (0)