From: Pavel Pisa <pisa@fel.cvut.cz>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>,
linux-rt-users@vger.kernel.org, Carsten Emde <c.emde@osadl.org>,
linux-can@vger.kernel.org,
Oliver Hartkopp <socketcan@hartkopp.net>,
Jan Altenberg <Jan.Altenberg@osadl.org>,
Pavel Hronek <hronepa1@fel.cvut.cz>
Subject: Re: CAN latency measuremet on AMD/Xilinx Zynq with PREEMP_RT - added threaded NAPI configuration
Date: Fri, 18 Apr 2025 12:12:22 +0200 [thread overview]
Message-ID: <202504181212.22699.pisa@fel.cvut.cz> (raw)
In-Reply-To: <20250417081254.EUqrBagT@linutronix.de>
Hello Sebastian,
On Thursday 17 of April 2025 10:12:54 Sebastian Andrzej Siewior wrote:
> The IRQ thread should be limited to one CPU which is the same where the
> IRQ it itself is set to. I don't think that this done the NAPI thread
> automatically so it is probably free floating in the system.
you are right, I have added
taskset -p 1 $pid
in can-latester-automation/device-scripts/set-can-threaded.sh
the effect can be seen after some days on the midnight
build and testing records.
Our system is small and simple and all CAN IRQs are
mapped to CPU0 now. But I have looked if I can find some
easy way how to find affinity of the IRQ thread from
/sys/class/net/canX and have not succeed a much.
There is queues/rx-0/rps_cpus but it is probably another
level.
There is easy way to find matching kernel driver task
and copy affinity to NAPI task. But I am not sure how
much naming match is guaranteed if some interfaces aliasing
etc. is in effect. I see next names now
[irq/48-can2]
[irq/49-can3]
[irq/50-can4]
[irq/51-can5]
and
[napi/can2-19]
[napi/can3-20]
[napi/can4-21]
[napi/can5-22]
One question to Oliver, in which thread/callaback context
is running kernel CAN gateway? I think that it does not
use separate task. Because with threaded NAPI it seems
that simple user space "gateway" (task to forward all
messages from one interface to another) has more stable
results than routing of messages directly in kernel.
Some side note, project implementing FlexCAN controller
emulation for QEMU (initial target sabrelite iMX6)
is moving forward. And as Bernhard Beschow submitted
iMX8 platform support into mainline QEMU, the FlexCAN
emulation support can be extended to it in future as well.
If somebody is interested then we can somehow join
resources. Foe example if some funding is found
I would discuse if the studnet working on the thesis
project finalized by submitting iMX6 support would
be willing to continue on iMX8 or other targets support.
Best wishes,
Pavel Pisa
phone: +420 603531357
e-mail: pisa@cmp.felk.cvut.cz
Department of Control Engineering FEE CVUT
Karlovo namesti 13, 121 35, Prague 2
university: http://control.fel.cvut.cz/
personal: http://cmp.felk.cvut.cz/~pisa
social: https://social.kernel.org/ppisa
projects: https://www.openhub.net/accounts/ppisa
CAN related:http://canbus.pages.fel.cvut.cz/
RISC-V education: https://comparch.edu.cvut.cz/
Open Technologies Research Education and Exchange Services
https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home
next prev parent reply other threads:[~2025-04-18 10:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 15:29 Question for AMD/Xilinx Zynq PREEMP_RT configuration check, CAN latency measuremet and FOSDEM 2025 Pavel Pisa
2025-01-29 10:17 ` Sebastian Andrzej Siewior
2025-01-29 12:04 ` Pavel Pisa
2025-01-29 14:40 ` Sebastian Andrzej Siewior
2025-03-28 12:04 ` CAN latency measuremet on AMD/Xilinx Zynq with PREEMP_RT - added threaded NAPI configuration Pavel Pisa
2025-04-17 8:12 ` Sebastian Andrzej Siewior
2025-04-18 10:12 ` Pavel Pisa [this message]
2025-04-18 20:18 ` Oliver Hartkopp
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=202504181212.22699.pisa@fel.cvut.cz \
--to=pisa@fel.cvut.cz \
--cc=Jan.Altenberg@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=c.emde@osadl.org \
--cc=hronepa1@fel.cvut.cz \
--cc=linux-can@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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