tick/rcu: Fix false positive "softirq work is pending" messages #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
commit 96c1fa0 upstream.
In commit 0345691 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle") the new function report_idle_softirq() was created by breaking code out of the existing can_stop_idle_tick() for kernels v5.18 and newer.
In doing so, the code essentially went from a one conditional:
to a three conditional:
But that conversion got the condition for the RT specific local_bh_blocked() wrong. The original condition was:
but the conversion failed to negate it so it ended up as:
This issue lay dormant until another fixup for the same commit was added in commit a7e282c ("tick/rcu: Fix bogus ratelimit condition"). This commit realized the ratelimit was essentially set to zero instead of ten, and hence no softirq pending messages would ever be issued.
Once this commit was backported via linux-stable, both the v6.1 and v6.4 preempt-rt kernels started printing out 10 instances of this at boot:
NOHZ tick-stop error: local softirq work is pending, handler #80!!!
Remove the negation and return when local_bh_blocked() evaluates to true to bring the correct behaviour back.
Fixes: 0345691 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle")
Tested-by: Ahmad Fatoum a.fatoum@pengutronix.de
Reviewed-by: Wen Yang wenyang.linux@foxmail.com
Acked-by: Frederic Weisbecker frederic@kernel.org
Link: https://lore.kernel.org/r/20230818200757.1808398-1-paul.gortmaker@windriver.com