From patchwork Fri Jul 28 20:34:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 127887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp719614vqg; Fri, 28 Jul 2023 15:14:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrlBhCZiNhngYtRleRoPpuIZINtTkFSK+eg7avUL0XLAtKFuewmyF8LFfVaQrE5AJOxYMX X-Received: by 2002:a05:6808:144:b0:3a6:f2d5:4bc2 with SMTP id h4-20020a056808014400b003a6f2d54bc2mr3759732oie.16.1690582486818; Fri, 28 Jul 2023 15:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690582486; cv=none; d=google.com; s=arc-20160816; b=FzAKjFYxDe6zFnd8R3yebKByo3laevTMmkv85NH6X2X2IeySqB8wD8yzc92YNOJpkd WTR/+X8phsAD/FE0kMTGbV0u2OPdA7b8L6hmm4PBZOQHJBg2JLfCm44PgqbCVxNlQbou xobNIDtEXkIKMWOwPeh2xTX5ElM49ZgL84oks/5j5ZPopk7izOzY+pY9f5xJTH3MYRVv RO0FBKx5keK+WCanQzeoB0m13jHmVtESSz4NejzRJnArIbRKsSLq2+1RFu+VOupnEMRB I14Smn9MvHy1mcdkxSwqvs/3nz9mVnJJ3BkSGNQ5B8Hp8O/u99er7FlgnxKCLKT2jH8o X/VQ== 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=xoskas4YLSs3dvZb72uuFsEZKWsnAh3hmcaVUf+PT82D5adCGQz+boW9gsMOYvicQD C6cWaA2m+enR16stskvskFlIrqqwNIE24Hp9P3bNu4pXqEwZhficdgf10eMS74jbirdf lyd9b8SyGSyUKtOAXhO1H3JoMHu6SXNW50fHCWWHL34GlNpaFLMfR74UDVs/BMRp8fYj EXqJavGaGvv3OSFBJspj3B9n/idsSdemy3sTXyM86ZqBehw2s/ryELeUgYhJAIJpNy2U hs5zfa6uDqs35APyPL6rwURAsj/hWcnZ9Cf+4yrOFjYrbKsnsGdikLz6S2JRy/r5xDTd w6MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OxWEhRuP; 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 i7-20020a17090a64c700b00263ba5d7088si5065988pjm.48.2023.07.28.15.14.33; Fri, 28 Jul 2023 15:14:46 -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=OxWEhRuP; 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 S231449AbjG1Ufd (ORCPT + 99 others); Fri, 28 Jul 2023 16:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234807AbjG1UfE (ORCPT ); Fri, 28 Jul 2023 16:35:04 -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 1D37A44B1; Fri, 28 Jul 2023 13:34:57 -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 A747762205; Fri, 28 Jul 2023 20:34:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93157C433CB; Fri, 28 Jul 2023 20:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576496; bh=/3fkCyEgrxb/AUOocTnJxHaLWQx7r2oBGZrkuNBIGj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OxWEhRuPcnfrcCVwBiXAj7XlQmmkMrkW9e3U/XpZL+HwfZYSYxvDTK5NHZ3PAyPG6 U8vjA9kEWx5bcJ05v0Z7MHa4bCwtMcGu8JCoYAlrEuJlCc7Vs7yyR1v/Sxx8AY4gfZ Rw47IgpK69FeRYLEkwZWWigquez9wdXepYBOd5mb5fOCaqcRIYMh/HbwR+mAwukQcL tsjQgy/BD9KP302rVfPdIHEJ0+GnxpHGFfbSeDr/Uo22p1aCiX6TZMCWTl5RbLO+R8 Ab1ecYyLD2f4biH6bjWAY5swpY2S9TkcobXnu7R2EqLBDptkXTK7f6lWry3g+yYHfP I7uhEvHyiwGGw== 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 11/13] Docs/mm/damon/design: update for DAMON monitoring target type DAMOS filter Date: Fri, 28 Jul 2023 20:34:42 +0000 Message-Id: <20230728203444.70703-12-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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: 1772704221433454156 X-GMAIL-MSGID: 1772704221433454156 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