]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'net-af_packet-optimize-retire-operation'
authorJakub Kicinski <kuba@kernel.org>
Fri, 12 Sep 2025 01:40:10 +0000 (18:40 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 12 Sep 2025 01:40:11 +0000 (18:40 -0700)
Xin Zhao says:

====================
net: af_packet: optimize retire operation

In a system with high real-time requirements, the timeout mechanism of
ordinary timers with jiffies granularity is insufficient to meet the
demands for real-time performance. Meanwhile, the optimization of CPU
usage with af_packet is quite significant. Use hrtimer instead of timer
to help compensate for the shortcomings in real-time performance.
In HZ=100 or HZ=250 system, the update of TP_STATUS_USER is not real-time
enough, with fluctuations reaching over 8ms (on a system with HZ=250).
This is unacceptable in some high real-time systems that require timely
processing of network packets. By replacing it with hrtimer, if a timeout
of 2ms is set, the update of TP_STATUS_USER can be stabilized to within
3 ms.
====================

Link: https://patch.msgid.link/20250908104549.204412-1-jackzxcui1989@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge