lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20230505113315.3307723-5-liujian56@huawei.com> Date: Fri, 5 May 2023 19:33:10 +0800 From: Liu Jian <liujian56@...wei.com> To: <corbet@....net>, <paulmck@...nel.org>, <frederic@...nel.org>, <quic_neeraju@...cinc.com>, <joel@...lfernandes.org>, <josh@...htriplett.org>, <boqun.feng@...il.com>, <rostedt@...dmis.org>, <mathieu.desnoyers@...icios.com>, <jiangshanlai@...il.com>, <qiang1.zhang@...el.com>, <jstultz@...gle.com>, <tglx@...utronix.de>, <sboyd@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>, <peterz@...radead.org>, <frankwoo@...gle.com>, <Rhinewuwu@...gle.com> CC: <liujian56@...wei.com>, <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <rcu@...r.kernel.org>, <netdev@...r.kernel.org> Subject: [PATCH 4/9] softirq: Allow early break From: Peter Zijlstra <peterz@...radead.org> Allow terminating the softirq processing loop without finishing the vectors. Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org> Signed-off-by: Liu Jian <liujian56@...wei.com> --- kernel/softirq.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index 48a81d8ae49a..e2cad5d108c8 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -582,6 +582,9 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) prev_count, preempt_count()); preempt_count_set(prev_count); } + + if (pending && __softirq_needs_break(start)) + break; } if (!IS_ENABLED(CONFIG_PREEMPT_RT) && @@ -590,13 +593,14 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) local_irq_disable(); - pending = local_softirq_pending(); - if (pending) { - if (!__softirq_needs_break(start) && --max_restart) - goto restart; + if (pending) + or_softirq_pending(pending); + else if ((pending = local_softirq_pending()) && + !__softirq_needs_break(start) && + --max_restart) + goto restart; - wakeup_softirqd(); - } + wakeup_softirqd(); account_softirq_exit(current); lockdep_softirq_end(in_hardirq); -- 2.34.1
Powered by blists - more mailing lists