Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1495145rwo; Wed, 2 Aug 2023 15:20:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOsBtaf0zBu+RWNSZkLMkMDKwQv2dFhS62TwbRoZqcbKXw2pKlcLkQ7GDW0Q2ecdvJ32bF X-Received: by 2002:a05:6808:343:b0:3a4:735b:e567 with SMTP id j3-20020a056808034300b003a4735be567mr18843328oie.41.1691014835937; Wed, 02 Aug 2023 15:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014835; cv=none; d=google.com; s=arc-20160816; b=SdLq5KH5XqKEARCpnKRa1jd8gQxEbvPZhDyrNyxKUvvL0SFrvwvSnVzxhDnShggGn1 KWzv+XGaNsQMg2aR0zc0Zb6U0tTlFvlI5nl7kD8XpZXm/stDhipJHJu7ssz5ewOHP8zU lvV5LxTAhYOsprZnk9p4JVjyjP2gF71jyu/fo0qc7YO0N0uDo5Hs89BPQh14S9oOK5q6 Gx9odNq2bKtIRumu1zLg9RRRwVhKqKYan+52wy1ZXWGoJf1KZ4uB0MhZdoM9l6aFGytR KoBBZ4QcgEls9A3NLdi3+yREyWIPjLyziqMsXIHqlC7etjBflvyxyEa5r4P10l9ksipm +yCg== 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=eduCnC+OYEyOqU/7eWjUVOUI0rGHQmq49SKw029YYYk=; fh=Jn9vwBBsv0/M243wtBPWgrycE99QwFHXCzusFnO8K0Y=; b=gVq5VWtYpd7DwfO6XKog5QZg8MiOjo01lvPCMJR0J4VExWQJMydT8ZDD6mFcVrpujR FzT/8IOeTqV4X6GL4agntiQqk5DnbMSHoBmBpaOP1+r8IVtT1hx4GI+ASdX3Z6X9Vdzo fU2kogHFfRMeRNdhq/8VyzeQf2+JQW3gARIY5OV+NKB8E3XXyujVi+rRqfZ+wXhb63U6 t2MfLTG5PqqLY1/yvYiHbzLTgT/60hF64bVlTH7h7LSbSe7cWG3XlYxhAvaF2VleWCj3 JKEzZ0zexGTFMdxr7V9nkfPzizG9faqc+ZaXPiwCcSZKrMzzzDeHdaq/2os20u9GT527 zYpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X95R9KkV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be3-20020a656e43000000b0053ee9b21820si8905636pgb.72.2023.08.02.15.20.23; Wed, 02 Aug 2023 15:20:35 -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=X95R9KkV; 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 S233641AbjHBVnr (ORCPT + 99 others); Wed, 2 Aug 2023 17:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233274AbjHBVnY (ORCPT ); Wed, 2 Aug 2023 17:43:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90AA3269A; Wed, 2 Aug 2023 14:43:23 -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 6EBF361B38; Wed, 2 Aug 2023 21:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C19FDC433C7; Wed, 2 Aug 2023 21:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012603; bh=/3fkCyEgrxb/AUOocTnJxHaLWQx7r2oBGZrkuNBIGj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X95R9KkVDRr3ki6dAqNlbFqXrxEEVHX/lRSSI/qgwcWgfiI3zUd3Q0zIpTOOV3Y63 CDVO7N6DcY+b2efTSCZMfcUIqZaxXdSLdXxtoRCtwVWub6Y1PQXdzwzNvTpesl1v3q gNKU9OORW1ki6GBIb2+Em6y/0kUEy32D5bhIATAPvd4mFg4NB0zWPZuFJH/9w2/LBP QhaBucUBUfqEmbqHMF2QbYb5iAaM1Bo88hLb5yxRHpmgTZCIMtw5koCerfYDy8tQm2 AhADeaeCFqIJCgjvwj2dD9IhR7Gyv3ZMEpHB/ZnKFjoXVfmcYHPWRuZpvhORippGWG YF1l2ciI4grCQ== 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 11/13] Docs/mm/damon/design: update for DAMON monitoring target type DAMOS filter Date: Wed, 2 Aug 2023 21:43:10 +0000 Message-Id: <20230802214312.110532-12-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-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,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 Update DAMON design document for the newly added DAMON monitoring target type DAMOS filter. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 134912166f5a..a20383d01a95 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -380,21 +380,24 @@ number of filters for each scheme. Each filter specifies the type of target memory, and whether it should exclude the memory of the type (filter-out), or all except the memory of the type (filter-in). -Currently, anonymous page, memory cgroup, and address range type filters are -supported by the feature. Some filter target types can require additional -arguments. For example, the memory cgroup filter type asks users to specify -the file path of the memory cgroup for the filter, while the address range type -asks the start and end addresses of the range. Hence, users can apply specific -schemes to only anonymous pages, non-anonymous pages, pages of specific -cgroups, all pages excluding those of specific cgroups, pages in specific -address range, and any combination of those. - -To handle filters efficiently, the address range type filter is handled by the -core layer, while others are handled by operations set. If a memory region is -filtered by the core layer-handled filter, it is not counted as the scheme has -tried to the region. In contrast, if a memory regions is filtered by an -operations set layer-handled filter, it is counted as the scheme has tried. -The difference in accounting leads to changes in the statistics. +Currently, anonymous page, memory cgroup, address range, and DAMON monitoring +target type filters are supported by the feature. Some filter target types +require additional arguments. The memory cgroup filter type asks users to +specify the file path of the memory cgroup for the filter. The address range +type asks the start and end addresses of the range. The DAMON monitoring +target type asks the index of the target from the context's monitoring targets +list. Hence, users can apply specific schemes to only anonymous pages, +non-anonymous pages, pages of specific cgroups, all pages excluding those of +specific cgroups, pages in specific address range, pages in specific DAMON +monitoring targets, and any combination of those. + +To handle filters efficiently, the address range and DAMON monitoring target +type filters are handled by the core layer, while others are handled by +operations set. If a memory region is filtered by a core layer-handled filter, +it is not counted as the scheme has tried to the region. In contrast, if a +memory regions is filtered by an operations set layer-handled filter, it is +counted as the scheme has tried. The difference in accounting leads to changes +in the statistics. Application Programming Interface -- 2.25.1