From patchwork Wed Nov 27 02:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanchu Xie X-Patchwork-Id: 13886514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A6D6D66BAC for ; Wed, 27 Nov 2024 02:58:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD7428D0008; Tue, 26 Nov 2024 21:58:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D5FC88D0001; Tue, 26 Nov 2024 21:58:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C00188D0008; Tue, 26 Nov 2024 21:58:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9ED418D0001 for ; Tue, 26 Nov 2024 21:58:01 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 475311615B1 for ; Wed, 27 Nov 2024 02:58:01 +0000 (UTC) X-FDA: 82830365436.15.56DBBC2 Received: from mail-oa1-f73.google.com (mail-oa1-f73.google.com [209.85.160.73]) by imf29.hostedemail.com (Postfix) with ESMTP id DB12212000C for ; Wed, 27 Nov 2024 02:57:51 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ry9A6Yye; spf=pass (imf29.hostedemail.com: domain of 3topGZwcKCCcbXDQFKXJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--yuanchu.bounces.google.com designates 209.85.160.73 as permitted sender) smtp.mailfrom=3topGZwcKCCcbXDQFKXJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--yuanchu.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732676275; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PZpBMHL8IdsZHMO87vdTflNT6N6icPZfEjrZz1n0oFE=; b=ZZ+45ApPZ8yR/DCG2qW/HjlWFu7yaI01aOj72P+s7F9/QfroWpaKH41rUd6CK3Aud+aaJy +gK9Tna18Jkr6LQT84oJ5w/i5iL31J3CGMpx//KUZFLWGLMeMoM/Hd/f4z8fXxbtjHfgBc yRlN5AratyKO80G0qerOXcZ/i38wWNI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ry9A6Yye; spf=pass (imf29.hostedemail.com: domain of 3topGZwcKCCcbXDQFKXJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--yuanchu.bounces.google.com designates 209.85.160.73 as permitted sender) smtp.mailfrom=3topGZwcKCCcbXDQFKXJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--yuanchu.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732676275; a=rsa-sha256; cv=none; b=yWzAzsLbCVZEPbkK9OmgSPz9d4DzQZQgp8JUIbLpGXdCYGNVOJnmgj/ril5v6CCklrwX4K RJDad01lfimyKN8xVDlOIS25ruyofC0+TS05jbxPQq9H3BIO8YsHc0goPi9q5ePVUueJ8d k0/SbdA9fZ2TJEp9QecxIjuglahtjbE= Received: by mail-oa1-f73.google.com with SMTP id 586e51a60fabf-29678d451b1so3433448fac.3 for ; Tue, 26 Nov 2024 18:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1732676278; x=1733281078; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=PZpBMHL8IdsZHMO87vdTflNT6N6icPZfEjrZz1n0oFE=; b=ry9A6YyeQPQpex0mNem+Vah0XgQYL2TuRKppX2v5QieR22nbebQfARGOhblYGdWteb mVQQQNcpLd6Qs6cpRc2ws4fy/CWiKpQsHxcK//tSFTcyDTuvPniRUkjZ4n6nmCKzhL7x xSDA3zDzbIojE6kuFyDSNMrboMn8S4QKkMhtLB2TF5+qwELvDO6UmDH6mbvK8XQCFCUx zt/LRDjmZLPHP/72ylDU+k1NmRka/rQBWQZ1V0PRbvJJJpZZRuhuucmNE/ffUX8zDIPI 1jdXVufE/NIFfIEr38WrzKH/LhCpxF824I/kWiGYgYR6CAAnJFDDrFMX8RKorEkvOW6H jG9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732676278; x=1733281078; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PZpBMHL8IdsZHMO87vdTflNT6N6icPZfEjrZz1n0oFE=; b=FhFPZjyVxcmZQLbVSlUxUPBBpOrEEhx6R200KaQ+I3UjEgXIiLLI83PtlxQGj9BMAs dB61rcT/tcnxuW21bxppts3fTFCQY6TQqAxEv3QGFzK+LxMyAsNCzGiSVR66AmPoa/uD XpFMf/ewQJVzU/safxE7h/xpEHnZ6Cr06LUl7WC3vA28MSEvcaNJQal1Vhlno23+xLbh siQ5ol84E/qMQZprmdwxWuslc5TMUmJ6B2SCZSiBrK4+7JratL9/4dgyQ4m0qUYfkZes l2AGqHWIVz2qRLaN/zTPQHVQDLJiUblr1Uw/VAD2VYEuswXVpTawHDiq9pVzCmhGMyod Ia6g== X-Forwarded-Encrypted: i=1; AJvYcCVIWqmex5HB3BOu7p5yIs7tu4sEPVz9y5tsMseuRWRnVkjAbfHF7R6+swUPBfcMMqR6YZ6lhr2jIg==@kvack.org X-Gm-Message-State: AOJu0YwiqBWsKsJKcCULv/fBRb5klcLy2XlngipXGDF4pCFEqMBiP3R7 KOeHbrAUpck/6J3Gbyj/iwta5Qk/UqBLmOuMJZXVxzoBfJneGD9rtmLcsO4vhb21dq1vEnb7/cI X9FwUkQ== X-Google-Smtp-Source: AGHT+IFKHf2rAZNzRLIYi5pyoUxBdmbZ99C2meBLNg4KMzGEhTQ6C34gvUg4FAtRwQPJnnGabMdsTk0k6Rq/ X-Received: from oabuz16.prod.google.com ([2002:a05:6870:af90:b0:295:ebc2:deb2]) (user=yuanchu job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6870:5d8f:b0:297:270c:575 with SMTP id 586e51a60fabf-29dc40097dbmr1170968fac.16.1732676278453; Tue, 26 Nov 2024 18:57:58 -0800 (PST) Date: Tue, 26 Nov 2024 18:57:27 -0800 In-Reply-To: <20241127025728.3689245-1-yuanchu@google.com> Mime-Version: 1.0 References: <20241127025728.3689245-1-yuanchu@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241127025728.3689245-9-yuanchu@google.com> Subject: [PATCH v4 8/9] Docs/admin-guide/cgroup-v2: document workingset reporting From: Yuanchu Xie To: Andrew Morton , David Hildenbrand , "Aneesh Kumar K.V" , Khalid Aziz , Henry Huang , Yu Zhao , Dan Williams , Gregory Price , Huang Ying , Lance Yang , Randy Dunlap , Muhammad Usama Anjum Cc: Tejun Heo , Johannes Weiner , " =?utf-8?q?Michal_Koutn=C3=BD?= " , Jonathan Corbet , Greg Kroah-Hartman , "Rafael J. Wysocki" , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , " =?utf-8?q?Eugenio_P=C3=A9rez?= " , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Mike Rapoport , Shuah Khan , Christian Brauner , Daniel Watson , Yuanchu Xie , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org X-Rspamd-Server: rspam05 X-Stat-Signature: btwgkz8ccnanrtq4tx5n6jde6gabcgop X-Rspamd-Queue-Id: DB12212000C X-Rspam-User: X-HE-Tag: 1732676271-530389 X-HE-Meta: U2FsdGVkX1/zvtK3exkbP2EWPYLrVaagdJhspjKLkDbxVgCGI49UFs51+3j6vxTHQcztsN+FRDdquV/leQkesYn60GQlyMaf4Ak7Ml3eQadhHLYZ4ZSRYXrtSpnMUTRUpjHgcBgRqFxO2de0BZhsS3f9EmXfoSkOj3RMm7hJvlirjUgVsFhz/CEm9RHl1+Dt80B35y9sav9uBhUyhj/P+4GCtBVEXFsA3XfPm5G2yl5u60GONo+zGyUFl8V633Ez2jVaC8nbcuJmHkWLVFZ/BNHgVJMtBWjZR409d+hoXOMXKYrYMVnWhamz9h4/Wd6LSgHlNlnPWgzpqn9j3WIxlz5gEV/E1BAbRVvMQd4S3/P2cLoFGKV1YlQ0lzBROTM4FdIw5SHsP3vnsO664/LycWY2jK/DhrkYLGVur+rEUQdlP3deeLe75UxZYUY8zWLjPUSXgjvRLijuNgKHsbFQvOhyoWgB2C5yz84iTuvSv+ztkPArpn3GyaEvfJHbMColb6ATsE5k5Seeqp51fW3R5f6mOxnfAFSLz+cdSU54CosxbXSMu2owfNLGBBOFlPd3kcpUgcDC9IH3bPjwzBgFF0oxro+ilH74kcqM0PrhUdlaHSMSh8diEzXvBC9REtYsjc6VYxBFU2FVsoqLKMpxtHYk/ifuMWcPAnpqzH10eIdda7qlOLUsOdIAIJDL25Tmxs6fXgKcR/OZoFGm4OHb/7hBt+XFc2vsJNhDffaCcBwrt8wzCNJjnff+8rw89B7olnjCxHVcPp2wmVgldT+5RJ0XIj6D85ZcIzjjRwuJ61zCaha6BmOdmiKcI+JW1I+kyXe8kcn0mX77h31GVN2OWv5I8oco4CsoJ63P4PabZ3/dQnxKrdQJLDiWdD/1rr/LRpTHa7c8l904QFNBQR80hPA1OY2Sn5VZCBXfVrH3V8XMfRPn5WB95mqQc2a7kbfFiqMNvMMvoPAnaDazFLJ kf9tm7NT RMjCFzHC4zpiDwF0QsSDs1msJcwvc4ME4fbBLnikrPyzO5XLpzNEuJOTbYv8qVlXiTXe7H691g4zy8xBZxvfcTarKpMK7LYAxXcPZAEQGQe4pYSn6axKzIHdY1wANdElQJl4BpOx/EDhVrq11AV83hH34Xt+gCjaQhrzmty5qFEkTm5cKVp7IV39PmLHoVWc7LZ0SHgOTq5doW2lc6Ywzj42F4NFFYxxApWcsjzyn1OB3yGPP73MpYMGe/FmhsG/EQWUT/EE7vp8Bp2OFpQFJuD0cUgA5aNJYTak1/F63w20SWzaOEpmQkvO00dEo6rqbjmCT+ZIAH6yTTLast+QIFNGlegYiOuo6WAejcYjOQZLPNTBgLYrpcMmgkbTo87Dhzvt0v+ikhF+6WhLBFoFxpKp14M/HEawtScncgPDCEqM3hQCbLFcjj4dbEQg3H4bJWxPiqiQLuyk4a1v/YkB9SC4GNtfGxu7+cX+bMTl1Ofb2DHfIPlDQmrN2ljg9EjPEQtW/3toJdiPZnykbrkvfPamCKh/Jjjp7oWZCrO6+hDS26mMrcTtH1DszcAtiU+nvpweeCbR3pTk9dBfRVt1h75GYKQ== 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: List-Subscribe: List-Unsubscribe: Add workingset reporting documentation for better discoverability of its memcg interfaces. Point the memcg documentation to Documentation/admin-guide/mm/workingset_report.rst for more details. Signed-off-by: Yuanchu Xie --- Documentation/admin-guide/cgroup-v2.rst | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 2cb58daf3089..67a183f08245 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1784,6 +1784,41 @@ The following nested keys are defined. Shows pressure stall information for memory. See :ref:`Documentation/accounting/psi.rst ` for details. + memory.workingset.page_age + A read-only histogram which exists on non-root cgroups. + + This breaks down the cgroup's memory footprint into different + types of memory and groups them per-node into user-defined coldness + bins. + + The output format of memory.workingset.page_age is:: + + N0 + type= + type= + ... + 18446744073709551615 type= + + The type of memory can be anon, file, or new types added later. + Don't rely on the types remaining fixed. See + :ref:`Documentation/admin-guide/mm/workingset_report.rst ` + for details. + + memory.workingset.refresh_interval + A read-write nested-keyed file which exists on non-root cgroups. + + Setting it to a non-zero value for any node enables working set + reporting for that node. The default is 0 for each node. See + :ref:`Documentation/admin-guide/mm/workingset_report.rst ` + for details. + + memory.workingset.report_threshold + A read-write nested-keyed file which exists on non-root cgroups. + + The amount of milliseconds to wait before reporting the working + set again. The default is 0 for each node. See + :ref:`Documentation/admin-guide/mm/workingset_report.rst ` + for details. Usage Guidelines ~~~~~~~~~~~~~~~~