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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1609127268-40179-1-git-send-email-chenshiyan@linux.alibaba.com>
Date:   Mon, 28 Dec 2020 11:47:48 +0800
From:   chenshiyan <chenshiyan@...ux.alibaba.com>
To:     fweisbec@...il.com, tglx@...utronix.de, mingo@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH V1] nohz: exit nohz idle before invoking softirq

From: "shiyan.csy" <shiyan.csy@...baba-inc.com>

exit nohz idle before invoking softirq, or it maymiss
some ticks during softirq.

Signed-off-by: Shiyan Chen <chenshiyan@...ux.alibaba.com>
---
 kernel/softirq.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 9d71046..59bd6fe 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -404,6 +404,10 @@ static inline void tick_irq_exit(void)
 		if (!in_irq())
 			tick_nohz_irq_exit();
 	}
+
+	/* need to exit nohz idle if there's a softirq */
+	if (in_serving_softirq() || local_softirq_pending())
+		tick_nohz_idle_exit();
 #endif
 }
 
@@ -416,10 +420,11 @@ static inline void __irq_exit_rcu(void)
 #endif
 	account_hardirq_exit(current);
 	preempt_count_sub(HARDIRQ_OFFSET);
-	if (!in_interrupt() && local_softirq_pending())
-		invoke_softirq();
 
+	/* must call before invoke_softirq */
 	tick_irq_exit();
+	if (!in_interrupt() && local_softirq_pending())
+		invoke_softirq();
 }
 
 /**
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ