From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B0ACC433DF for ; Mon, 12 Oct 2020 22:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC8F82074A for ; Mon, 12 Oct 2020 22:12:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfJwjbcd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388470AbgJLWMq (ORCPT ); Mon, 12 Oct 2020 18:12:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387733AbgJLWMq (ORCPT ); Mon, 12 Oct 2020 18:12:46 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C204C0613D0; Mon, 12 Oct 2020 15:12:46 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id q25so5245992ioh.4; Mon, 12 Oct 2020 15:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=bfJwjbcd5PfSUcnm5iNF1BFJezZAWaVv8f4NLYg36c21R35nOTPcbZgGSeAP/BN0YC lArmVDHnZ5+zDU4S/jy3q0/lyq09lQDp6In3uxoRVf9QoEhNVCbeiBmEhgiAO4kHrK9B Hq7VkFhxWsNwnniQIXjcTgqlMxhRpcwPgURREjSvx7Dig8vrhb+HCgy+t8JOknv+TuVK SodLcbqfh2IHcOVQgsCI818lRf3F8KtPBlaBu5QgIDdgNJy8y66xgSpWB+1KJX5j86Gr jqyxILPzfhjLTUnkww//qeHeGNTskcutRLhjmBzZq5YXYW7gvwoYKQoL3WOILki0xJ0v VmPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=LAWl3dS6KGY4QdfNZ+JGrTydQYU9V8QuMXAELKsevFmOdYougzU0vHagaYbZxEcB+7 nrvSv8ie5BiBbHk4sFNRP8lEawyfg/KY10cYSqMNPesZW/EjZHiefW/l9I7TKq1hLezY BkogOo8vwLSMsFaTuvj/Ybm2yLb5itHsYoDb6srJ/mdupImwQcwrTCFft6qlyWbmoDKa l9FxuhxCcbYMUAb+/weuSG+P1o7aKvyBOEXNIydh7Hu0u+MmAiJUgrqsRSrt4t0WKJIJ Zp4UWt0j8r3rbLTduL8yRxYaFJUKMK4TUXsgbdYjA2DC8JQkYnYmmqYrQr4QS0QNYgfw oZBA== X-Gm-Message-State: AOAM532KxC6+KgL2x97nJJ4KBASjNHIllyOIqWEzDHFBSskiD+GFJv+m +9xi/Q8KU4lbHc1/JlEUlyzCXVeTZ6hqKHE/emc= X-Google-Smtp-Source: ABdhPJyFc4ostSbxsypN1wGndFqR3BXYLSDhPoPs1FLqkP0180PUNcs1Rg52RMqlZV96tqBaaMtbT66MdYmI0R8n1vU= X-Received: by 2002:a05:6638:159:: with SMTP id y25mr21753172jao.131.1602540765537; Mon, 12 Oct 2020 15:12:45 -0700 (PDT) MIME-Version: 1.0 References: <20201010103854.66746-1-songmuchun@bytedance.com> <9262ea44-fc3a-0b30-54dd-526e16df85d1@gmail.com> In-Reply-To: From: Cong Wang Date: Mon, 12 Oct 2020 15:12:34 -0700 Message-ID: Subject: Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo To: Muchun Song Cc: Eric Dumazet , Eric Dumazet , Greg KH , rafael@kernel.org, "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 , rppt@kernel.org, Sami Tolvanen , "Kirill A. Shutemov" , Feng Tang , Paolo Abeni , Willem de Bruijn , Randy Dunlap , Florian Westphal , gustavoars@kernel.org, Pablo Neira Ayuso , Dexuan Cui , Jakub Sitnicki , Peter Zijlstra , Christian Brauner , "Eric W. Biederman" , Thomas Gleixner , dave@stgolabs.net, Michel Lespinasse , Jann Horn , chenqiwu@xiaomi.com, christophe.leroy@c-s.fr, Minchan Kim , Martin KaFai Lau , Alexei Starovoitov , Daniel Borkmann , Miaohe Lin , Kees Cook , LKML , virtualization@lists.linux-foundation.org, Linux Kernel Network Developers , linux-fsdevel , linux-mm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 2: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. Well, I'd bet networking people know `ss -m` better than /proc/meminfo, generally speaking. The practice here is that if you want some networking-specific counters, add it to where networking people know better, that is, `ss -m` or /proc/net/... Or maybe the problem you described is not specific to networking at all, there must be some other places where pages are allocated but not charged. If so, adding a general mm counter in /proc/meminfo makes sense, but it won't be specific to networking. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEE4CC433E7 for ; Mon, 12 Oct 2020 22:12:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B0A72078E for ; Mon, 12 Oct 2020 22:12:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfJwjbcd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B0A72078E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 68C16900003; Mon, 12 Oct 2020 18:12:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 63AD6900002; Mon, 12 Oct 2020 18:12:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DC23900003; Mon, 12 Oct 2020 18:12:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 204EE900002 for ; Mon, 12 Oct 2020 18:12:47 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B11A6180AD806 for ; Mon, 12 Oct 2020 22:12:46 +0000 (UTC) X-FDA: 77364673932.29.lead29_0b03907271fe Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 88EF318086CD8 for ; Mon, 12 Oct 2020 22:12:46 +0000 (UTC) X-HE-Tag: lead29_0b03907271fe X-Filterd-Recvd-Size: 5976 Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 12 Oct 2020 22:12:46 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id d20so19319213iop.10 for ; Mon, 12 Oct 2020 15:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=bfJwjbcd5PfSUcnm5iNF1BFJezZAWaVv8f4NLYg36c21R35nOTPcbZgGSeAP/BN0YC lArmVDHnZ5+zDU4S/jy3q0/lyq09lQDp6In3uxoRVf9QoEhNVCbeiBmEhgiAO4kHrK9B Hq7VkFhxWsNwnniQIXjcTgqlMxhRpcwPgURREjSvx7Dig8vrhb+HCgy+t8JOknv+TuVK SodLcbqfh2IHcOVQgsCI818lRf3F8KtPBlaBu5QgIDdgNJy8y66xgSpWB+1KJX5j86Gr jqyxILPzfhjLTUnkww//qeHeGNTskcutRLhjmBzZq5YXYW7gvwoYKQoL3WOILki0xJ0v VmPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=SHVwwAhIJphGpZ3UDm6oXGn87tbPcvN9f5HY13UfdlbnlV3XNNOV13yvixcmuprUQo XniSBErzIWATZCHs1EgMFHfGiJkzIt1sQp0OjXZZrYy/qGeaMhewFECbmOt20KZi/2jF 0qFybZ6NKsce7sR6idEerrkWCxdoef6BwrdZsVU0+aXht51F2QY6SlHHy2vrThbr/AC7 W0oyQ3hQQIVX7QAnsdHwIG6eHHYAZA54Zmc1CdzPzhGmHdOAu6+Jmly50qlOrU95oOh6 PRsDK2foxnayDQfZcsi7Nvbeoqfx9AMrk3dsgg/Rfem45j7WmiVI5n9f7uQnma6+j49p vh0g== X-Gm-Message-State: AOAM531dWYA1JqJg9YmGgiYkRADIFeUi4drV6+A09K2Pq5o1uvLhFH/C 0P6PDH/YK7LBTiP3PrmOIux/ejAI/JBvWvEwdvM= X-Google-Smtp-Source: ABdhPJyFc4ostSbxsypN1wGndFqR3BXYLSDhPoPs1FLqkP0180PUNcs1Rg52RMqlZV96tqBaaMtbT66MdYmI0R8n1vU= X-Received: by 2002:a05:6638:159:: with SMTP id y25mr21753172jao.131.1602540765537; Mon, 12 Oct 2020 15:12:45 -0700 (PDT) MIME-Version: 1.0 References: <20201010103854.66746-1-songmuchun@bytedance.com> <9262ea44-fc3a-0b30-54dd-526e16df85d1@gmail.com> In-Reply-To: From: Cong Wang Date: Mon, 12 Oct 2020 15:12:34 -0700 Message-ID: Subject: Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo To: Muchun Song Cc: Eric Dumazet , Eric Dumazet , Greg KH , rafael@kernel.org, "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 , rppt@kernel.org, Sami Tolvanen , "Kirill A. Shutemov" , Feng Tang , Paolo Abeni , Willem de Bruijn , Randy Dunlap , Florian Westphal , gustavoars@kernel.org, Pablo Neira Ayuso , Dexuan Cui , Jakub Sitnicki , Peter Zijlstra , Christian Brauner , "Eric W. Biederman" , Thomas Gleixner , dave@stgolabs.net, Michel Lespinasse , Jann Horn , chenqiwu@xiaomi.com, christophe.leroy@c-s.fr, Minchan Kim , Martin KaFai Lau , Alexei Starovoitov , Daniel Borkmann , Miaohe Lin , Kees Cook , LKML , virtualization@lists.linux-foundation.org, Linux Kernel Network Developers , linux-fsdevel , linux-mm Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 12, 2020 at 2: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. Well, I'd bet networking people know `ss -m` better than /proc/meminfo, generally speaking. The practice here is that if you want some networking-specific counters, add it to where networking people know better, that is, `ss -m` or /proc/net/... Or maybe the problem you described is not specific to networking at all, there must be some other places where pages are allocated but not charged. If so, adding a general mm counter in /proc/meminfo makes sense, but it won't be specific to networking. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3283C43467 for ; Mon, 12 Oct 2020 22:12:51 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6428C21BE5 for ; Mon, 12 Oct 2020 22:12:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfJwjbcd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6428C21BE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C8FC2274FC; Mon, 12 Oct 2020 22:12:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xlgb0rW8RKKx; Mon, 12 Oct 2020 22:12:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 2D84C20348; Mon, 12 Oct 2020 22:12:49 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EE92BC0052; Mon, 12 Oct 2020 22:12:48 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id CD1C4C0051 for ; Mon, 12 Oct 2020 22:12:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AB09A20461 for ; Mon, 12 Oct 2020 22:12:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YZdnjRhRTtjR for ; Mon, 12 Oct 2020 22:12:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by silver.osuosl.org (Postfix) with ESMTPS id 5439220348 for ; Mon, 12 Oct 2020 22:12:46 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id 67so19341777iob.8 for ; Mon, 12 Oct 2020 15:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=bfJwjbcd5PfSUcnm5iNF1BFJezZAWaVv8f4NLYg36c21R35nOTPcbZgGSeAP/BN0YC lArmVDHnZ5+zDU4S/jy3q0/lyq09lQDp6In3uxoRVf9QoEhNVCbeiBmEhgiAO4kHrK9B Hq7VkFhxWsNwnniQIXjcTgqlMxhRpcwPgURREjSvx7Dig8vrhb+HCgy+t8JOknv+TuVK SodLcbqfh2IHcOVQgsCI818lRf3F8KtPBlaBu5QgIDdgNJy8y66xgSpWB+1KJX5j86Gr jqyxILPzfhjLTUnkww//qeHeGNTskcutRLhjmBzZq5YXYW7gvwoYKQoL3WOILki0xJ0v VmPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6GZ3bPMspww2V+Ym0Qh7X9pkgI/IU9Jbpf7mzdOQus0=; b=o0ae/j0eyI3j52NkQrN2HshtANcY8xPqKAZki0S0v9pME/2CkWOJCYER5sVY/zLuYw Vzyhl/oehLTxcDmf9xvzyKTJo6EuyEy9M83g/ZN2io68Kekz+dHXQ3DiMeNT6rg6E2Ro aFXqfc5XKdpj3a5s81fU4L3ouXunGZrgAP3HkQR1ceS7YkM4m+3dujoXmzJRbPotm8rK G4hirJL8rvTR0amRfEtj1G0CoTABIXe0ZMvCNHUIbO5Bj4R9Z+6T2Nzbx4zPx3GX9Fdz s2h/FdNR8vSg5W0H7GEqiYNVOBix1KD24w53I5HeGOhmdYJYxzzIMSWuASm6qYqEdBQR bdew== X-Gm-Message-State: AOAM531p0/3afbj8JmRIbDoqXU4t2Du7/XtJIy6Spec2H2cybB+8/Tj1 fVdRS+CnhaLA5gLJZOrCBshXqv52HHkT2tUlhIA= X-Google-Smtp-Source: ABdhPJyFc4ostSbxsypN1wGndFqR3BXYLSDhPoPs1FLqkP0180PUNcs1Rg52RMqlZV96tqBaaMtbT66MdYmI0R8n1vU= X-Received: by 2002:a05:6638:159:: with SMTP id y25mr21753172jao.131.1602540765537; Mon, 12 Oct 2020 15:12:45 -0700 (PDT) MIME-Version: 1.0 References: <20201010103854.66746-1-songmuchun@bytedance.com> <9262ea44-fc3a-0b30-54dd-526e16df85d1@gmail.com> In-Reply-To: From: Cong Wang Date: Mon, 12 Oct 2020 15:12:34 -0700 Message-ID: Subject: Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo To: Muchun Song Cc: Miaohe Lin , Feng Tang , Michal Hocko , "Michael S. Tsirkin" , Neil Brown , Alexei Starovoitov , LKML , linux-mm , Eric Dumazet , Christian Brauner , Michel Lespinasse , Will Deacon , Steffen Klassert , dave@stgolabs.net, Herbert Xu , Eric Dumazet , rafael@kernel.org, Dexuan Cui , Peter Zijlstra , Sami Tolvanen , Alexey Kuznetsov , Paolo Abeni , Alexey Dobriyan , Pablo Neira Ayuso , "Eric W. Biederman" , Kees Cook , Jann Horn , Shakeel Butt , Jakub Kicinski , Thomas Gleixner , virtualization@lists.linux-foundation.org, chenqiwu@xiaomi.com, Martin KaFai Lau , Jakub Sitnicki , christophe.leroy@c-s.fr, Willem de Bruijn , Daniel Borkmann , Hideaki YOSHIFUJI , Greg KH , Randy Dunlap , Florian Westphal , gustavoars@kernel.org, Roman Gushchin , Minchan Kim , rppt@kernel.org, Linux Kernel Network Developers , linux-fsdevel , Andrew Morton , David Miller , "Kirill A. Shutemov" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, Oct 12, 2020 at 2: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. Well, I'd bet networking people know `ss -m` better than /proc/meminfo, generally speaking. The practice here is that if you want some networking-specific counters, add it to where networking people know better, that is, `ss -m` or /proc/net/... Or maybe the problem you described is not specific to networking at all, there must be some other places where pages are allocated but not charged. If so, adding a general mm counter in /proc/meminfo makes sense, but it won't be specific to networking. Thanks. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization