Skip to content

Commit

Permalink
tick/rcu: Fix bogus ratelimit condition
Browse files Browse the repository at this point in the history
The ratelimit logic in report_idle_softirq() is broken because the
exit condition is always true:

	static int ratelimit;

	if (ratelimit < 10)
		return false;  ---> always returns here

	ratelimit++;           ---> no chance to run

Make it check for >= 10 instead.

Fixes: 0345691 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle")
Signed-off-by: Wen Yang <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
taskset authored and KAGA-KOKO committed Jun 18, 2023
1 parent fc4b4d9 commit a7e282c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ static bool report_idle_softirq(void)
return false;
}

if (ratelimit < 10)
if (ratelimit >= 10)
return false;

/* On RT, softirqs handling may be waiting on some lock */
Expand Down

0 comments on commit a7e282c

Please sign in to comment.