FROMLIST: softirq: defer softirq processing to ksoftirqd if CPU is busy with RT
Defer the softirq processing to ksoftirqd if a RT task is running or queued on the current CPU. This complements the RT task placement algorithm which tries to find a CPU that is not currently busy with softirqs. Currently NET_TX, NET_RX, BLOCK and IRQ_POLL softirqs are only deferred as they can potentially run for long time. Additionally, this patch stubs out ksoftirqd_running() logic, in the CONFIG_RT_SOFTIRQ_AWARE_SCHED case, as deferring potentially long-running softirqs will cause the logic to not process shorter-running softirqs immediately. By stubbing it out the potentially long running softirqs are deferred, but the shorter running ones can still run immediately. This patch includes folded-in fixes by: Lingutla Chandrasekhar <clingutla@codeaurora.org> Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> J. Avila <elavila@google.com> Cc: John Dias <joaodias@google.com> Cc: Connor O'Brien <connoro@google.com> Cc: Rick Yiu <rickyiu@google.com> Cc: John Kacur <jkacur@redhat.com> Cc: Qais Yousef <qyousef@google.com> Cc: Chris Redpath <chris.redpath@arm.com> Cc: Abhijeet Dharmapurikar <adharmap@quicinc.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: kernel-team@android.com Signed-off-by:Pavankumar Kondeti <pkondeti@codeaurora.org> [satyap@codeaurora.org: trivial merge conflict resolution.] Signed-off-by:
Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> [elavila: Port to mainline, squash with bugfix] Signed-off-by:
J. Avila <elavila@google.com> [jstultz: Rebase to linus/HEAD, minor rearranging of code, included bug fix Reported-by: Qais Yousef <qais.yousef@arm.com> ] Signed-off-by:
John Stultz <jstultz@google.com> Link: https://lore.kernel.org/lkml/20221116075929.453876-4-jstultz@google.com/ Change-Id: Iedb590216e373788950243165ff83f4c43015f31 Bug: 168521633 --- v4: * Fix commit message to accurately note long-running softirqs (suggested by Qais) * Switch to using rt_task(current) (suggested by Qais) v5: * Switch to using CONFIG_RT_SOFTIRQ_AWARE_SCHED (suggested by Joel Fernandes <joel@joelfernandes.org>)
Loading
Please sign in to comment