From patchwork Tue Jan 10 19:03:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13095552 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 65E39C54EBE for ; Tue, 10 Jan 2023 19:04:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B349C900004; Tue, 10 Jan 2023 14:04:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ABC95900002; Tue, 10 Jan 2023 14:04:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 95D89900004; Tue, 10 Jan 2023 14:04:12 -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 86C3A900002 for ; Tue, 10 Jan 2023 14:04:12 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D2AEDAB5D8 for ; Tue, 10 Jan 2023 19:04:11 +0000 (UTC) X-FDA: 80339814702.21.26A2BA7 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf20.hostedemail.com (Postfix) with ESMTP id 0D8A01C0087 for ; Tue, 10 Jan 2023 19:04:09 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RLd4J3G7; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673377450; 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=2Wtf0lgjd5s4Awp32ikmUzlONvIaJWOB+WJ6B22GUOc=; b=N2GhMCbSPWJE+GgSsbmNq9My7/o0s/vofGXQRMAJn/QP+AlYd9EHL3raEiU9L1Y+abY5tS m5Kj9WOg8174IrnwdqCXY9WH8ADcYMoa6qb2HLHH8Xz9CUEtfeyEJuZANl8iMc66m6aDvx tFULzB2CYwf9vfjDQ2aQ9ftEDuPmY9A= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RLd4J3G7; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673377450; a=rsa-sha256; cv=none; b=JDEMbdzWcL//dLVyMPJWTVcidpsyWsG6RVvR1GQuCy2p2wRrrCE7++MWZkANzDXbaPqtTN lYfzAE6WIf7/Bhl58WSn2Me4YHsrjxQ8QkIIYyluDxBHWJ10JS6WfGYyOeJ2tpCdL371Vr AdbMqwZHUTW5Swg3beIp8V0d5YhwoH0= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7872DB8196F; Tue, 10 Jan 2023 19:04:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BFFFC433F0; Tue, 10 Jan 2023 19:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673377447; bh=z4OiBFIdAY53y3j04vvpLGBRlRRZlDz1MLs91H9dWgM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RLd4J3G76wYwVxSsaSIQPTKHrZbFVa3HMM1Gckqux+XKZcOj5l6ii9Jr0d5ojGaYb OaFXjgnAYAadqc1LQMKbr/wchU1RcH/S5srEO9WUXaQJQPM+kREfCpLLSMiLMLYf3H gDzFMCliEdHfnyVRMgNQz+xK5d0pqnAsKfUIEaT+Oexsy/K2x/qwH49JiW/wPCMoxr 9g8XpPSA1eSKwJO0CRhxv0rQ6oyzoFAibgVTGMFfGM+PwtytiJ2AY9IwPuYNlmbuFX 2fNEHHLpNzidac6lxcf3Yjhk5+923fksLblXxOfMoVoZtpzL1pk4Nnk8j+L3HhS2GP J9X688D+f9i7Q== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] Docs/admin-guide/mm/damon/usage: update DAMOS actions/filters supports of each DAMON operations set Date: Tue, 10 Jan 2023 19:03:56 +0000 Message-Id: <20230110190400.119388-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230110190400.119388-1-sj@kernel.org> References: <20230110190400.119388-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0D8A01C0087 X-Stat-Signature: scj7qkieosqf3whqm85sbb4byewkdfis X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1673377449-232851 X-HE-Meta: U2FsdGVkX18lYeuAwSf0qOFJc+rQEWPpA1vEpQSnNPP7Cy2n659EHOR8m931maqtSAR48lTe8eMb3ukd4V0xO2escCToiOSnVqPxq8yJ04/SO8m2pSeeWXWfT2ygtDw2iYlyn8NSHMCkNNRDh9lahFe4K2kcmPSvSe/Nix1i4OPc/GbVN2Gl91DVeUzXcyE68abHWbnN39XgjuzDj6tbPBWGGlg9GC9dkrp0jh5MyefvVD9/I4wb40QFfk85hCIagpD6+BUELk3yq4T2O3yw74G42Bf0oF4BuBtankeT8nJxJNBII9TqCG2cGvpcFDPWEjA8Y+kiUQxzqkqXDCovUw+fHXwFGM4VFXg2liNSLQz+y7HZWDGKC0GdrsWcvWFp9NBFM9uvK27cm+DIVHyGBm6imebgzrkTpvpl7Cuh7thQmdFeCz0skkrOhQ7hDgbfZqjl2IsXgFDoO0U6w5QhIBiUwAlCt/3VscqwDHpYHjIhATk3SNBZprdHcpo1sb6SmKLVHNw20WM9AKFAhMx4FRyHHFWo9NvkpaXAkWX3SVU33Mpexv81I1HcPiVFw/pcbUv04qWZLACGYpJmmBNHdRqxz/kYiDIr1W/xXkz2/OpFRTXwNJN/UpjA6A0h49SiPjaqxkQ6YwyP/fK7+9L5F7KAGw8e1g3RQf6EYcckjDWZWlLD4PaFPmEeC8yETSFwoufO1UyLqix15Pkm0NazfDG3nHp+PhQVntDLFGlHGclAPnJtTQPUb1WQNbDO5dECFOD0lrPyAVnw49K1gQZjkW7qlweIi9bWxbRgKTVgZ3L1dYSLXZBogf88QKM0zf6Gwayy5+3VQUlIhfNA3y+sIQQf22d9F6JB5ogv6Q326imGUhZGcW7sYr4rDoXNVVPM6yxQN9yYVPjyy1kh2te46tmF268IpYnq6xOQFfHRJdfJ4in56M+r5XMZ8IOjc94JO/M6ax2izjejAkx+Nm6 eJdHwJt9 F8B+ivsxViAchg92n83h82bmnoLCqERXBdr8yv46Ge96KwlqhH9AYDsjeSPUG0wPunA1A 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: Supports of each DAMOS action and filters are up to DAMON operations set implementation, but it's not mentioned in detail on the documentation. Update the information on the usage document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 41 +++++++++++++------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 3d82ca6a17ff..9237d6a25897 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -279,14 +279,25 @@ The ``action`` file is for setting and getting what action you want to apply to memory regions having specific access pattern of the interest. The keywords that can be written to and read from the file and their meaning are as below. - - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED`` - - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD`` - - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` - - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` - - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` +Note that support of each action depends on the running DAMON operations set +`implementation `. + + - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. + - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. - ``lru_prio``: Prioritize the region on its LRU lists. + Supported by ``paddr`` operations set. - ``lru_deprio``: Deprioritize the region on its LRU lists. - - ``stat``: Do nothing but count the statistics + Supported by ``paddr`` operations set. + - ``stat``: Do nothing but count the statistics. + Supported by all operations sets. schemes//access_pattern/ --------------------------- @@ -388,8 +399,8 @@ pages of all memory cgroups except ``/having_care_already``.:: echo /having_care_already > 1/memcg_path echo N > 1/matching -Note that filters could be ignored depend on the running DAMON operations set -`implementation `. +Note that filters are currently supported only when ``paddr`` +`implementation ` is being used. .. _sysfs_schemes_stats: @@ -618,11 +629,15 @@ The ```` is a predefined integer for memory management actions, which DAMON will apply to the regions having the target access pattern. The supported numbers and their meanings are as below. - - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED`` - - 1: Call ``madvise()`` for the region with ``MADV_COLD`` - - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` - - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` - - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` + - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if + ``target`` is ``paddr``. + - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if + ``target`` is ``paddr``. + - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if + ``target`` is ``paddr``. + - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored if + ``target`` is ``paddr``. - 5: Do nothing but count the statistics Quota