From patchwork Thu Jan 5 13:16:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 13089865 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 3BE5DC53210 for ; Thu, 5 Jan 2023 13:17:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4270E900008; Thu, 5 Jan 2023 08:17:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D9E6900003; Thu, 5 Jan 2023 08:17:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C73B900008; Thu, 5 Jan 2023 08:17:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1F8DF900003 for ; Thu, 5 Jan 2023 08:17:12 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id BC2BE40458 for ; Thu, 5 Jan 2023 13:17:11 +0000 (UTC) X-FDA: 80320796262.03.5C387E2 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by imf03.hostedemail.com (Postfix) with ESMTP id EB7D520008 for ; Thu, 5 Jan 2023 13:17:09 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lsPMxNWn; spf=pass (imf03.hostedemail.com: domain of bagasdotme@gmail.com designates 209.85.210.180 as permitted sender) smtp.mailfrom=bagasdotme@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672924630; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rGNG7VnZJT5NrQNN6BhNmvq0EdhUnj+GOmFvACaLTXk=; b=RHCRKhXbAwI7G3b9PLLIa6iA4apcQtX+MwnhchnN9S9UwbnVvv5xo12FAhTpSKgkR9m4sd wgFxENVYBksrIz/wJYAWtY+rivLiDTUYcDkV3ljzbrlqj2os+FzHXhSPdj5Y+H162AmU3P Xmj5as/xKD13m+HG/qefb6HtSeUXtpQ= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lsPMxNWn; spf=pass (imf03.hostedemail.com: domain of bagasdotme@gmail.com designates 209.85.210.180 as permitted sender) smtp.mailfrom=bagasdotme@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672924630; a=rsa-sha256; cv=none; b=xQgYNiPiQ/etVYcN91Vm89+wfNFBFEUeGuCS0AiC5cYteh4I78r6gQndtiEiL2m688a3fj ojPGoEF2VAgALwanKU+y9FfiGWakb1LSj+oKTpCcUDVfmkbuQDr4x5yjvl06UJ7nSt/Xzl vvjPP+qpo9LSwk/xP5y7HHseW4in+Fk= Received: by mail-pf1-f180.google.com with SMTP id w203so8651885pfc.12 for ; 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=oolYbk4kPxm56+9vKanPJ8udCtk/7pClJXDV3LwaBTXWfrWyXlL77xuroa9BO5FZAJ B2goJ+cgiwCqOCldpB1xIkZWGQT4tnzh3nH3XhMWe8qrM9Bzn5K4hmLDrUADGv9i6LKI lxw49l2Bz5J4ITWW1uTMy/eZhQWBH/h7mRVFZrjXn3yCDssruxlA5RjzzZQJbo5Bz08q 6bMndfZfbwQ7SVBNJtR5spSvNHljzyCb4jce2GZx4znm0LjVsMYtgF/rwGVv0pI7pWbD ptorQli0fMfg3bbnVEgtglFVOud5OCfe7FFI1+TyTfM3SpRg2FbXa3tRm/f/kI/luZxa Mn2Q== X-Gm-Message-State: AFqh2koB7BN3VV9KIuSNL3vIP2TeittZ2O7gUXBG1scv7v5MHwicgiFS 0CWlZx6cDvVAe9DTeB1wKnY= 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 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EB7D520008 X-Stat-Signature: bx1cj95oy6yudoo74pd7s8okfs4cbdt3 X-HE-Tag: 1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G7AQmpkVp/idFjhkEsZ21r+t1gGb5Rig8eDtsf0G2cqj+v 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: 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=3G will prevent bad use of swap. By using the memsw limit, you can avoid system OOM which can be caused by swap shortage. -**why 'memory+swap' rather than swap** +2.4.1 why 'memory+swap' rather than swap +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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. -**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 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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