[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgUGI9qAKUh4AOUY@linutronix.de>
Date: Thu, 10 Feb 2022 13:33:39 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH REPOST] irq_poll: Add local_bh_disable() in cpu_dead
notifier
On 2022-02-08 23:56:34 [-0800], Christoph Hellwig wrote:
> On Tue, Feb 08, 2022 at 03:34:05PM +0100, Sebastian Andrzej Siewior wrote:
> > __raise_softirq_irqoff() adds a bit to the pending sofirq mask and this
> > is it. The softirq won't be handled in a deterministic way but randomly
> > when an interrupt fires and handles the softirq in its irq_exit() routine or
> > if something randomly checks and handles pending softirqs in the call
> > chain before the CPU goes idle.
> >
> > Add a local_bh_disable/enable() around the IRQ-off section which will
> > handle pending softirqs.
>
> And I still haven't seen any good explanation of why this is useful.
You need to handle the pending softirqs. If you don't handle them
immediately or in a deterministic say (like on IRQ exit) then they will
be handled at a random point. If you don't handle them at all, the CPU
will go idle and at least the NO_HZ will complain about pending softirqs
(can_stop_idle_tick()).
You could still argue that the CPU will go down and the there are
latencies involved but…
I want to avoid waking ksoftirqd for that since there is no need to wake
it and the pending work can be done in-context, right away.
Sebastian
Powered by blists - more mailing lists