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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Dec 2022 21:51:09 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     Frederic Weisbecker <frederic@...nel.org>, rafael@...nel.org,
        daniel.lezcano@...aro.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, len.brown@...el.com,
        Thomas Gleixner <tglx@...utronix.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [RFC/RFT PATCH 1/2] sched/core: Check and schedule ksoftirq

On Mon, Dec 19, 2022 at 02:54:55PM -0800, srinivas pandruvada wrote:

> But after ksoftirqd_run_end(), which will renable local irq, this may
> further cause more soft irq pending. Here RCU soft irq entry continues

Right you are.. what about if we spell the idle.c thing like so instead?

Then we repeat the softirq thing every time we drop out of the idle loop
for a reschedule.

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index f26ab2675f7d..6dce49813bcc 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -381,8 +381,13 @@ void play_idle_precise(u64 duration_ns, u64 latency_ns)
 	hrtimer_start(&it.timer, ns_to_ktime(duration_ns),
 		      HRTIMER_MODE_REL_PINNED_HARD);
 
-	while (!READ_ONCE(it.done))
+	while (!READ_ONCE(it.done)) {
+		rt_mutex_lock(&per_cpu(ksoftirq_lock, cpu));
+		__run_ksoftirqd(smp_processor_id());
+		rt_mutex_unlock(&per_cpu(ksoftirq_lock, cpu));
+
 		do_idle();
+	}
 
 	cpuidle_use_deepest_state(0);
 	current->flags &= ~PF_IDLE;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ