From patchwork Mon Nov 11 14:49:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Down X-Patchwork-Id: 11237193 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 75134159A for ; Mon, 11 Nov 2019 14:50:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3783E222C2 for ; Mon, 11 Nov 2019 14:50:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="C7l91imC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3783E222C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6BC6E6B0006; Mon, 11 Nov 2019 09:50:02 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 66C0A6B0007; Mon, 11 Nov 2019 09:50:02 -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 5822A6B0008; Mon, 11 Nov 2019 09:50:02 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 3F1916B0006 for ; Mon, 11 Nov 2019 09:50:02 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id D7DED181AEF00 for ; Mon, 11 Nov 2019 14:50:01 +0000 (UTC) X-FDA: 76144281402.24.tramp90_74a158d37c743 X-Spam-Summary: 2,0,0,51181bb379312475,d41d8cd98f00b204,chris@chrisdown.name,:akpm@linux-foundation.org:hannes@cmpxchg.org:tj@kernel.org:guro@fb.com:mhocko@kernel.org:linux-kernel@vger.kernel.org:cgroups@vger.kernel.org::kernel-team@fb.com,RULES_HIT:41:355:379:800:877:960:967:973:988:989:1260:1277:1312:1313:1314:1345:1431:1437:1516:1518:1519:1534:1541:1593:1594:1595:1596:1711:1730:1747:1777:1792:2393:2525:2553:2559:2563:2682:2685:2859: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:5007:6119:6120:6261:6653:7875:7901:7903:9010:9025:10004:10400:10450:10455:11232:11658:11914:12043:12297:12517:12519:12555:12895:12986:13069:13149:13230:13311:13357:13439:13846:13869:13895:14096:14097:14181:14394:14721:19904:19999:21080:21444:21451:21627: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:n ot bulk, X-HE-Tag: tramp90_74a158d37c743 X-Filterd-Recvd-Size: 4489 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 Nov 2019 14:50:01 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id p4so14931126wrm.8 for ; Mon, 11 Nov 2019 06:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=OPnJSf+FsDJ4AK8qgreISZQp/qVRV4crg89KAbDdM7k=; b=C7l91imCRxRt/iXdRWLRpgFZp+d1cU9X9RIrPYVByasB726nYNdqnnPU+D6mL5YSmC ihwV7cizd9tDvrMcKaNzoVQxPLyM5LDI4eAZPTQ7r8KNQ960vI4xRHHlXIeCnT9flJgn DPgoxIo/FKx56KEMNcFDpRr7eoWz9x+qywUn8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=OPnJSf+FsDJ4AK8qgreISZQp/qVRV4crg89KAbDdM7k=; b=tVYoSvX3hsS+TUyCoX1Qvv2SGP1Eb4tCVvdZHy1ZpoGSKW+lBdyT0WfZmObYOzSq3U TGz8h4sRFBbsl7k2uD6+OWJRGTwNRENk40HmJWZ2ok/1nRxGdreM7XT2JQravFWMi4G7 KUpoXVnl9fR0+QXm2hJsD9jAbuQHQ23b+ns7TvEQKU5jfWJCk8iv26HYB15v4+6A0IV3 +vAw+ixLj3MXbFi7Pvlq95OPimGNfJXolJj8S13AptUm6AXrnCqemUCN0SfPhR5o3ffY /XTBHiHxjh4mpxGFKHLP01CTjztXTQNBgCckUwTp/Y526hQJiqPXhuaav8r4/YquxpUa 2iUA== X-Gm-Message-State: APjAAAXtIqhE79kP8WIynW4WtQQf0aZxhwRAhvioBx7f+Nnmk93MafG3 vcMTB0NXAbUEyiVpCMNuCQxXww== X-Google-Smtp-Source: APXvYqyMEx/gVsnYP8FYoS2VkeNr+PnO77nToZQSvqb1cbjd5mh9ksLHjNCNdtTLT41TUSF6rICRFw== X-Received: by 2002:adf:e387:: with SMTP id e7mr15450742wrm.180.1573483800231; Mon, 11 Nov 2019 06:50:00 -0800 (PST) Received: from localhost ([2620:10d:c092:180::1:3e35]) by smtp.gmail.com with ESMTPSA id w17sm8434824wrt.45.2019.11.11.06.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2019 06:49:59 -0800 (PST) Date: Mon, 11 Nov 2019 14:49:58 +0000 From: Chris Down To: Andrew Morton Cc: Johannes Weiner , Tejun Heo , Roman Gushchin , Michal Hocko , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: [PATCH] docs: cgroup: mm: Document why inactive_X + active_X may not equal X Message-ID: <20191111144958.GA11914@chrisdown.name> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) 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: 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 Signed-off-by: Chris Down Cc: Andrew Morton Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Cc: Michal Hocko Cc: linux-kernel@vger.kernel.org Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Cc: kernel-team@fb.com Acked-by: Michal Hocko --- Documentation/admin-guide/cgroup-v2.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 0704552ed94f..0636bcb60b5a 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1289,7 +1289,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