From patchwork Fri Jul 28 20:34:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13332660 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 7EDF2C001DE for ; Fri, 28 Jul 2023 20:35:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69A248E0001; Fri, 28 Jul 2023 16:35:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FDE8900003; Fri, 28 Jul 2023 16:35:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 474508E0002; Fri, 28 Jul 2023 16:35:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 31FB58E0001 for ; Fri, 28 Jul 2023 16:35:00 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0EBDFB1CF2 for ; Fri, 28 Jul 2023 20:35:00 +0000 (UTC) X-FDA: 81062174760.19.B0CFDE4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 747BA4001C for ; Fri, 28 Jul 2023 20:34:58 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kCfYKwe4; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690576498; 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=iuunIUn62bhZjdaFR+qEAwFTLHuVOYMKzjEUqds7ss8=; b=p9e+38lYVVNBu/sy5daURUdHQZC0Xqyk4MB1VR4eU16u8p9Bm5Di32SUrJSWkxI56kcS4o fY65dAC+cwnnYap8Qja9BAcURFLqIDEULMSbpH3vxTxN/A3tBl2fTfKii9HjjOL1K0WRPT 5+Bp9eWPtSG223yUy2cEuO9XW14jQ8s= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kCfYKwe4; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690576498; a=rsa-sha256; cv=none; b=LAhxgh4EHnQRHPLAepgMjN8r0mvKlv5iw7ZfeqW7rEBZh38+eF0L1CixF1JcG8ywVu4ej7 EB6id8Z8VjKziwStCb+pYa40bvFP4YBQS30BHOduOc1Wlx/z/1CCrPMq5LnPRj6aiPzpgr nK275ikGhtkOG3s6jOOrjjJItHSzZlQ= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1C223621FE; Fri, 28 Jul 2023 20:34:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B4C7C433CA; Fri, 28 Jul 2023 20:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576497; bh=jeC4GAEfQQwmVnTIZskvg6L9vM/nrayE2m9ijer6n98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kCfYKwe4QL89JDRqiWJGihImM+qcoMbDWecJ7hn5Iu+Tfw0wwq6G5Soa4tXigbIs+ cKRMiMjzFiwRgTa6FFAOyZ/Cj4fLXYlE0wrBytmbm3mQbInHJDivY+r/aUeIdGg3oE Mttwki34KUH6dQ4afT+n7RpDZEfriIuE5WtcfXH3hSOT9fbYJoS/uhCmYL6v6zaHlF 8kHxycb0NP0w8mRdV0JOMb4kDQW6JCY/h32sSZ8ZyZ3iqHTsijHYjs8Co5cqxVWS7F bRGrb21xaEpee+/SLZW1SB2C5OnDQu3NvdTvQg0bZ/zZxF8gJPpGUrIvZB02FSjVjY AEaMp+FQ3zbXQ== 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: [RFC PATCH 13/13] Docs/admin-guide/mm/damon/usage: update for DAMON monitoring target type DAMOS filter Date: Fri, 28 Jul 2023 20:34:44 +0000 Message-Id: <20230728203444.70703-14-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230728203444.70703-1-sj@kernel.org> References: <20230728203444.70703-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 747BA4001C X-Stat-Signature: d8erexio3qdfkjaqyx1t9cuneaaz6g1c X-Rspam-User: X-HE-Tag: 1690576498-399221 X-HE-Meta: U2FsdGVkX19QKO7L9jFfzVm4YSNBz17wqw59e4Pczo1fqGQAFvPcS8umYmEKycCqXb8BBNWlzA+ea68Mcr5iLttggna5EmPUJL8OBZ/zgxCcnk2n0+bZ5bep0nOYo3kCfobM54yXCwFiHfabzumYEGGHVjXEzCz+AcNiJHHWZDnIqyjburypd80beCTtAN7P7QZeiJvyljd7DlAU2TAHlwvzxeDbnGCFPuqj1Dr1r6w8lLr7cl+KPVpniT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ity: 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: Update DAMON usage document for newly added DAMON monitoring target type DAMOS filter. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 37 +++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index a9cb9949b796..084f0a32b421 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -363,18 +363,21 @@ number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each filter. The filters are evaluated in the numeric order. -Each filter directory contains five files, namely ``type``, ``matcing``, -``memcg_path``, ``addr_start``, and ``addr_end``. To ``type`` file, you can -write one of three special keywords: ``anon`` for anonymous pages, ``memcg`` -for specific memory cgroup, or ``addr`` for specific address range (an -open-ended interval) filtering. In case of the memory cgroup filtering, you -can specify the memory cgroup of the interest by writing the path of the memory -cgroup from the cgroups mount point to ``memcg_path`` file. In case of the -address range filtering, you can specify the start and end address of the range -to ``addr_start`` and ``addr_end`` files, respectively. You can write ``Y`` or -``N`` to ``matching`` file to filter out pages that does or does not match to -the type, respectively. Then, the scheme's action will not be applied to the -pages that specified to be filtered out. +Each filter directory contains six files, namely ``type``, ``matcing``, +``memcg_path``, ``addr_start``, ``addr_end``, and ``target_idx``. To ``type`` +file, you can write one of four special keywords: ``anon`` for anonymous pages, +``memcg`` for specific memory cgroup, ``addr`` for specific address range (an +open-ended interval), or ``target`` for specific DAMON monitoring target +filtering. In case of the memory cgroup filtering, you can specify the memory +cgroup of the interest by writing the path of the memory cgroup from the +cgroups mount point to ``memcg_path`` file. In case of the address range +filtering, you can specify the start and end address of the range to +``addr_start`` and ``addr_end`` files, respectively. For the DAMON monitoring +target filtering, you can specify the index of the target between the list of +the DAMON context's monitoring targets list to ``target_idx`` file. You can +write ``Y`` or ``N`` to ``matching`` file to filter out pages that does or does +not match to the type, respectively. Then, the scheme's action will not be +applied to the pages that specified to be filtered out. For example, below restricts a DAMOS action to be applied to only non-anonymous pages of all memory cgroups except ``/having_care_already``.:: @@ -391,11 +394,11 @@ pages of all memory cgroups except ``/having_care_already``.:: Note that ``anon`` and ``memcg`` filters are currently supported only when ``paddr`` `implementation ` is being used. -Also, memory regions that are filtered out by ``addr`` filters are not counted -as the scheme has tried to those, while regions that filtered out by other type -filters are counted as the scheme has tried to. The difference is applied to -:ref:`stats ` and :ref:`tried regions -`. +Also, memory regions that are filtered out by ``addr`` or ``target`` filters +are not counted as the scheme has tried to those, while regions that filtered +out by other type filters are counted as the scheme has tried to. The +difference is applied to :ref:`stats ` and +:ref:`tried regions `. .. _sysfs_schemes_stats: