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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR11MB4107B44513F6BCCFDB813E23DC719@DM6PR11MB4107.namprd11.prod.outlook.com>
Date: Mon, 8 May 2023 23:22:31 +0000
From: "Chen, Tim C" <tim.c.chen@...el.com>
To: "Zhang, Cathy" <cathy.zhang@...el.com>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "davem@...emloft.net" <davem@...emloft.net>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>
CC: "Brandeburg, Jesse" <jesse.brandeburg@...el.com>, "Srinivas, Suresh"
	<suresh.srinivas@...el.com>, "You, Lizhen" <lizhen.you@...el.com>,
	"eric.dumazet@...il.com" <eric.dumazet@...il.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
Subject: RE: [PATCH 1/2] net: Keep sk->sk_forward_alloc as a proper size

Never mind. networking code has its own comment style according to
https://www.kernel.org/doc/html/v4.10/process/coding-style.html

Tim

-----Original Message-----
From: Chen, Tim C 
Sent: Monday, May 8, 2023 4:17 PM
To: Zhang, Cathy <cathy.zhang@...el.com>; edumazet@...gle.com; davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com
Cc: Brandeburg, Jesse <jesse.brandeburg@...el.com>; Srinivas, Suresh <suresh.srinivas@...el.com>; You, Lizhen <Lizhen.You@...el.com>; eric.dumazet@...il.com; netdev@...r.kernel.org
Subject: RE: [PATCH 1/2] net: Keep sk->sk_forward_alloc as a proper size

+
+	/* Reclaim memory to reduce memory pressure when multiple sockets

Improper comment style.
	/* 
	  * comment
	  */


+	 * run in parallel. However, if we reclaim all pages and keep
+	 * sk->sk_forward_alloc as small as possible, it will cause
+	 * paths like tcp_rcv_established() going to the slow path with
+	 * much higher rate for forwarded memory expansion, which leads
+	 * to contention hot points and performance drop.
+	 *
+	 * In order to avoid the above issue, it's necessary to keep
+	 * sk->sk_forward_alloc with a proper size while doing reclaim.
+	 */
+	if (reclaimable > SK_RECLAIM_THRESHOLD) {
+		reclaimable -= SK_RECLAIM_THRESHOLD;
+		__sk_mem_reclaim(sk, reclaimable);
+	}
 }
 
 /*
--
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ