From patchwork Sun Dec 1 01:50:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11268223 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CE8A112B for ; Sun, 1 Dec 2019 01:50:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38C5D20880 for ; Sun, 1 Dec 2019 01:50:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kqxS6kGs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38C5D20880 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0CB406B0007; Sat, 30 Nov 2019 20:50:22 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A33C6B0284; Sat, 30 Nov 2019 20:50:22 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFB2F6B0287; Sat, 30 Nov 2019 20:50:21 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0027.hostedemail.com [216.40.44.27]) by kanga.kvack.org (Postfix) with ESMTP id D6ACD6B0007 for ; Sat, 30 Nov 2019 20:50:21 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 7F9502C7C for ; Sun, 1 Dec 2019 01:50:21 +0000 (UTC) X-FDA: 76214892642.01.jewel10_318d9356a91e X-Spam-Summary: 2,0,0,d44c32e9c3abf5c5,d41d8cd98f00b204,akpm@linux-foundation.org,:akpm@linux-foundation.org:chris@chrisdown.name:guro@fb.com:hannes@cmpxchg.org::mhocko@suse.com:mm-commits@vger.kernel.org:tj@kernel.org:torvalds@linux-foundation.org,RULES_HIT:41:355:379:800:877:960:967:973:988:989:1260:1263:1345:1381:1431:1437:1534:1541:1711:1730:1747:1777:1792:2393:2525:2553:2559:2564:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4416:5007:6119:6120:6261:6653:7576:7875:7901:7903:8599:8784:9010:9025:9545:10004:10913:11658:11914:12043:12048:12297:12517:12519:12555:12679:12696:12737:12783:12986:13069:13149:13230:13255:13311:13357:13846:13869:14181:14384:14721:14849:21080:21451:21627:21939:30005:30034:30045:30054:30064:30066:30070:30090,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DN SBL:neut X-HE-Tag: jewel10_318d9356a91e X-Filterd-Recvd-Size: 3113 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Dec 2019 01:50:21 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 022CB2084E; Sun, 1 Dec 2019 01:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575165020; bh=PUF9phQWCxMRf+GLoQtVw0sC+myP+JJecwJoTf8yPiM=; h=Date:From:To:Subject:From; b=kqxS6kGs1L0lUgx1rIUFNPD9Jn3RTAeoTrjaFhu0rFWA0DwZbuE/HGHwlprhV16Zb jgu5r7HYUJFMv6Xk2wYt67G2Cajv+IDZHDmNzxBRk0uxjhzf30N/5resO4DrvC/uX9 apwdpfySWGO3Tse4hV7YuGkbS52JpDjhvhMc0d80= Date: Sat, 30 Nov 2019 17:50:19 -0800 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, chris@chrisdown.name, guro@fb.com, hannes@cmpxchg.org, linux-mm@kvack.org, mhocko@suse.com, mm-commits@vger.kernel.org, tj@kernel.org, torvalds@linux-foundation.org Subject: [patch 023/158] Documentation/admin-guide/cgroup-v2.rst: document why inactive_X + active_X may not equal X Message-ID: <20191201015019.FwTkdHMCh%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 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: Chris Down Subject: Documentation/admin-guide/cgroup-v2.rst: document why inactive_X + active_X may not equal X This has confused a significant number of people using cgroups inside Facebook, and some of those outside as well judging by posts like this[0] (although it's not a problem unique to cgroup v2). If shmem handling in particular becomes more coherent at some point in the future -- although that seems unlikely now -- we can change the wording here. [0]: https://unix.stackexchange.com/q/525092/10762 Link: http://lkml.kernel.org/r/20191111144958.GA11914@chrisdown.name Signed-off-by: Chris Down Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Signed-off-by: Andrew Morton --- Documentation/admin-guide/cgroup-v2.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/Documentation/admin-guide/cgroup-v2.rst~docs-cgroup-mm-document-why-inactive_x-active_x-may-not-equal-x +++ a/Documentation/admin-guide/cgroup-v2.rst @@ -1288,7 +1288,12 @@ PAGE_SIZE multiple when read back. inactive_anon, active_anon, inactive_file, active_file, unevictable Amount of memory, swap-backed and filesystem-backed, on the internal memory management lists used by the - page reclaim algorithm + page reclaim algorithm. + + As these represent internal list state (eg. shmem pages are on anon + memory management lists), inactive_foo + active_foo may not be equal to + the value for the foo counter, since the foo counter is type-based, not + list-based. slab_reclaimable Part of "slab" that might be reclaimed, such as