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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Jan 2020 09:51:51 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH net 3/3] udp: avoid bulk memory scheduling on memory
 pressure.



On 1/17/20 9:27 AM, Paolo Abeni wrote:
> Williem reported that after commit 0d4a6608f68c ("udp: do rmem bulk
> free even if the rx sk queue is empty") the memory allocated by
> an almost idle system with many UDP sockets can grow a lot.
> 
> This change addresses the issue enabling memory pressure tracking
> for UDP and flushing the fwd allocated memory on dequeue if the
> UDP protocol is under memory pressure.
> 
> Note that with this patch applied, the system allocates more
> liberally memory for UDP sockets while the total memory usage is
> below udp_mem[1], while the vanilla kernel would allow at most a
> single page per socket when UDP memory usage goes above udp_mem[0]
> - see __sk_mem_raise_allocated().
> 
> Reported-and-diagnosed-by: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> Fixes: commit 0d4a6608f68c ("udp: do rmem bulk free even if the rx sk queue is empty")

Not a proper Fixes: tag

Frankly I would rather revert this patch, unless you show how much things were improved.

Where in the UDP code the forward allocations will be released while udp_memory_pressure
is hit ?

TCP has many calls to sk_mem_reclaim() and sk_mem_reclaim_partial() to try
to gracefully exit memory pressure.

Powered by blists - more mailing lists