From mboxrd@z Thu Jan 1 00:00:00 1970 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 07B29C04FE0 for ; Wed, 2 Aug 2023 21:43:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D34B2801F3; Wed, 2 Aug 2023 17:43:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 030FD2801F4; Wed, 2 Aug 2023 17:43:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B06132801F3; Wed, 2 Aug 2023 17:43:23 -0400 (EDT) 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 845602801EB for ; Wed, 2 Aug 2023 17:43:23 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5E3581A01E3 for ; Wed, 2 Aug 2023 21:43:23 +0000 (UTC) X-FDA: 81080491086.12.79BB352 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id A35F44000D for ; Wed, 2 Aug 2023 21:43:21 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=VguX3rgr; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf01.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=1691012601; 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=DEONY+l/f78gQJGa931FtpQgT8QXzC08LkXhFbdcU0A=; b=YgL6dMtlwHWNq1bK2pzhpTJqyIOi6Qe+JpzU+iVq6rNPPDSU2aufRP+KGEhY37d6/Omlql G8iwx8QXKcLTbjGiVRUJumGVLdDii9mLbPpBhKskN2lWNB6s2+lVh5zJswMqvhewBDMXsI 3iZ+SVm2J4TiagMQtBLEyrR5oNHS3vQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=VguX3rgr; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf01.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=1691012601; a=rsa-sha256; cv=none; b=jLZZQbUHB1o7DKLkBZ+NYcipV1zH9kmwlW6HqZegD70ZQrGmBSIZ9JvKikY7+ceE27/MI+ i4MBhOb/851jaINkXY4ks8ktS97k0bE4MmWPcsBtDNK7dbG19NrFx1yBs5KnpFuMwWxGbF h5u2BhGg3UWaTnqmz3xCWiYdUrZUpVo= 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 57B2A61B38; Wed, 2 Aug 2023 21:43:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46091C433C8; Wed, 2 Aug 2023 21:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012600; bh=mWNsxedk/0WTpVC5xcDAG+vRRRu0kRA2F/h2AlUSJkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VguX3rgruXsHFHwRc94yQOIa+8CYImY184CQKh8Axbc20nSL0haxJ1BelLK/Kl+lI kx6SxHyD4tWBMYM783i5u1pCUHe8HhYxsL2rlAMIDalMA/pSzobIQ0kVeRHt927q43 GY99HKHbl5lQyYKaFi3aRreMREW3OX9bCuEV484vLCMGbeKJ4VP8Lm7SQ79For4EkF SjBOeZ5HDzCAWDDmCcfQFXZT0w4jFLg/Z9z3Gm5AKvvbTgI7BD2W96ssE1UHndwOAr aXvpzW8AJ1doO6vO8cwLIrvsu32nTnqlSx2DXFNUYFcDtH52KVI+1vYP/0A+ZQEjWC kT0MuCjPoXQLA== 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 07/13] Docs/admin-guide/mm/damon/usage: update for address range type DAMOS filter Date: Wed, 2 Aug 2023 21:43:06 +0000 Message-Id: <20230802214312.110532-8-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 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: hh4f1kdmftzm4ctw1f3bb8m6zsyrs5d1 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A35F44000D X-HE-Tag: 1691012601-259958 X-HE-Meta: U2FsdGVkX1+OGJavqopQTD+Ca1sIIKmNNgrxZRcGL7EyF3SURBNdyUjmAmE/Xn2yQdAkQBKmtA+6dGWCkaBu3RuXIO6kqhWIclnULkxTVUrYqCSKUKIHssZAR7dS43JzF/nrA+vr1Sn6pBhlvbvX1vcQmTnX+KlczicPjwzXEhUhcBqOWqFg6d9ZInhEpjVGEopB4ecDi+vlnYfTdi4ssY88wDlq8MhW8ak27FAzT5svUFjS+vbstT9hTOD9YuEiscSjpm7kzs21fnx+SViezGSgBqv6v+87esPSCrBS9LqJvNfK3GoVbQX3PfU1yid8wQ0rKyL4Xv4k17UGwDI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 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Update DAMON usage document for the newly added address range type DAMOS filter. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 31 +++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 1859dd6c3834..a9cb9949b796 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -363,15 +363,18 @@ 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 three files, namely ``type``, ``matcing``, and -``memcg_path``. You can write one of two special keywords, ``anon`` for -anonymous pages, or ``memcg`` for specific memory cgroup 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. 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 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. For example, below restricts a DAMOS action to be applied to only non-anonymous pages of all memory cgroups except ``/having_care_already``.:: @@ -385,8 +388,14 @@ pages of all memory cgroups except ``/having_care_already``.:: echo /having_care_already > 1/memcg_path echo N > 1/matching -Note that filters are currently supported only when ``paddr`` -`implementation ` is being used. +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 +`. .. _sysfs_schemes_stats: -- 2.25.1