Messages in this thread Patch in this message | | | Date | Tue, 20 Dec 2022 21:51:09 +0100 | From | Peter Zijlstra <> | 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;
| |