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: 41594 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2919923wrt; Tue, 10 Jan 2023 11:05:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXtcvE/CxnpnR8c9+Ram8MiHJYgHWgc5bj3sK2ytkXgYM3dSWNzwF4IJ/6xiQddJogl+UVsU X-Received: by 2002:a17:907:9d0b:b0:78d:f455:30db with SMTP id kt11-20020a1709079d0b00b0078df45530dbmr62238054ejc.3.1673377537031; Tue, 10 Jan 2023 11:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673377537; cv=none; d=google.com; s=arc-20160816; b=dicXdww4o0btUxOCnNLDuMMIvCQ9sm0Knrm5AfX0HKmDzb/XnbpSNmW1FG8uwu2z2a 3peaVv6fYZ9pb9bK6YYI3QfYU/WZ6P5tBB4/MVp4CD+M4QsOynbXsVF7992BeLso+6XK sBkEPd29YcPNa+USEmX3pBojmBY0M4iEGZDgNyv36b6s7FZ4fQhXBthODB3dZAcKQ0FZ j66ndT7qRPjifAk1q8Pux7KfQ1gH6o2v+bX1uFtB9vlR7cDgJbLV90Yzd6CLA6wK/C2+ SCnF6kVXcEWuOU39k+3IvTgF2ENbI5++5IN8SW/e7sVUzqzbyPyxj3S6aLfVkrI+s2hs YiRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2Wtf0lgjd5s4Awp32ikmUzlONvIaJWOB+WJ6B22GUOc=; b=mmJpRibschvMOyL8uHlwm87vnUAGym24PD036jaj0plIj23PIYZyPaB4Pd/evMjDm4 HMRKp3Kc0EjH6rC0Xa9bv1t0x/BE3jGSnHXkYixegjR5RB1HHhKWwenhkiTTOd4BDF0e c9fYau2J/VcTRLr8I2Tmf5p6Dec0q+2eFyZtIcA2OAKPKnka7jeWRe4b6P37HNBAC5uW mdONUYq0BZBfFRApeo/AC9eq8hoZ9+Q+DW8G/h4hRmIK7vOEhZt7RHiVawflp0+CQ0yg uePMI167nqaWeSPP4r+jLT10bd8ik1y8/F7XKgppXynVpXRiGlidDcR+1sz6eLDDIgXt VaSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RLd4J3G7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di20-20020a170906731400b00780e89ce0b0si12988084ejc.600.2023.01.10.11.05.12; Tue, 10 Jan 2023 11:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RLd4J3G7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239759AbjAJTE5 (ORCPT + 99 others); Tue, 10 Jan 2023 14:04:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239227AbjAJTEJ (ORCPT ); Tue, 10 Jan 2023 14:04:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C02ACC4D; Tue, 10 Jan 2023 11:04:08 -0800 (PST) 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 7ED63B8190F; Tue, 10 Jan 2023 19:04:07 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754663523917654042?= X-GMAIL-MSGID: =?utf-8?q?1754663523917654042?= 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