lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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;
\
 
 \ /
  Last update: 2023-03-26 23:16    [W:0.073 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site