From patchwork Wed Aug 2 21:43:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13338873 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 6E5A4C04A94 for ; Wed, 2 Aug 2023 21:43:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF1FB2801FA; Wed, 2 Aug 2023 17:43:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B550B2801EB; Wed, 2 Aug 2023 17:43:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E2952801FA; Wed, 2 Aug 2023 17:43:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 76B692801EB for ; Wed, 2 Aug 2023 17:43:27 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 560EE120FE6 for ; Wed, 2 Aug 2023 21:43:27 +0000 (UTC) X-FDA: 81080491254.11.01FDBDF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf22.hostedemail.com (Postfix) with ESMTP id AAFD8C0005 for ; Wed, 2 Aug 2023 21:43:25 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hoWA1fuv; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1691012605; 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=BcWz845KiGFoTDF9Bl+SrdYyL7ydY0nQgbaiOAX2EX17W91AxEuWD9w8q6qfUPtsy5iKzu DRZRzzhC6/ZSafzgv0B17qbJG/AvoegdHoxer4T19FbzbANxt81qmEDS5f8mArxDQ1oBJo zunwmJcbjOp/2q9idwMErXQywbxRVT0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691012605; a=rsa-sha256; cv=none; b=iOyhOaRIpFabO5BfJoyoQPNSWU99jMD6MXVrdK6KrA8JdEeBAEp/z8+BXktE55ZxDMxuHl AYHasMQk401GUFWM0rBgxNhb4NoAHCiHZNDGQLZkIjZR9a2ET2gw57TLAaD5fFfEJqcNYH K7aFKjq02EgF1AhCJZy4+CHrzgqanGQ= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hoWA1fuv; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org 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 5CFAE61B6B; Wed, 2 Aug 2023 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2885FC433CA; Wed, 2 Aug 2023 21:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012604; bh=jeC4GAEfQQwmVnTIZskvg6L9vM/nrayE2m9ijer6n98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hoWA1fuvDjK7jXhUhoEI65MmGUs7H6QEze0nam2eSmQQDmKFqwbEc7ntj+UTqkneK s4V78zjTnozT3fM3yX/OWz1tCwvhnBtviwrfyEqCpROqYVe+H58xxnNHCrW6kpG0U+ JfEyQScqzF993YUJ7gMeYUcyg+IYEmqdJEcNAZn4CL3Zv5SqighkfbzL2O+Y/acMFw JQyEs1Docsz/CwWvVuiYbxfTuk/A6rfZ3aQYHL1HFWVWpjJiPICbVZEmzELUXP/ErR Kak42ueYfq7zOBq8BrEh/YZeMTARGPU9y7ifjguZbR1kbjoyPqdgg3UPBGHm15Vncu pVaT/urDi+FOw== 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 13/13] Docs/admin-guide/mm/damon/usage: update for DAMON monitoring target type DAMOS filter Date: Wed, 2 Aug 2023 21:43:12 +0000 Message-Id: <20230802214312.110532-14-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802214312.110532-1-sj@kernel.org> References: <20230802214312.110532-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: AAFD8C0005 X-Rspam-User: X-Stat-Signature: ib1mt7xiw4dz7c9s34ns3s1tryqjgbwo X-Rspamd-Server: rspam03 X-HE-Tag: 1691012605-838196 X-HE-Meta: U2FsdGVkX1/U+Y+u7RpbAZS7mUiz6CzHpaG/okb3gRZWhwz6TZ0xhEm6BirGz4RxJh/KAjKke5diO8CQJEXYk35dupF8/Y/gSdHdALomHBWwaezcCmuYtD13ONQG+ywHQdi8oYQyBRCITUaCys09P/L/oqWQCceprL2EMxjk8TKx9nHWsl7MOp0YM/a8bJxJUsffnTks7ZNsQJjL1KVSGh8O2Xn9wczy/dk3X9V3ZDnSvrEgd/vZTjaTHK0Pl7Ve7+Gz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ests=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: