From: Jakub Kicinski Date: Fri, 12 Sep 2025 01:40:10 +0000 (-0700) Subject: Merge branch 'net-af_packet-optimize-retire-operation' X-Git-Tag: v6.18-rc1~132^2~200 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be30f56386f202530127c1c2ec55b6dd2c9489d1;p=thirdparty%2Flinux.git Merge branch 'net-af_packet-optimize-retire-operation' 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 --- be30f56386f202530127c1c2ec55b6dd2c9489d1