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:   Tue, 13 Oct 2020 08:55:29 +0200
From:   Eric Dumazet <>
To:     Muchun Song <>,
        Eric Dumazet <>
Cc:     Eric Dumazet <>,
        Cong Wang <>,
        Greg KH <>,,
        "Michael S. Tsirkin" <>,
        Jason Wang <>,
        David Miller <>,
        Jakub Kicinski <>,
        Alexey Dobriyan <>,
        Andrew Morton <>,
        Alexey Kuznetsov <>,
        Hideaki YOSHIFUJI <>,
        Steffen Klassert <>,
        Herbert Xu <>,
        Shakeel Butt <>,
        Will Deacon <>, Michal Hocko <>,
        Roman Gushchin <>, Neil Brown <>,, Sami Tolvanen <>,
        "Kirill A. Shutemov" <>,
        Feng Tang <>,
        Paolo Abeni <>,
        Willem de Bruijn <>,
        Randy Dunlap <>,
        Florian Westphal <>,,
        Pablo Neira Ayuso <>,
        Dexuan Cui <>,
        Jakub Sitnicki <>,
        Peter Zijlstra <>,
        Christian Brauner <>,
        "Eric W. Biederman" <>,
        Thomas Gleixner <>,,
        Michel Lespinasse <>,
        Jann Horn <>,,, Minchan Kim <>,
        Martin KaFai Lau <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Miaohe Lin <>,
        Kees Cook <>,
        LKML <>,,
        Linux Kernel Network Developers <>,
        linux-fsdevel <>,
        linux-mm <>
Subject: Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo

On 10/12/20 11:53 AM, Muchun Song wrote:

> We are not complaining about TCP using too much memory, but how do
> we know that TCP uses a lot of memory. When I firstly face this problem,
> I do not know who uses the 25GB memory and it is not shown in the /proc/meminfo.
> If we can know the amount memory of the socket buffer via /proc/meminfo, we
> may not need to spend a lot of time troubleshooting this problem. Not everyone
> knows that a lot of memory may be used here. But I believe many people
> should know /proc/meminfo to confirm memory users.

Adding yet another operations in networking fast path is a high cost to pay
just to add one extra line in /proc/meminfo, while /proc/net/sockstat
is already a good proxy, with per protocol details, instead of a single bucket.

I reiterate that zero copy would make this counter out of sync,
unless special support is added (adding yet another operations ?)

Also your patch does not address gazillions of page allocations from drivers
in RX path.

Here at Google the majority of networking mm usage when hosts are under stress
is in RX path, when out of order queues start to grow in TCP sockets.

Allocations in TX path were greatly reduced and optimally sized with the introduction
of /proc/sys/net/ipv4/tcp_notsent_lowat.

We have gazillions of put_page()/__free_page()/__free_pages()/alloc_page()/... all
over the places, adding yet another tracking of "this page is used by networking stacks"
is going to be quite a big project.

I thought memcg was a better goal in the long run, lets focus on it.

Powered by blists - more mailing lists