Re: [PATCH v1 2/2] serial: 8250_dma: add parameter to queue work on specific cpu

From: Xin Zhao

Date: Wed Oct 22 2025 - 13:21:07 EST


On Wed, 22 Oct 2025 18:59:05 +0200 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

> > > This should come from a hardware definition somewhere in your DT, not as
> > > a user-selectable option. And again, why not just tie it to the cpu
> > > where the irq came from automatically?
> >
> > I don't think binding the work task to the CPU that handles the interrupt is feasible,
> > because, in practice, this hardware interrupt is evenly distributed across all cores
> > in our system.
>
> I suggest fixing that, that's ripe for lots of latency as cores hit
> cache misses and the like. Learn from the networking people, you want
> the cpu that handled the irq to handle the data processing too. They
> learned that years ago.
>
> > Moreover, from the ftrace data we captured, the IRQ handler thread that
> > wakes up the kworker threads in RT-Linux is also distributed across various CPUs by
> > default.
>
> Again, don't do that, bind things to cpus that previously handled the
> data if at all possible to avoid these latencies. That's what you are
> trying to do here anyway, so you kind of have proof of that being a
> viable solution :)

Thank you for your suggestion. I will perform the relevant interrupt affinity binding on
our system.

--
Xin Zhao