lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240723135742.35102-1-kerneljasonxing@gmail.com>
Date: Tue, 23 Jul 2024 21:57:42 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	horms@...nel.org
Cc: netdev@...r.kernel.org,
	Jason Xing <kernelxing@...cent.com>
Subject: [RFC PATCH net-next] net: add an entry for CONFIG_NET_RX_BUSY_POLL

From: Jason Xing <kernelxing@...cent.com>

When I was doing performance test on unix_poll(), I found out that
accessing sk->sk_ll_usec when calling sock_poll()->sk_can_busy_loop()
occupies too much time, which causes around 16% degradation. So I
decided to turn off this config, which cannot be done apparently
before this patch.

Signed-off-by: Jason Xing <kernelxing@...cent.com>
---
More data not much related if you're interested:
  5.82 │      mov   0x18(%r13),%rdx
  0.03 │      mov   %rsi,%r12
  1.76 │      mov   %rdi,%rbx
       │    sk_can_busy_loop():
  0.50 │      mov   0x104(%rdx),%r14d
 41.30 │      test  %r14d,%r14d
Note: I run 'perf record -e  L1-dcache-load-misses' to diagnose
---
 net/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/Kconfig b/net/Kconfig
index d27d0deac0bf..1f1b793984fe 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -335,8 +335,10 @@ config CGROUP_NET_CLASSID
 	  being used in cls_cgroup and for netfilter matching.
 
 config NET_RX_BUSY_POLL
-	bool
+	bool "Low latency busy poll timeout"
 	default y if !PREEMPT_RT || (PREEMPT_RT && !NETCONSOLE)
+	help
+	  Approximate time in us to spin waiting for packets on the device queue.
 
 config BQL
 	bool
-- 
2.37.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ