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
| ||
|
Message-ID: <ZGtltclEH1ZTBp8a@corigine.com> Date: Mon, 22 May 2023 14:53:09 +0200 From: Simon Horman <simon.horman@...igine.com> To: Abel Wu <wuyun.abel@...edance.com> Cc: "David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Glauber Costa <glommer@...allels.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2 3/4] sock: Consider memcg pressure when raising sockmem On Mon, May 22, 2023 at 03:01:21PM +0800, Abel Wu wrote: > For now __sk_mem_raise_allocated() mainly considers global socket > memory pressure and allows to raise if no global pressure observed, > including the sockets whose memcgs are in pressure, which might > result in longer memcg memstall. > > So take net-memcg's pressure into consideration when allocating > socket memory to alleviate long tail latencies. > > Signed-off-by: Abel Wu <wuyun.abel@...edance.com> > --- > net/core/sock.c | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > > diff --git a/net/core/sock.c b/net/core/sock.c > index 801df091e37a..7641d64293af 100644 > --- a/net/core/sock.c > +++ b/net/core/sock.c > @@ -2977,21 +2977,30 @@ int __sk_mem_raise_allocated(struct sock *sk, int size, int amt, int kind) > { > bool memcg_charge = mem_cgroup_sockets_enabled && sk->sk_memcg; > struct proto *prot = sk->sk_prot; > - bool charged = true; > + bool charged = true, pressured = false; > long allocated; Please preserve reverse xmas tree - longest line to shortest - for local variables in neworking code. ... -- pw-bot: cr
Powered by blists - more mailing lists