From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7CB1C63709 for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233915AbjAENSE (ORCPT ); Thu, 5 Jan 2023 08:18:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234303AbjAENRZ (ORCPT ); Thu, 5 Jan 2023 08:17:25 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706705B14B; Thu, 5 Jan 2023 05:17:07 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id ge16so36167856pjb.5; Thu, 05 Jan 2023 05:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kEyDN1DoPB92rHtz9Bu6YtukEjhpZoR1SaNfSfYIFW4=; b=KZ7VuUCIf/RIhfW0Ha0Xh1OvaTK8RR2Ace8AZf12WVCOnGaDE++Tuix77O0TG+tqiI UWbd7O/vXR0K9zscx6A2zOnv4chr/TVaiURpCNyhxVrNgpvVq+IGIwz7lfE/M1oPlINT NOImTaNK7y8SYUX9EPUpfeB+pyGG+UOwZJWLFHpvj9UKA2txvhk4n80kTWxu4ASs586K ZZEhS3Z5gKACg1SwAWYMQXZ6lTapo9WARtjcGi9fJorXpCMpiMmKe1majuwpBybQ57ct aDlKlivxjCkkztxSPZMmfGBDQO3qVzGV7zDAJZOreudO+D52wAYUJ/ZO0UBifALXXsuJ P4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kEyDN1DoPB92rHtz9Bu6YtukEjhpZoR1SaNfSfYIFW4=; b=WmPjIh7eScAtC/HYbTXFef6wn9on4prUXmkGrW/QMaCVKinEx2zDhL4bFHENdc0nA+ V6s+BvnKRj/AkPEk323CDmFtj4AYN8phJ61jj+h6BNETlwGgQ8JA2RTXXZTWASo0bxIC 7mvWVNdrTxnJbw+MODf7bRSvYpl6pRluP8RvJdpmg+QVj7JP0vvs6iJAO2rtvGENrkZq Y9/MDbJTYSouOxZlRhQSzFRIT8O3FNGtlr72CD1yBTRujlS7Sf1pS3BrL+HA//Hlr6ut Jo88H+rLW0gx8wRVR4not2jU1ZFespbBYFtVnxVAkSYQBnUpNk55aU1NY89asHs4YrCA 92HA== X-Gm-Message-State: AFqh2kpYWx6bWJ+O89VOO0RG/+ytorA7wUg5/qzszP9QqZM6+lB+1TUw wP1HxqbSflCW/ycueQydTfQ= X-Google-Smtp-Source: AMrXdXua9EXcDqeZze7Fj7qX9Z1Mtd3h5heZGEbc9ZeNK053ZyPPuHU+uBZFwPujwGzBi1MnYiCLlQ== X-Received: by 2002:a17:90a:e545:b0:226:2332:a3fd with SMTP id ei5-20020a17090ae54500b002262332a3fdmr29442612pjb.5.1672924626731; Thu, 05 Jan 2023 05:17:06 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id nn2-20020a17090b38c200b001df264610c4sm4161995pjb.0.2023.01.05.05.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:05 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 7BD531042DE; Thu, 5 Jan 2023 20:16:59 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 1/9] docs: cgroup-v1: replace custom note constructs with appropriate admonition blocks Date: Thu, 5 Jan 2023 20:16:26 +0700 Message-Id: <20230105131633.553574-2-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5301; i=bagasdotme@gmail.com; h=from:subject; bh=DlZUnry3AswBM9GzCcO9SGcvMxRqxgXh0Yg3NkkBNXs=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzq6zkfwiJlWTZq4w3UpyzsfuB5u2XBOcKPWCf9efiZ8l TRiEO0pZGMS4GGTFFFkmJfI1nd5lJHKhfa0jzBxWJpAhDFycAjCRxUsZfrPHF16fd5hv0fNbsQuerm Hv9+Q/dKNXRJdnxrNENY8Iw9UM/9359n8NbLm8K+J17eds1aCraype/s+5+KVnt4jYtvkLeVgB X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Admonition constructs on the documentation use definition lists, which isn't fit for the purpose. Replace them with appropriate blocks: * Use caution:: for outdated document notice * hint:: for memo * note:: for other constructs * warning:: for memory reclaim Signed-off-by: Bagas Sanjaya --- .../admin-guide/cgroup-v1/memory.rst | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 60370f2c67b99c..d0d8c780cb6bd9 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -2,13 +2,13 @@ Memory Resource Controller =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =20 -NOTE: +.. caution:: This document is hopelessly outdated and it asks for a complete rewrite. It still contains a useful information so we are keeping it here but make sure to check the current code if you need a deeper understanding. =20 -NOTE: +.. note:: The Memory Resource Controller has generically been referred to as t= he memory controller in this document. Do not confuse memory controller used here with the memory controller that is used in hardware. @@ -274,12 +274,12 @@ The reclaim algorithm has not been modified for cgrou= ps, except that pages that are selected for reclaiming come from the per-cgroup LRU list. =20 -NOTE: - Reclaim does not work for the root cgroup, since we cannot set any - limits on the root cgroup. +.. note:: + Reclaim does not work for the root cgroup, since we cannot set any + limits on the root cgroup. =20 -Note2: - When panic_on_oom is set to "2", the whole system will panic. +.. note:: + When panic_on_oom is set to "2", the whole system will panic. =20 When oom event notifier is registered, event will be delivered. (See oom_control section) @@ -367,10 +367,10 @@ U !=3D 0, K < U: never greater than the total memory, and freely set U at the cost of h= is QoS. =20 -WARNING: - In the current implementation, memory reclaim will NOT be - triggered for a cgroup when it hits K while staying below U, which mak= es - this setup impractical. + .. warning:: + In the current implementation, memory reclaim will NOT be triggered= for + a cgroup when it hits K while staying below U, which makes this set= up + impractical. =20 U !=3D 0, K >=3D U: Since kmem charges will also be fed to the user counter and reclaim wi= ll be @@ -405,16 +405,16 @@ Since now we're in the 0 cgroup, we can alter the mem= ory limit:: =20 # echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes =20 -NOTE: - We can use a suffix (k, K, m, M, g or G) to indicate values in kilo, - mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, - Gibibytes.) +.. note:: + We can use a suffix (k, K, m, M, g or G) to indicate values in kilo, + mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, + Gibibytes.) =20 -NOTE: - We can write "-1" to reset the ``*.limit_in_bytes(unlimited)``. +.. note:: + We can write "-1" to reset the ``*.limit_in_bytes(unlimited)``. =20 -NOTE: - We cannot set limits on the root cgroup any more. +.. note:: + We cannot set limits on the root cgroup any more. =20 :: =20 @@ -574,12 +574,12 @@ recent_scanned_anon VM internal parameter. (see mm/= vmscan.c) recent_scanned_file VM internal parameter. (see mm/vmscan.c) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Memo: +.. hint:: recent_rotated means recent frequency of LRU rotation. recent_scanned means recent # of scans to LRU. showing for better debug please see the code for meanings. =20 -Note: +.. note:: Only anonymous and swap cache memory is listed as part of 'rss' stat. This should not be confused with the true 'resident set size' or the amount of physical memory used by the cgroup. @@ -710,10 +710,11 @@ If we want to change this to 1G, we can at any time u= se:: =20 # echo 1G > memory.soft_limit_in_bytes =20 -NOTE1: +.. note:: Soft limits take effect over a long period of time, since they invo= lve reclaiming memory for balancing between memory cgroups -NOTE2: + +.. note:: It is recommended to set the soft limit always below the hard limit, otherwise the hard limit will take precedence. =20 @@ -735,17 +736,20 @@ If you want to enable it:: =20 # echo (some positive value) > memory.move_charge_at_immigrate =20 -Note: +.. note:: Each bits of move_charge_at_immigrate has its own meaning about what= type of charges should be moved. See 8.2 for details. -Note: + +.. note:: Charges are moved only when you move mm->owner, in other words, a leader of a thread group. -Note: + +.. note:: If we cannot find enough space for the task in the destination cgrou= p, we try to make space by reclaiming memory. Task migration may fail if we cannot make enough space. -Note: + +.. note:: It can take several seconds if you move charges much. =20 And if you want disable it again:: --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08DA8C53210 for ; Thu, 5 Jan 2023 13:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232963AbjAENRt (ORCPT ); Thu, 5 Jan 2023 08:17:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234258AbjAENRW (ORCPT ); Thu, 5 Jan 2023 08:17:22 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B76D5AC61; Thu, 5 Jan 2023 05:17:06 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id j8-20020a17090a3e0800b00225fdd5007fso1988680pjc.2; Thu, 05 Jan 2023 05:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EUYjmNJNX3EIHXC0Kg1oUFxJ9a1dGF+07OElWAzi70E=; b=pEf0tlDI14cg718e2UjLbBPIw6gz58pcBgl/mZqJb17JoDKmf4ebY3uoHvhwaYGc4d 8//GhUDyynq9lR7EUZ6Jb13SOAUrqpVKd3I8d21JPwfc6OPxpWpQ3e7FAmPPoc503j4S Saszua8tfPTYOLVLfysVYmuwwkXPJjRc8sW4V2nJr++VrhuhpD8By2lx30peHyeKkghC MUn4aOiX7owa3KzqTQvF1fQL88hv2v21axjD4RoOxUlymmV266wrh+fKvf7Pv32Z7vLr lKQwQgQpgQdJ/DCU0VBUNvyV70VCzFBQKoJebskRh4/uNFBWOhqX2wTM8loT+ohIZLAf yj3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EUYjmNJNX3EIHXC0Kg1oUFxJ9a1dGF+07OElWAzi70E=; b=7m1fiC2fpla59L/zi0+jaHF1x1sNejBYLyVJ+rw3878YMtDEF7uGBGgGZjpkvhUMR9 uJXDqn2H5GP0Wf4UKHnJRKTx6EcBKDgmanqYZT3a46s4qKw9tuU2weicOi+Cvmm1XN0S FHzgR85M89iBI+iiRR7qulDhAdpsaPKUNmmj60WoL/OET/vd/Dq4+w18RA5W6Ds3B6oJ m5qJ2FgJnqxC8R/dkpDLe6atTV9sfHdvuQKC0Wgm4JlBpuZ2DpJXGquXxHhfTAbNld3J 0mWZtMwfCWCy9vIe/tjyI59JONkasBz4rvnDZM6SCgTiq0d1qriPbGfyTVQxLcJU6qaa gwVg== X-Gm-Message-State: AFqh2kpAclPZKtSkp2/GOnNMPuyKIpgJw8Rswuugw7DC2O50zjg+7EXt 89jjhnv2ccwPd+mHcYghy5o= X-Google-Smtp-Source: AMrXdXv80mGohLQSKP7xW+IpL76jo1fslPpxki49NJnSCNujtCj69FbgIT810EatTBYqeEsTWpBMLw== X-Received: by 2002:a17:902:8e81:b0:192:d5dc:c842 with SMTP id bg1-20020a1709028e8100b00192d5dcc842mr11888101plb.44.1672924625628; Thu, 05 Jan 2023 05:17:05 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id t7-20020a1709027fc700b00192d3e7eb8fsm7232005plb.252.2023.01.05.05.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:04 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id AFE841048CD; Thu, 5 Jan 2023 20:16:59 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 2/9] docs: cgroup-v1: wrap remaining admonitions in admonition blocks Date: Thu, 5 Jan 2023 20:16:27 +0700 Message-Id: <20230105131633.553574-3-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1148; i=bagasdotme@gmail.com; h=from:subject; bh=lVJicFMEl6ad4fCfED8HKHDv/aSeW7ylfz8qS3An+no=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzq4vNBYKCd3bmcV9+5uUy0z7o9MXVf7QviLr+cXonYRX St7jjlIWBjEuBlkxRZZJiXxNp3cZiVxoX+sIM4eVCWQIAxenAEzk9CKGf9b/N0rf1hF0ce5oufcnok N88nLxF9U6JlvWFldayGfc9WVkWGDful9O0+7A0yDvRIf/St5zCg7L64uXOU4pVkrT0bXgBgA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Wrap two other admonitions in appropriate blocks in order for readers to pay more attention to block contents: * hint:: for editor's note * warning:: for move charges deprecation Signed-off-by: Bagas Sanjaya --- Documentation/admin-guide/cgroup-v1/memory.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index d0d8c780cb6bd9..b0353c40639b7e 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -13,7 +13,7 @@ Memory Resource Controller memory controller in this document. Do not confuse memory controller used here with the memory controller that is used in hardware. =20 -(For editors) In this document: +.. hint:: When we mention a cgroup (cgroupfs's directory) with memory controll= er, we call it "memory cgroup". When you see git-log and source code, yo= u'll see patch's title and function names tend to use "memcg". --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69AACC54E76 for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233586AbjAENRz (ORCPT ); Thu, 5 Jan 2023 08:17:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234263AbjAENRW (ORCPT ); Thu, 5 Jan 2023 08:17:22 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE3C45C1E1; Thu, 5 Jan 2023 05:17:05 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id c6so6090671pls.4; Thu, 05 Jan 2023 05:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XHKqH/mTeMAtJX+k1fwhOFwTW56tZzYBJVqR/bzkhlc=; b=XkW/T1soWfm4Rl1XX1uhjbNQfx1mx3n00vAID2EM9vtxWbYXinFO4hH0F/Sh76u8Nt T+gnK2msfrDFO1KmUccj24rF4UB8vifHeM6vVJGG4BqzWmkF5LR+KlioizvkKNFhtzGI DqZ08ByEgPPDNotBdzpS9VmCEyShtWZsvx3n8EAJPOHu1HX5kpNBORHmuWbj2c2tqTYV kKkA+xB6Fxx4Jc5iZgdCkvewR5ElvC1Q8mCbRjR5m0aVPDHOhmprl5Z6bpMJhV7aZOd2 jqwuT8bQYA/2qPzKPL/nYTtz+E24L3VfdAWrshv08AHCMMHGZLUBryatFJX7kP89y92r Wa8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XHKqH/mTeMAtJX+k1fwhOFwTW56tZzYBJVqR/bzkhlc=; b=OTnm15MrmWvEsb1fHRhF7/EhgHWSnSUPd3G5hi+g8G02IKZK2NB9F+jVNMki++uv3l hJBPp7rkIE15AE4m2XnyN3WN/omFDH74iCZsYhGG9QtTgFjY4YdvHQNLjVpI7XCnq/Bv gslPwL7Upzm3X9QhR4E9A8oD1va6p31RCt7ji9kFc+sKfMBGz2I8hWeMhZxJgQRs2bf2 C+Lo1o1Q66iiB6XJyFGBmAKFMgQp053z9PT/VyYoLf+sW8kteOuTa6IyqNgym5chiAoa ic9Y9m0mIQAgrDma9EffSidmUB2fqSgwQMEbEaFxsg+2BJzy6N+SJhYJcyhgt0uJau3y V5BA== X-Gm-Message-State: AFqh2kqA52J4xnV0TNSqPeQalVBUQx3NSw0xYBvgriIl/PNssCvitAcB TBdJwvuAmPfWPe3vYUCCvdI= X-Google-Smtp-Source: AMrXdXuI/wFI9NZprHDOZ4C4Pqbm5J8rbYDJ/NE13dBSqovxsPA/Y3l0huJb190MwMO5oSrbIdxjoA== X-Received: by 2002:a17:902:d491:b0:192:ad82:dc98 with SMTP id c17-20020a170902d49100b00192ad82dc98mr31433592plg.34.1672924625229; Thu, 05 Jan 2023 05:17:05 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id i2-20020a170902c94200b00189618fc2d8sm26053948pla.242.2023.01.05.05.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:04 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 9720A1043E8; Thu, 5 Jan 2023 20:16:59 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 3/9] docs: cgroup-v1: use code block for locking order schema Date: Thu, 5 Jan 2023 20:16:28 +0700 Message-Id: <20230105131633.553574-4-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=903; i=bagasdotme@gmail.com; h=from:subject; bh=IgqigKn9DkjPklU4lRTNbnqTt63GfYY/akiSBYrKIlo=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzq4XDnK5Z2Dspp/XK6O/hDH/vy9jfrHcT7XO5Wcey2i5 SQp3lLIwiHExyIopskxK5Gs6vctI5EL7WkeYOaxMIEMYuDgFYCICVQz/a/lu5hjddea89ev3r8tRkp XRb02+MnYu/XFlWaNkJntyKyPDAc1vbdt6LNecrSx/q+j+h/XJHfs98c6Fk0yPFO7av6OBHQA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The locking order schema is a figure (like diagram), which should have been formatted with literal code block for consistency with other figures. Signed-off-by: Bagas Sanjaya --- Documentation/admin-guide/cgroup-v1/memory.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index b0353c40639b7e..2b807fc128c662 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -287,7 +287,7 @@ When oom event notifier is registered, event will be de= livered. 2.6 Locking ----------- =20 -Lock order is as follows: +Lock order is as follows:: =20 Page lock (PG_locked bit of page->flags) mm->page_table_lock or split pte_lock --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B780FC63707 for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234026AbjAENSK (ORCPT ); Thu, 5 Jan 2023 08:18:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234304AbjAENRZ (ORCPT ); Thu, 5 Jan 2023 08:17:25 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C9A95DE5C; Thu, 5 Jan 2023 05:17:09 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id n12so26924989pjp.1; Thu, 05 Jan 2023 05:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WcgLa2dNrRbbB5gOhzfJxjnV71pkRRr18/tvuPVFK50=; b=keDd3AgPUHBkhQi+rsF5VDBfEFxkbSMl3Vqw0PYwH/URI1zS8RogSrFV/8SHOT2rcb I133BM/nD4wJ1EadTEgtSEDHDPrcig04g3dNQ4nfkqx1gvITJcygp7HgRmME0VppT5i5 8g7EWVT/saKRIoUp1ZIB7M2O49HAmxkadDEdEUWyUhIldVpmt2TD6k1XYn5vN+l4y0t+ w5uhh7NvkckKzoRXRBq2lpxu28RhgpVqRYPd9uRQhoPdfLt59iM9m5mpmZVpxojBFHUU kKNdT2f3FiEZjnlOWzwCzGTfAEwvYMLKN2ON1apQj+lEfgkbpdE1RfunoE+Bbj/ZZ3aU 1R0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WcgLa2dNrRbbB5gOhzfJxjnV71pkRRr18/tvuPVFK50=; b=nimXTESkTyg87YRB03Cqtu6aQxviw7gE338s9xal+N5+yMZkHMWYsix/zcq3gCKhdf MPaxZgSP9ZLLPFlN5uXQ7mRSLKVbvAGtqPteAkxur7CvkWFgw+UA6ZATKfm4v39fYzJI 03wXcOUbAcjGvVXY/+bxCqL53IAsTGKhRzM1Mby79E3hLirccOCCrEkeKwr86LnkpBp9 IrovuilJUMmF+zZ9a15BfCdaqcj+xbsDzndyqHag1i5grrNICG5w4NBzOrIyAirfRtwE Qzm/KbfqLNfAY5aU3G3Qok5bJEFs6fm6JkDy41EsQMOx8aKi+a8BTAg3haEzlyt5ujQS Nlww== X-Gm-Message-State: AFqh2krtwy0NmnMWfEso9LbEbD8CJTJ3LoTs3JnURf2gmwG6qwbNBGQR CFpkn++R0jCDVNyrMapalMc= X-Google-Smtp-Source: AMrXdXtglOj8A4JpjzospA6ZVS8xDhDFh3sS/+n6zUQ0COioBhiZcJZTWPZZ7RtTN+bsVQJ0rOvuEA== X-Received: by 2002:a17:902:d491:b0:192:b40b:e41 with SMTP id c17-20020a170902d49100b00192b40b0e41mr33019419plg.61.1672924628393; Thu, 05 Jan 2023 05:17:08 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id u14-20020a170903124e00b001911e0af95dsm25982139plh.240.2023.01.05.05.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:07 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 1616D104F84; Thu, 5 Jan 2023 20:16:59 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 4/9] docs: cgroup-v1: fix footnotes Date: Thu, 5 Jan 2023 20:16:29 +0700 Message-Id: <20230105131633.553574-5-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4564; i=bagasdotme@gmail.com; h=from:subject; bh=Li+17qbQJgnbNb0Pbpw9z8Zmcq62SZTQcF9sfN0MfPE=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzq6P9OrLP7vybP+GlXoHvU8ZyVxYFBl27qn5hBWm9b4h Kzo1O0pZGMS4GGTFFFkmJfI1nd5lJHKhfa0jzBxWJpAhDFycAjCRl/4M/4wTt0d1cuy3W33uwGLZ0q yehNM3tp7XkOpxUg0Ofe9xdicjQ2d5hGC1K1+WwIaTC+q3+EedWJbbzfbB321yw8oapQW9bAA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The documentation contains external references, which some of them are marked as footnotes. Fix the syntax for them to be properly rendered as such. Non-footnote references aren't affected since the text for these is aligned the same to the footnotes. Signed-off-by: Bagas Sanjaya --- .../admin-guide/cgroup-v1/memory.rst | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 2b807fc128c662..8d1cedcf44f6ea 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -23,7 +23,7 @@ Benefits and Purpose of the memory controller =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The memory controller isolates the memory behaviour of a group of tasks -from the rest of the system. The article on LWN [12] mentions some probable +from the rest of the system. The article on LWN [12]_ mentions some probab= le uses of the memory controller. The memory controller can be used to =20 a. Isolate an application or a group of applications @@ -107,16 +107,16 @@ Brief summary of control files. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The memory controller has a long history. A request for comments for the m= emory -controller was posted by Balbir Singh [1]. At the time the RFC was posted +controller was posted by Balbir Singh [1]_. At the time the RFC was posted there were several implementations for memory control. The goal of the RFC was to build consensus and agreement for the minimal features required -for memory control. The first RSS controller was posted by Balbir Singh[2] -in Feb 2007. Pavel Emelianov [3][4][5] has since posted three versions of = the -RSS controller. At OLS, at the resource management BoF, everyone suggested -that we handle both page cache and RSS together. Another request was raised -to allow user space handling of OOM. The current memory controller is +for memory control. The first RSS controller was posted by Balbir Singh [2= ]_ +in Feb 2007. Pavel Emelianov [3]_ [4]_ [5]_ has since posted three versions +of the RSS controller. At OLS, at the resource management BoF, everyone +suggested that we handle both page cache and RSS together. Another request= was +raised to allow user space handling of OOM. The current memory controller = is at version 6; it combines both mapped (RSS) and unmapped Page -Cache Control [11]. +Cache Control [11]_. =20 2. Memory Control =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -960,15 +960,16 @@ commented and discussed quite extensively in the comm= unity. References =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -1. Singh, Balbir. RFC: Memory Controller, http://lwn.net/Articles/206697/ -2. Singh, Balbir. Memory Controller (RSS Control), +.. [1] Singh, Balbir. RFC: Memory Controller, http://lwn.net/Articles/2066= 97/ +.. [2] Singh, Balbir. Memory Controller (RSS Control), http://lwn.net/Articles/222762/ -3. Emelianov, Pavel. Resource controllers based on process cgroups +.. [3] Emelianov, Pavel. Resource controllers based on process cgroups https://lore.kernel.org/r/45ED7DEC.7010403@sw.ru -4. Emelianov, Pavel. RSS controller based on process cgroups (v2) +.. [4] Emelianov, Pavel. RSS controller based on process cgroups (v2) https://lore.kernel.org/r/461A3010.90403@sw.ru -5. Emelianov, Pavel. RSS controller based on process cgroups (v3) +.. [5] Emelianov, Pavel. RSS controller based on process cgroups (v3) https://lore.kernel.org/r/465D9739.8070209@openvz.org + 6. Menage, Paul. Control Groups v10, http://lwn.net/Articles/236032/ 7. Vaidyanathan, Srinivasan, Control Groups: Pagecache accounting and cont= rol subsystem (v3), http://lwn.net/Articles/235534/ @@ -978,7 +979,8 @@ References https://lore.kernel.org/r/464D267A.50107@linux.vnet.ibm.com 10. Singh, Balbir. Memory controller v6 test results, https://lore.kernel.org/r/20070819094658.654.84837.sendpatchset@balbir= -laptop -11. Singh, Balbir. Memory controller introduction (v6), - https://lore.kernel.org/r/20070817084228.26003.12568.sendpatchset@balb= ir-laptop -12. Corbet, Jonathan, Controlling memory use in cgroups, - http://lwn.net/Articles/243795/ + +.. [11] Singh, Balbir. Memory controller introduction (v6), + https://lore.kernel.org/r/20070817084228.26003.12568.sendpatchset@balbi= r-laptop +.. [12] Corbet, Jonathan, Controlling memory use in cgroups, + http://lwn.net/Articles/243795/ --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80E8AC54EF0 for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233640AbjAENR5 (ORCPT ); Thu, 5 Jan 2023 08:17:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234244AbjAENRW (ORCPT ); Thu, 5 Jan 2023 08:17:22 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FBD25DE44; Thu, 5 Jan 2023 05:17:05 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id o8-20020a17090a9f8800b00223de0364beso1965117pjp.4; Thu, 05 Jan 2023 05:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wkiZx8G6kdpCzam2vHq1Krq/P436bxFUUtcX4wR/YOk=; b=BAV6F8Yry5m7pE15IbeDN664RrsiJsNm9vbYob0JFJ2Ju/wOA0FWzzb/8xhmm9hA7C v/izEcjV1ZWW0M0eYpLFDCeiib6kON4L2EJObpomid/HgCPtHZuwpF/MZbVzgOOMVBxA 2eQ/j3CEQDk9/feT47ZDi8n0VmyCnOLONMBO9N6B87pyCEjB3dZEEQGjkaaTnHQVfsB1 9iSMexDvgOSQsSASKop+FTY3ugsqALhgHQCstrTJtedG0BviKysorT5ivSoL2VR9qTuN r2nMIplNNT4c3bC9AXof2DUjXncmHxPhxjzVUz8sHd3mIA/hwGrQAcq953i+u4hITGhc hlaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wkiZx8G6kdpCzam2vHq1Krq/P436bxFUUtcX4wR/YOk=; b=xedkdVEW26AnNVmWBFEklgkY1u30aLWJgM+FUV8DRJSyw2kTfaxYpHHECebQ1YAEQE ABoqkZUhHr50kczrHXEhFE71Dnby+0Ns7v0DuGAc3I8NLrxELnZAjHPZzuYrrCV3vfEQ 6bmRy6OsADzoDGs2Ail8xbDwu+/4ApCk7LzKbuAy4kk6kko+G5M52P0Y6M3oMkf9pPLN fjnLDkilpNX6uoEBbnw8EDAH60HmUopHbVmLHCqKfouhYA0s2COXh892c6Yw8r3iOzJu QlVq6qoAxFM34uuop45sV7YGeVyZcttJ6dzRC2yr1PP6FOLLHCUGhwZJQGo5ltQgDQM+ Hs0w== X-Gm-Message-State: AFqh2kpGRfdoraGX7m1uv0dzf6M7qBDP9GqElhX6IzpZx+ktgIp6d/gl Ha38Q+FAhIA7XhYeiwIFiQg= X-Google-Smtp-Source: AMrXdXvU6JEa6Mo8Z3q8vgd6itpg+H+sn8AbZc7dz53eHdr8Dq6kKktbkfhRPk9Vf4cl6fO4pJiFQg== X-Received: by 2002:a05:6a21:9218:b0:9d:efbf:787d with SMTP id tl24-20020a056a21921800b0009defbf787dmr61323421pzb.50.1672924624917; Thu, 05 Jan 2023 05:17:04 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id w1-20020a1709029a8100b001925c3ec34esm25318972plp.196.2023.01.05.05.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:04 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id E8F10104732; Thu, 5 Jan 2023 20:16:59 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 5/9] docs: cgroup-v1: move hierarchy of accounting caption Date: Thu, 5 Jan 2023 20:16:30 +0700 Message-Id: <20230105131633.553574-6-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1218; i=bagasdotme@gmail.com; h=from:subject; bh=TtcaCybTo5E7/N6tLTMu/WowHmwrmC15HAxU0Etkee0=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzm6QcbE4K32OSZZjtpvtW73vYXYp6j8ub5d/5Jc/icVt 0/PJHaUsDGJcDLJiiiyTEvmaTu8yErnQvtYRZg4rE8gQBi5OAZjIoiCG/67NdXrclae/rl4qPj1HKP 1KjaXzB8dJLA0uxtGtGaKxdxgZHjisMcn4dnP232h9H7YC7h1W0yar8uexCGecca19c8yFCwA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The caption for hierarchy of accounting figure is in the code block, which is quite odd. Move the caption into :caption: option of code-block:: directive instead. Signed-off-by: Bagas Sanjaya --- Documentation/admin-guide/cgroup-v1/memory.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 8d1cedcf44f6ea..4d96a5bbbfcfdc 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -147,7 +147,8 @@ specific data structure (mem_cgroup) associated with it. 2.2. Accounting --------------- =20 -:: +.. code-block:: + :caption: Figure 1: Hierarchy of Accounting =20 +--------------------+ | mem_cgroup | @@ -167,7 +168,6 @@ specific data structure (mem_cgroup) associated with it. | | | | +---------------+ +---------------+ =20 - (Figure 1: Hierarchy of Accounting) =20 =20 Figure 1 shows the important aspects of the controller --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F21C61DB3 for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233483AbjAENRx (ORCPT ); Thu, 5 Jan 2023 08:17:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234282AbjAENRY (ORCPT ); Thu, 5 Jan 2023 08:17:24 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA5A5DE54; Thu, 5 Jan 2023 05:17:08 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id z4-20020a17090a170400b00226d331390cso880502pjd.5; Thu, 05 Jan 2023 05:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xwHqK93GBSz13u5EOGerS6VNG9qcHKdmktoqbjmWNKQ=; b=I+haejsbxcT8QansUCm5NiZgqf2JOyk2XoX+L9ANWJ+oZ3TVmy88uTaaDIAnH60Se4 QC+8pZ1DVABAn9fbxX+01giMJL8QxVbK5JPMK71xZAR5l7hIoZ2HXOLK7XsTFATW8Ixz q5RKiApAiRwuaEXAif1bny8NJyICU1d5b6cBVkt8ozpHIt9kHXCkiP5RwaeGheITxLGD pv66I/8vKCfVNCU4pCKkHXOn0aYd0sZ7fEE9fRKjDaTaPdM6tDTlOWpzJaqe86/t7zq+ J5IuSSFoT4VVRLtFO79+qqLr4ipbuvJqdL0XtgxljHoOaC9wrD8egICm691ltJy92+D9 o4lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xwHqK93GBSz13u5EOGerS6VNG9qcHKdmktoqbjmWNKQ=; b=SZRBhVmMiC4AjJNitA9UaZdgmV30LZMKQezwkz5tDXHWz/udwr3M8Aa8QpvL2x3GDB OKjfOBJHDi/8cycQzScM7NZqHn09tg1F5iz66FS5eO49DC+vVZUuO5EsP8ub3rNBiW6j fmlfUGc5UmbiuN2bB+KlJ/odLi3f8xD4PaUS28ODP7bIj7wzYG5yFcJveL6W8XTPLpQt jRC0mRMNpmmPj9iIe5VnlrElJyQBqol+OmjNw5TIx8S8cS5fb+Cx8MBqL4DgFM6fRgiu MOWXnYaFP/DhHhfoczflMfQ63cCS1kzPtGFXOM8ViPRWJxrI+TgMPMJ2OdkTukwLKZef FU9Q== X-Gm-Message-State: AFqh2kqHDB8d86kMEpNJ957J0joXeNftD/JhnaWuNnOMVaWCn0Dnrs0P THHqOh0b6NLtZlcG6C13ulc= X-Google-Smtp-Source: AMrXdXvVQHFIAhZFjXWcvmWsd4zYjHp8TCtZNuDhrgXiXGz/KDF8sgcU0cuj/xK31xQp+cbn98HKDw== X-Received: by 2002:a17:90b:4a8c:b0:225:a8f2:fa38 with SMTP id lp12-20020a17090b4a8c00b00225a8f2fa38mr51004080pjb.21.1672924627951; Thu, 05 Jan 2023 05:17:07 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id h6-20020a63c006000000b00478b930f970sm21709710pgg.66.2023.01.05.05.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:07 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 2BC92104C58; Thu, 5 Jan 2023 20:17:00 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 6/9] docs: cgroup-v1: use bullet lists for list of stat file tables Date: Thu, 5 Jan 2023 20:16:31 +0700 Message-Id: <20230105131633.553574-7-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6795; i=bagasdotme@gmail.com; h=from:subject; bh=SoIEcDdcT5n5ldqzkBmfedkjJd/EdMw6QuqYA3S+KDs=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzm6ofK+yRrC/JWDHq/r1ulxRxxxnKLB3/v5w8IjPvxk1 Z7pEOkpZGMS4GGTFFFkmJfI1nd5lJHKhfa0jzBxWJpAhDFycAjAR325GhpZFRVP+NhbwxQf07X/ULH dQqH2NpZHRx3nVQsUaj+IvuTD8z7n7YJ5tTpdh076r6d6G/05xbVAXtfb+sau3RtPG+o4bBwA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The stat file section contains three tables, where the leading texts for them are subsection heading. Organize them in the bullet list, while demoting headings into normal text. Signed-off-by: Bagas Sanjaya --- .../admin-guide/cgroup-v1/memory.rst | 93 +++++++++---------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 4d96a5bbbfcfdc..162cc26dcddb25 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -519,60 +519,59 @@ will be charged as a new owner of it. 5.2 stat file ------------- =20 -memory.stat file includes following statistics +memory.stat file includes following statistics: =20 -per-memory cgroup local status -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * per-memory cgroup local status =20 -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D -cache # of bytes of page cache memory. -rss # of bytes of anonymous and swap cache memory (includes - transparent hugepages). -rss_huge # of bytes of anonymous transparent hugepages. -mapped_file # of bytes of mapped file (includes tmpfs/shmem) -pgpgin # of charging events to the memory cgroup. The charging - event happens each time a page is accounted as either mapped - anon page(RSS) or cache page(Page Cache) to the cgroup. -pgpgout # of uncharging events to the memory cgroup. The uncharging - event happens each time a page is unaccounted from the cgroup. -swap # of bytes of swap usage -dirty # of bytes that are waiting to get written back to the disk. -writeback # of bytes of file/anon cache that are queued for syncing to - disk. -inactive_anon # of bytes of anonymous and swap cache memory on inactive - LRU list. -active_anon # of bytes of anonymous and swap cache memory on active - LRU list. -inactive_file # of bytes of file-backed memory and MADV_FREE anonymous mem= ory( - LazyFree pages) on inactive LRU list. -active_file # of bytes of file-backed memory on active LRU list. -unevictable # of bytes of memory that cannot be reclaimed (mlocked etc). -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D + cache # of bytes of page cache memory. + rss # of bytes of anonymous and swap cache memory (includes + transparent hugepages). + rss_huge # of bytes of anonymous transparent hugepages. + mapped_file # of bytes of mapped file (includes tmpfs/shmem) + pgpgin # of charging events to the memory cgroup. The charging + event happens each time a page is accounted as either = mapped + anon page(RSS) or cache page(Page Cache) to the cgroup. + pgpgout # of uncharging events to the memory cgroup. The uncha= rging + event happens each time a page is unaccounted from the + cgroup. + swap # of bytes of swap usage + dirty # of bytes that are waiting to get written back to the= disk. + writeback # of bytes of file/anon cache that are queued for sync= ing to + disk. + inactive_anon # of bytes of anonymous and swap cache memory on inact= ive + LRU list. + active_anon # of bytes of anonymous and swap cache memory on active + LRU list. + inactive_file # of bytes of file-backed memory and MADV_FREE anonymo= us + memory (LazyFree pages) on inactive LRU list. + active_file # of bytes of file-backed memory on active LRU list. + unevictable # of bytes of memory that cannot be reclaimed (mlocked= etc). + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 -status considering hierarchy (see memory.use_hierarchy settings) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * status considering hierarchy (see memory.use_hierarchy settings): =20 -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D -hierarchical_memory_limit # of bytes of memory limit with regard to hierar= chy - under which the memory cgroup is -hierarchical_memsw_limit # of bytes of memory+swap limit with regard to - hierarchy under which memory cgroup is. + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D + hierarchical_memory_limit # of bytes of memory limit with regard to + hierarchy + under which the memory cgroup is + hierarchical_memsw_limit # of bytes of memory+swap limit with regard = to + hierarchy under which memory cgroup is. =20 -total_ # hierarchical version of , which in - addition to the cgroup's own value includes the - sum of all hierarchical children's values of - , i.e. total_cache -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + total_ # hierarchical version of , which in + addition to the cgroup's own value includes = the + sum of all hierarchical children's values of + , i.e. total_cache + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 -The following additional stats are dependent on CONFIG_DEBUG_VM -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * additional vm parameters (depends on CONFIG_DEBUG_VM): =20 -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -recent_rotated_anon VM internal parameter. (see mm/vmscan.c) -recent_rotated_file VM internal parameter. (see mm/vmscan.c) -recent_scanned_anon VM internal parameter. (see mm/vmscan.c) -recent_scanned_file VM internal parameter. (see mm/vmscan.c) -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + recent_rotated_anon VM internal parameter. (see mm/vmscan.c) + recent_rotated_file VM internal parameter. (see mm/vmscan.c) + recent_scanned_anon VM internal parameter. (see mm/vmscan.c) + recent_scanned_file VM internal parameter. (see mm/vmscan.c) + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 .. hint:: recent_rotated means recent frequency of LRU rotation. --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9874EC3DA7D for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233802AbjAENSA (ORCPT ); Thu, 5 Jan 2023 08:18:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234292AbjAENRY (ORCPT ); Thu, 5 Jan 2023 08:17:24 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA075DE4B; Thu, 5 Jan 2023 05:17:09 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id 6so22544318pfz.4; Thu, 05 Jan 2023 05:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rGNG7VnZJT5NrQNN6BhNmvq0EdhUnj+GOmFvACaLTXk=; b=lsPMxNWnGO17JgyijK7xfpZgFbuz6KdZizssrHuAy+1vnSLEkHZ63zNwolvfA1EZEs Yopw5rWH6hUbO2tHXYC4UMNhlDh78F3wuO5FOS6QUvLG84FLyKpKHbp7hgUK0mrDE266 XFK59lSLCDz2YVDChTwwU7qUKHhu1uIN5laO41h+2Xb5hv3qgLeG3wzzfnlc0bTq9PX3 B9H6zlDTXgbwY9BgPwwxV0LscCEfKgt5D2hFe+ZZT8ELPkfmsPIC1zLGoCFfwT9ptYRJ OiI/zEhACIbeIQZj4gX3ZNOIZWwBHgLZd5nSmrNibY2Y9ohvzqWNBRiWXIYx71tYtErD dHeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rGNG7VnZJT5NrQNN6BhNmvq0EdhUnj+GOmFvACaLTXk=; b=fdYVlcberWXLOPqPinDMoejrHSHbIn2e0+2Omr+rDFqe6AackPJ52AidKo8yPkEeDV EP70xVzzLcAOTwDO2oBZ8+dZXyBYQ458dk1hyUfyeEXiiB0QM9f/cNbXwwrVnx9x3Ckm Zd8hpXSRNOPbkOhW+sx9iOQdm+OJHPrnYky0y97D25QgxpdmZwIMfMDU6/fmYVh9Dk8Y /zY8EJs+UdWQO7ZARCQZuhhrQiAa1VEM61T7Qca7mpdqvvwpDGZlN2leDjSwuWEYRTlr 0jMOyIS8O4fqVdnDesNgvCopRHCzKLC97Iz9JMgbiThGohvvUzh3apxg2C1XVWKNz1oz /nwA== X-Gm-Message-State: AFqh2kqlvvGhQK7kdDD0zkVl2CLDzbQ2jMYnLZx8pXnqpsweGWU5rrp4 BXLyQgljdDW/76QSiVXwmK4= X-Google-Smtp-Source: AMrXdXsYhU5SvLd2MIx5+aPldA/gYIlM29jQgf1iNhKcsHwH0/UyoUf4ASexAZm03c0nXR9s3Xbllw== X-Received: by 2002:aa7:94b7:0:b0:583:a62:d840 with SMTP id a23-20020aa794b7000000b005830a62d840mr4575121pfl.29.1672924628904; Thu, 05 Jan 2023 05:17:08 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id t6-20020aa79466000000b005772d55df03sm13996299pfq.35.2023.01.05.05.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:07 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 4464D104F98; Thu, 5 Jan 2023 20:17:00 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 7/9] docs: cgroup-v1: make swap extension subsections subsections Date: Thu, 5 Jan 2023 20:16:32 +0700 Message-Id: <20230105131633.553574-8-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1657; i=bagasdotme@gmail.com; h=from:subject; bh=uE+t77fun6ccoXEmhoP8hbo16qhF0xOO2tCNjGXW6A8=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzm5YGvPgaJDfiTkV7UzLnq4MEK/bPdWvcsokjUbebY/v rmbK7ShlYRDjYpAVU2SZlMjXdHqXkciF9rWOMHNYmUCGMHBxCsBEqp0Y/ulb/hKJai3vXfLFNSWXae H1vUlBd6u7eT2tliVyViYL5jP84arouyobqPV75r2/0RX/O3V5z9t+3Sd1Y83q6smtj7ZZcgEA X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Subsections text of swap extension section is marked up as bold text, whereas making them proper subsection is more appropriate. Signed-off-by: Bagas Sanjaya --- Documentation/admin-guide/cgroup-v1/memory.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 162cc26dcddb25..0e583a6f783955 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -244,7 +244,8 @@ In this case, setting memsw.limit_in_bytes=3D3G will pr= event bad use of swap. By using the memsw limit, you can avoid system OOM which can be caused by = swap shortage. =20 -**why 'memory+swap' rather than swap** +2.4.1 why 'memory+swap' rather than swap +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 The global LRU(kswapd) can swap out arbitrary pages. Swap-out means to move account from memory to swap...there is no change in usage of @@ -252,7 +253,8 @@ memory+swap. In other words, when we want to limit the = usage of swap without affecting global LRU, memory+swap limit is better than just limiting swap = from an OS point of view. =20 -**What happens when a cgroup hits memory.memsw.limit_in_bytes** +2.4.2. What happens when a cgroup hits memory.memsw.limit_in_bytes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out in this cgroup. Then, swap-out will not be done by cgroup routine and file --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D561C63797 for ; Thu, 5 Jan 2023 13:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234189AbjAENSS (ORCPT ); Thu, 5 Jan 2023 08:18:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234311AbjAENR0 (ORCPT ); Thu, 5 Jan 2023 08:17:26 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8203B5F92C; Thu, 5 Jan 2023 05:17:09 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id o8-20020a17090a9f8800b00223de0364beso1965311pjp.4; Thu, 05 Jan 2023 05:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hZ9GcmF0SnvXW339uzqqW2SQ7HsUGzXwW7yu3PaudLI=; b=U+VJkAFNPjKrvuGxUMG5FdK9BV2Zgpcr6N9Kl5CPf4JeKfIn3KcOiVA/VaAvD/v8AY wf3WOuiW7daaqG5zzM3ETBToqjQQZz9HO5Ch4s0bANKwqUGuYM7mpR1Cit+3+7OZR8uG llwNqAVYDTx6gKxaENyWQWVdcNTdJRTlLX60QpIfRnldj8L8WzvSzhjOj4O/IkchuzPD +TfEUpebH94+kSE9jQgYutOw6TAh6iS7on3MOT/qMSBjURg0Wv27l73QYTWa7630M7Gf rOUrmvszK+8FStFKklPRi7svReL6kUOvahUeFEAq5VlPPUv7TglqIuiXRXh4AmBCFf7C 2Qog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hZ9GcmF0SnvXW339uzqqW2SQ7HsUGzXwW7yu3PaudLI=; b=zxVvAFWDAVBVGRBF4VAfr0+1bENW0+4ToykbkyReLOEgAZCmi+FROWJec2XBf0aqAL V9CDPeqdMW9FP9/fJiiNEsVjr+ItwwvUiVIvJB7hJCxIm0F/d65ayFG89i+6oyok5Vm4 xnoLcPdvur4issy+0IzcUvSUqyrZgeBROqrYkmmjW2OqfYpizQJBccfrbSMd89S+pSuQ s5O2uSMPvV/T5j+p0wMGc5CwxGdBupfE5bsEyQ7EOPebAkGHymWuWIRd6dIs1miZQcCm dkysz8kVnRBDMzFaxUlk6kV/VZzIVjwin1OlllANV5NcoVw2GNQXfV0N+AE/Qmp7twzZ 4BdA== X-Gm-Message-State: AFqh2kqfuumHcPxNgnQ9IhGTpVJGb5oOtHoYDszNuwOCwtwllXKKSUjp b5tVLMc0zEImtmEmyBN/Kd5PQZQNAB4= X-Google-Smtp-Source: AMrXdXuHu4fwzgNkBxVRhmF9kMBUvwsG1omHZBNxm+MdNdBHvtO8e3QpJvmHXUlPxH0xkoMG30Dwaw== X-Received: by 2002:a05:6a21:3989:b0:aa:4d33:da52 with SMTP id ad9-20020a056a21398900b000aa4d33da52mr83542173pzc.1.1672924629286; Thu, 05 Jan 2023 05:17:09 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id x124-20020a623182000000b005779110635asm24590744pfx.51.2023.01.05.05.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:07 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 62D611051E3; Thu, 5 Jan 2023 20:17:00 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 8/9] docs: cgroup-v1: add internal cross-references Date: Thu, 5 Jan 2023 20:16:33 +0700 Message-Id: <20230105131633.553574-9-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5899; i=bagasdotme@gmail.com; h=from:subject; bh=6uN0MOlYSzf0LERTdXFXUxc79s1bXfuIBUJ4wZga1/E=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzm7kiZI55vd7j6d/afRKneXuDXeknm37tFqhQ/HExAdm qs3mHaUsDGJcDLJiiiyTEvmaTu8yErnQvtYRZg4rE8gQBi5OAZhIQDjDfy9DU701t9w8MvWV1knpfg /1duwtYk6KsO957npefGftNEaGhx8mMzp0blnuy3c24tG8i2UlhjYSPofTMvU4p7jpLArlAAA= X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The documentation contains references to other sections in the doc (internal). Add cross-references for them so that these can be accessed without having to manually search for them. Signed-off-by: Bagas Sanjaya --- .../admin-guide/cgroup-v1/memory.rst | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 0e583a6f783955..16d938abe69f81 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -55,7 +55,8 @@ Features: - Root cgroup has no limit controls. =20 Kernel memory support is a work in progress, and the current version prov= ides - basically functionality. (See Section 2.7) + basically functionality. (See :ref:`section 2.7 + `) =20 Brief summary of control files. =20 @@ -221,8 +222,9 @@ behind this approach is that a cgroup that aggressively= uses a shared page will eventually get charged for it (once it is uncharged from the cgroup that brought it in -- this will happen on memory pressure). =20 -But see section 8.2: when moving a task to another cgroup, its pages may -be recharged to the new cgroup, if move_charge_at_immigrate has been chose= n. +But see :ref:`section 8.2 ` when moving a +task to another cgroup, its pages may be recharged to the new cgroup, if +move_charge_at_immigrate has been chosen. =20 2.4 Swap Extension -------------------------------------- @@ -270,7 +272,7 @@ global VM. When a cgroup goes over its limit, we first = try to reclaim memory from the cgroup so as to make space for the new pages that the cgroup has touched. If the reclaim is unsuccessful, an OOM routine is invoked to select and kill the bulkiest task in the -cgroup. (See 10. OOM Control below.) +cgroup. (See :ref:`10. OOM Control ` below.) =20 The reclaim algorithm has not been modified for cgroups, except that pages that are selected for reclaiming come from the per-cgroup LRU @@ -284,7 +286,7 @@ list. When panic_on_oom is set to "2", the whole system will panic. =20 When oom event notifier is registered, event will be delivered. -(See oom_control section) +(See :ref:`oom_control ` section) =20 2.6 Locking ----------- @@ -301,6 +303,8 @@ Per-node-per-memcgroup LRU (cgroup's private LRU) is gu= arded by lruvec->lru_lock; PG_lru bit of page->flags is cleared before isolating a page from its LRU under lruvec->lru_lock. =20 +.. _cgroup-v1-memory-kernel-extension: + 2.7 Kernel Memory Extension ----------------------------------------------- =20 @@ -460,6 +464,8 @@ test because it has noise of shared objects/status. But the above two are testing extreme situations. Trying usual test under memory controller is always helpful. =20 +.. _cgroup-v1-memory-test-troubleshoot: + 4.1 Troubleshooting ------------------- =20 @@ -472,8 +478,11 @@ terminated by the OOM killer. There are several causes= for this: A sync followed by echo 1 > /proc/sys/vm/drop_caches will help get rid of some of the pages cached in the cgroup (page cache pages). =20 -To know what happens, disabling OOM_Kill as per "10. OOM Control" (below) = and -seeing what happens will be helpful. +To know what happens, disabling OOM_Kill as per :ref:`"10. OOM Control" +` (below) and seeing what happens will be +helpful. + +.. _cgroup-v1-memory-test-task-migration: =20 4.2 Task migration ------------------ @@ -484,15 +493,16 @@ remain charged to it, the charge is dropped when the = page is freed or reclaimed. =20 You can move charges of a task along with task migration. -See 8. "Move charges at task migration" +See :ref:`8. "Move charges at task migration" ` =20 4.3 Removing a cgroup --------------------- =20 -A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2= , a -cgroup might have some charge associated with it, even though all -tasks have migrated away from it. (because we charge against pages, not -against tasks.) +A cgroup can be removed by rmdir, but as discussed in :ref:`sections 4.1 +` and :ref:`4.2 +`, a cgroup might have some charge +associated with it, even though all tasks have migrated away from it. (bec= ause +we charge against pages, not against tasks.) =20 We move the stats to parent, and no change on the charge except uncharging from the child. @@ -719,6 +729,8 @@ If we want to change this to 1G, we can at any time use= :: It is recommended to set the soft limit always below the hard limit, otherwise the hard limit will take precedence. =20 +.. _cgroup-v1-memory-move-charges: + 8. Move charges at task migration =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D =20 @@ -739,7 +751,8 @@ If you want to enable it:: =20 .. note:: Each bits of move_charge_at_immigrate has its own meaning about what= type - of charges should be moved. See 8.2 for details. + of charges should be moved. See :ref:`section 8.2 + ` for details. =20 .. note:: Charges are moved only when you move mm->owner, in other words, @@ -757,6 +770,8 @@ And if you want disable it again:: =20 # echo 0 > memory.move_charge_at_immigrate =20 +.. _cgroup-v1-memory-movable-charges: + 8.2 Type of charges which can be moved -------------------------------------- =20 @@ -806,6 +821,8 @@ threshold in any direction. =20 It's applicable for root and non-root cgroup. =20 +.. _cgroup-v1-memory-oom-control: + 10. OOM Control =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 An old man doll... just what I always wanted! - Clara From nobody Tue Sep 16 08:47:59 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD510C6379F for ; Thu, 5 Jan 2023 13:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbjAENSN (ORCPT ); Thu, 5 Jan 2023 08:18:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234315AbjAENR0 (ORCPT ); Thu, 5 Jan 2023 08:17:26 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5EBE5C1C6; Thu, 5 Jan 2023 05:17:10 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id jn22so39264114plb.13; Thu, 05 Jan 2023 05:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/8J8qW+Vq8pd6T9oMP3SU6TUuvWLiPg70zvs+kZ90og=; b=iCXg4LXUCBckmKqWrrrxIf26SHrZFmi22auf4ZaicKRigcxRH4J1pPKSfOGqGrx+70 2Dz9hHlbyfiE4Ej5uw8WLiINWCrDAzbB2ANP3+/gbqzdOwBY6PAVA7BUZTzjTjN9cnpk w7tPekaV9ZL3vtm3yJhU/niRomQUa/kb4CWyJH8y8iuAh/qLPl6JCDrc6ste8rMI94Vb txsfBlJ+2NXRQscx4WGe5FgfV4qryQy/us+G8v74ohmJ9dZ1/1Yydjnm5pMDR4CGIFWd rFyAaog+Q+WI+4vFL84NNY7n+NkZ1tRC3x6sboqGdsT7/ikXBHb5637YYaiNJOQxgOy1 wIXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/8J8qW+Vq8pd6T9oMP3SU6TUuvWLiPg70zvs+kZ90og=; b=1EsZW3jg+Lf7iiDSD0QtAfimZyq0pJG0IFjY74GLcjXT61X/zVcK7cBnGCnyY/o2hk g4S3O/gKxwlFuVYri4roj/bOFmayCuuxL0IjuBmjihfwo2/X/5rtvic7ZXBctHG98DXs fHwcnbXBfkbVEn32VS7taymR9klF8Ab+46CzXRld21Pi2OST5SsoJRo9WEIK4PIWzLVl Lvw+Reu1hESXcaLEQv2XFxXuL08iQz18lSzpdRBiHSMZqQGms9XybTTL661/zBwcctGp naXpMZjeQ9cjx8Q9PSG2j/z9Qy7IOyguSWbWkHmwLU60Us6MJbtdSlJWVwvzuIy03H4S IRgg== X-Gm-Message-State: AFqh2kqy1Ygx2AwCzP0gaM2iJju4J3hQr4y6AqSvlGq4oifLN9HtBsVl 5lzZUK6keEHo2mx2+BfJqvc= X-Google-Smtp-Source: AMrXdXslOn7z2k07aal+6cIKgoQ5LswkwnJ95kNaoSJyQRPK/amOfoIBRXrc2Nm+i57mpW0/cAM3qw== X-Received: by 2002:a05:6a20:4295:b0:a8:8714:233b with SMTP id o21-20020a056a20429500b000a88714233bmr80647372pzj.57.1672924630106; Thu, 05 Jan 2023 05:17:10 -0800 (PST) Received: from debian.me (subs02-180-214-232-68.three.co.id. [180.214.232.68]) by smtp.gmail.com with ESMTPSA id q7-20020a170902a3c700b0018997f6fc88sm10893264plb.34.2023.01.05.05.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:17:09 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 8148B105232; Thu, 5 Jan 2023 20:17:00 +0700 (WIB) From: Bagas Sanjaya To: Linux CGroups , Linux Documentation , LKML , Linux Memory Management List Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Michal Hocko , Andrew Morton , Hugh Dickins , Shakeel Butt , Bagas Sanjaya Subject: [PATCH v2 9/9] docs: cgroup-v1: use numbered lists for user interface setup Date: Thu, 5 Jan 2023 20:16:34 +0700 Message-Id: <20230105131633.553574-10-bagasdotme@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105131633.553574-1-bagasdotme@gmail.com> References: <20230105131633.553574-1-bagasdotme@gmail.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3017; i=bagasdotme@gmail.com; h=from:subject; bh=nysWUkfThi/UCTzfZAv3ZXQWTYDkn/SrXnv8ebwTGco=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDMnbzm5cWtCq0ng04TEHZ7mB8SLVvBOR8ztZH9yf/zX6aJlM um9YRykLgxgXg6yYIsukRL6m07uMRC60r3WEmcPKBDKEgYtTACbibcPwT83d3Ur0YVzhzYLHnCdO+i /VN2/wf6tmmSycLGTr8LlwKsN/L4kJ/ZbNi2Kc+F4s8DBN49CYLV1rXfH+fJz40j4rB2VOAA== X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Setup instructions for memory resource controller UI uses a mix of section headings and normal paragraphs, whereas numbered lists are better fit for this purpose. While at it, also slightly reword the instructions and add reference to "Why are cgroups needed?" in the main cgroups documentation. Signed-off-by: Bagas Sanjaya --- .../admin-guide/cgroup-v1/cgroups.rst | 2 ++ .../admin-guide/cgroup-v1/memory.rst | 26 ++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v1/cgroups.rst b/Documentatio= n/admin-guide/cgroup-v1/cgroups.rst index b0688011ed06de..9343148ee99366 100644 --- a/Documentation/admin-guide/cgroup-v1/cgroups.rst +++ b/Documentation/admin-guide/cgroup-v1/cgroups.rst @@ -80,6 +80,8 @@ access. For example, cpusets (see Documentation/admin-gui= de/cgroup-v1/cpusets.rs you to associate a set of CPUs and a set of memory nodes with the tasks in each cgroup. =20 +.. _cgroups-why-needed: + 1.2 Why are cgroups needed ? ---------------------------- =20 diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation= /admin-guide/cgroup-v1/memory.rst index 16d938abe69f81..27d89495ac880a 100644 --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -387,30 +387,30 @@ U !=3D 0, K >=3D U: 3. User Interface =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -3.0. Configuration ------------------- +To use the user interface: =20 -a. Enable CONFIG_CGROUPS -b. Enable CONFIG_MEMCG - -3.1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) -------------------------------------------------------------------- - -:: +1. Enable CONFIG_CGROUPS and CONFIG_MEMCG options +2. Prepare the cgroups (see :ref:`Why are cgroups needed? + ` for the background information):: =20 # mount -t tmpfs none /sys/fs/cgroup # mkdir /sys/fs/cgroup/memory # mount -t cgroup none /sys/fs/cgroup/memory -o memory =20 -3.2. Make the new group and move bash into it:: +3. Make the new group and move bash into it:: =20 # mkdir /sys/fs/cgroup/memory/0 # echo $$ > /sys/fs/cgroup/memory/0/tasks =20 -Since now we're in the 0 cgroup, we can alter the memory limit:: +4. Since now we're in the 0 cgroup, we can alter the memory limit:: =20 # echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes =20 + The limit can now be queried:: + + # cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes + 4194304 + .. note:: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo, mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, @@ -422,10 +422,6 @@ Since now we're in the 0 cgroup, we can alter the memo= ry limit:: .. note:: We cannot set limits on the root cgroup any more. =20 -:: - - # cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes - 4194304 =20 We can check the usage:: =20 --=20 An old man doll... just what I always wanted! - Clara