From patchwork Wed Aug 2 21:43:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 130171 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp762217vqx; Wed, 2 Aug 2023 15:20:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlG2ZanvRAaMdyqyd9zn5Y0sbjNjlOL2ebQX2LwZPjg02s4hQp2V5S7diL3xKDXrIok9BUSO X-Received: by 2002:a17:90a:3d84:b0:268:40b:2e03 with SMTP id i4-20020a17090a3d8400b00268040b2e03mr13277723pjc.4.1691014851083; Wed, 02 Aug 2023 15:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014851; cv=none; d=google.com; s=arc-20160816; b=AXSj2SZ4Rf7y682oRMMSLgBL/T5+GvW+aG4PDGF8jB6HVYa2RxKIYQfzmXHT+QpgFx PJWUrJdSU550ca0JubLTUTg1PcqpuIwgYABOZQMyobobnbqrF0OIKN5zMXii6mD/KP9G O9xb4K473Q4jT/CY5wo2agPkBx8kQSxX+PAkslxHBnCZGD2ZpCaIntkeJQI89BU2eIYS NldYm/3T2NDj7465DtUkvkbU75auXimJvTM2rVlePeSSvqpJzayDg6M0Cj72jcif51GR Zh7XpnPmVf/0ZQ6YANU5eAxdTofn38ydDyLAR5yW2EGLd2MXEe7bp1qligCWg7h28HLD 3mhg== 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=DEONY+l/f78gQJGa931FtpQgT8QXzC08LkXhFbdcU0A=; fh=Jn9vwBBsv0/M243wtBPWgrycE99QwFHXCzusFnO8K0Y=; b=Of5SfzBNjGmYO2zfptA9EhQgficTZ2Et2Ur3Ibk30N+s4KtpAEM0YKm41OWrkEOhjS 28V7VdraVcIwkQJMx9DuXALbF8vX44cP9j9kpApLN9wrPKrJBxjgJB+o/Fk+k5PHC038 PMY0843RpwL8ln59c9Cy2UndMixCLW53e+8VAmGT1ctg0Y9IC2w9hJjn+hmBf54/n60F 3k1s6wkEC0VAYb+QIAcdDue7HsvCOudtiDEOpfMeqzV+hgyvZhj+uk5N350kiKN3xHFf dDz1qOsJa4+n6RPkTW8M1uhPIaRinpRgZA6cjDRiVCOSBlU+ICsRRU0WL19EwjaVfV+/ 9mmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VguX3rgr; 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 u15-20020a17090a0c4f00b00268273fffc0si1779484pje.99.2023.08.02.15.20.36; Wed, 02 Aug 2023 15:20:51 -0700 (PDT) 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=VguX3rgr; 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 S233493AbjHBVnl (ORCPT + 99 others); Wed, 2 Aug 2023 17:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbjHBVnX (ORCPT ); Wed, 2 Aug 2023 17:43:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EB5E211F; Wed, 2 Aug 2023 14:43:21 -0700 (PDT) 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 5821261B3B; 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1773157588311335221 X-GMAIL-MSGID: 1773157588311335221 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: