From: Greg KH <gregkh@linuxfoundation.org>
To: Xin Zhao <jackzxcui1989@163.com>
Cc: hch@infradead.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
tj@kernel.org
Subject: Re: [PATCH v1 2/2] serial: 8250_dma: add parameter to queue work on specific cpu
Date: Wed, 22 Oct 2025 18:59:05 +0200 [thread overview]
Message-ID: <2025102206-gainfully-chariot-407d@gregkh> (raw)
In-Reply-To: <20251022144707.160181-1-jackzxcui1989@163.com>
On Wed, Oct 22, 2025 at 10:47:07PM +0800, Xin Zhao 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 :)
good luck!
greg k-h
next prev parent reply other threads:[~2025-10-22 16:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 8:39 [PATCH v1 2/2] serial: 8250_dma: add parameter to queue work on specific cpu Xin Zhao
2025-10-21 11:28 ` Greg KH
2025-10-21 13:05 ` Xin Zhao
2025-10-21 16:26 ` Greg KH
2025-10-21 16:40 ` Tejun Heo
2025-10-21 17:39 ` Xin Zhao
2025-10-21 18:50 ` Tejun Heo
2025-10-22 13:59 ` Xin Zhao
2025-10-22 14:47 ` Xin Zhao
2025-10-22 16:37 ` Tejun Heo
2025-10-22 17:15 ` Xin Zhao
2025-10-22 16:59 ` Greg KH [this message]
2025-10-22 17:20 ` Xin Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025102206-gainfully-chariot-407d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jackzxcui1989@163.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox