Skip to content

Commit dc259ac

Browse files
committed
rcu: Account for rcu_all_qs() in cond_resched()
If cond_resched() returns false, then it has already invoked rcu_all_qs(). This is also invoked (now redundantly) by rcu_note_voluntary_context_switch(). This commit therefore changes cond_resched_rcu_qs() to invoke rcu_note_voluntary_context_switch_lite() instead of rcu_note_voluntary_context_switch() to avoid the redundant invocation of rcu_all_qs(). Signed-off-by: Paul E. McKenney <[email protected]>
1 parent f2b1760 commit dc259ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/rcupdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static inline void exit_tasks_rcu_finish(void) { }
197197
#define cond_resched_rcu_qs() \
198198
do { \
199199
if (!cond_resched()) \
200-
rcu_note_voluntary_context_switch(current); \
200+
rcu_note_voluntary_context_switch_lite(current); \
201201
} while (0)
202202

203203
/*

0 commit comments

Comments
 (0)