Commit 0db7c32a authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent c4f113ac
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
	 * This loop is terminated by the system going down.  ;-)
	 */
	for (;;) {
		set_tasks_gp_state(rtp, RTGS_WAIT_CBS);

		/* Pick up any new callbacks. */
		raw_spin_lock_irqsave(&rtp->cbs_lock, flags);
@@ -236,8 +237,6 @@ static int __noreturn rcu_tasks_kthread(void *arg)
		}
		/* Paranoid sleep to keep this from entering a tight loop */
		schedule_timeout_idle(rtp->gp_sleep);

		set_tasks_gp_state(rtp, RTGS_WAIT_CBS);
	}
}