From patchwork Wed Apr 21 06:11:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12215491 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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 7A968C433B4 for ; Wed, 21 Apr 2021 06:11:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D9CA9613F6 for ; Wed, 21 Apr 2021 06:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9CA9613F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 691D26B006C; Wed, 21 Apr 2021 02:11:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 642446B006E; Wed, 21 Apr 2021 02:11:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CE536B0070; Wed, 21 Apr 2021 02:11:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 2FA3F6B006C for ; Wed, 21 Apr 2021 02:11:39 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CF78F4427 for ; Wed, 21 Apr 2021 06:11:38 +0000 (UTC) X-FDA: 78055352676.37.CBB34FF Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP id 1E470C0007C0 for ; Wed, 21 Apr 2021 06:11:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F65661420; Wed, 21 Apr 2021 06:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618985497; bh=YhPOHuGJ/c29KhIGdQUtJ/biKTM/tPQx+TdNyvwGiJ8=; h=From:To:Cc:Subject:Date:From; b=VtD+/yB1oLQwLgsb+e9qbA5z47LcOQckXo0SDV/pEz0+sEJEArmwhncjlEnc2AgdM lnLMn9wFn9RgtD5sLjVJGyPriC3VIccLZIgpxxPHLAGTQPSj9dEDEqncfR91faE6tE R8iMlVFIp3++aD+rEmQ/GRuGULNUWRaC6ke8cORTWi2z/Q2MT4PrnOGNTLIl43rA2L YzkyplhIpZ4ecEmPUrRU11rM09KJxnnx0FKKqDlR0fXviPVPIyUvUgORZpsgTUUrHL qHkSNzkWvo8zl7L4VrPdPLmKVjZra5M4GgGBLboGl1eEeNcy0Y8onTLIaGmTNrQlgR cE1EwTSCIcEzg== From: Mike Rapoport To: Jonathan Corbet Cc: Alexey Dobriyan , Andrew Morton , Eric Dumazet , Matthew Wilcox , Michal Hocko , Mike Rapoport , Mike Rapoport , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org Subject: [PATCH v3] docs: proc.rst: meminfo: briefly describe gaps in memory accounting Date: Wed, 21 Apr 2021 09:11:27 +0300 Message-Id: <20210421061127.1182723-1-rppt@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1E470C0007C0 X-Stat-Signature: xci7azknkfg58z77jmp3rd63ys8c6bdo Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618985494-323541 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: From: Mike Rapoport Add a paragraph that explains that it may happen that the counters in /proc/meminfo do not add up to the overall memory usage. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka --- v3: * Add sentense about counters overlap * Use wording suggested by Matthew v2: Link: https://lore.kernel.org/lkml/20210420121354.1160437-1-rppt@kernel.org * Add brief changelog * Fix typo * Update example about network memory usage according to Eric's comment at https://lore.kernel.org/lkml/CANn89iKprp7WYeZy4RRO5jHykprnSCcVBc7Tk14Ui_MA9OK7Fg@mail.gmail.com v1: Link: https://lore.kernel.org/lkml/20210420085105.1156640-1-rppt@kernel.org Documentation/filesystems/proc.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 48fbfc336ebf..0a07a5025571 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -929,8 +929,15 @@ meminfo ~~~~~~~ Provides information about distribution and utilization of memory. This -varies by architecture and compile options. The following is from a -16GB PIII, which has highmem enabled. You may not have all of these fields. +varies by architecture and compile options. Some of the counters reported +here overlap. The memory reported by the non overlapping counters may not +add up to the overall memory usage and the difference for some workloads +can be substantial. In many cases there are other means to find out +additional memory using subsystem specific interfaces, for instance +/proc/net/sockstat for TCP memory allocations. + +The following is from a 16GB PIII, which has highmem enabled. +You may not have all of these fields. ::