From: "Василий Умрихин" <umrihin@nicevt•ru>
To: netdev <netdev@vger•kernel.org>
Subject: RFH, is it possible to set ndo_start_xmit() cpu affinity in ethernet driver?
Date: Mon, 12 Sep 2022 19:43:14 +0400 (MSK) [thread overview]
Message-ID: <927100312.1863.1662997394065.JavaMail.zimbra@nicevt.ru> (raw)
Hi netdev,
On the receiving side we have the opportunity to choose the CPU that will process the receive queue (RPS).
On the sender side XPS selects the send queue for the given CPU, but there is no way to select the CPU on which ndo_start_xmit() will be launched.
Taskset is able to bind user task, but in ndo_start_xmit() binding differs.
In my case CPU0 reserved for polling kthread, because our NIC have no interrupts, therefore it is necessary. I need nothing else to run on this CPU.
For example, setting CPU1 for RPS on both nodes:
host1: echo 0x2 > /sys/class/net//queues/rx-0/rps_cpus
host2: echo 0x2 > /sys/class/net//queues/rx-0/rps_cpus
Then run iperf on two nodes:
host1: taskset -c 1 iperf -s
host2: taskset -c 1 iperf -c host1
After adding pr_info("cpu%d\n", smp_processor_id()); in my ndo_start_xmit() method, see in dmesg:
host1: dmesg | grep cpu0 | wc -l
0
host2: dmesg | grep cpu0 | wc -l
6512
Is it possible to choose the CPU on which ndo_start_xmit() will be launched on the sender side?
Kind regards, Vasiliy
next reply other threads:[~2022-09-12 15:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 15:43 Василий Умрихин [this message]
2022-09-19 1:59 ` RFH, is it possible to set ndo_start_xmit() cpu affinity in ethernet driver? Sergey Ryazanov
-- strict thread matches above, loose matches on Subject: below --
2022-09-12 15:48 Василий Умрихин
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=927100312.1863.1662997394065.JavaMail.zimbra@nicevt.ru \
--to=umrihin@nicevt$(echo .)ru \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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