From patchwork Fri Jul 28 20:34:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 127866 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp693543vqg; Fri, 28 Jul 2023 14:10:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBv81sQUOJ1vx99K9V1JHEXV6TGG87FQ+WguG4Zvco+BiTbaaViLGGDbaAT4nduqI12+ns X-Received: by 2002:a05:6a00:218a:b0:684:6bd8:4e3b with SMTP id h10-20020a056a00218a00b006846bd84e3bmr3680458pfi.19.1690578620086; Fri, 28 Jul 2023 14:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690578620; cv=none; d=google.com; s=arc-20160816; b=NkaHs+T50kiwgqnKxBzqBaXJxTecITV1PvUFe+F4RJMT2uD/PdGXi8JmmEIBpTkav6 5Chx/ZnCkc/zn6UP4dq/7D8/0FNx7Wl5hEkOV8Wd7TNHQzCt2CAwKc7uU+g5LZ4ohWTN iivvNUDoF6hgxBrOhkENirDrEYQyb+O0Y7PMrKFCBYa1C5rPhkrGM0wF+Or5tJw800G6 DZ2AS011bb0lL0z2sO9E53bjcx8CPKUnmiPVJEzGMttCMZyBq7QxlzcEr9JvH1yGsu3l XnTb8WlDSC7zchsMdkjzmL7n8D5MHf0yIjdOPYXa7vWzd5yzbvCcgGesYl+I2iyzPvp3 j/dw== 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=N2Dh371ZmBlYpauiue0Vw10+cKdgFzpWgDU1O6AHC1g=; fh=Jn9vwBBsv0/M243wtBPWgrycE99QwFHXCzusFnO8K0Y=; b=cjR5Ur02Ev2ZnMs402zB5ngRPqJnwRg/dHbAHRQUjtfzgbSX6XUJ7vrbrCIPW8ebSw dvi1XHyCmeh+F/4w8Ofeb/OJEVUco7eVjjXZVBvHV94ONVXQNEUQOz6fXY069TQF7My0 EOupnofqRS4J301/vAqolxt8G3035XW0cA6EmqSNuqhaC9FOvbvyHLHNSin3ffSDljmL F2b6WG986d1yX17SqTz/XusQHt1Xpqw5wLmcqt3X45bPa9ly03HxmY6/Mzxylqwxdgqt nyd6h6uKnoXjJUALUSBFppAjLOmZVFn4tMr+43fGd0ZQbG2aSM6r/WedYH128iNlvy2p SftQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=heq5ttnp; 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 a11-20020a63d40b000000b00563477c3519si3544419pgh.488.2023.07.28.14.10.07; Fri, 28 Jul 2023 14:10:20 -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=heq5ttnp; 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 S235066AbjG1UfL (ORCPT + 99 others); Fri, 28 Jul 2023 16:35:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbjG1Ue6 (ORCPT ); Fri, 28 Jul 2023 16:34:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E723A44B7; Fri, 28 Jul 2023 13:34:53 -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 95B786220B; Fri, 28 Jul 2023 20:34:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81061C433C9; Fri, 28 Jul 2023 20:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576492; bh=OCzjAXySbo2P2W2ofPo/GLfYFykKqV/gINis3/IWY+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=heq5ttnp+0povkEP2NQq2cKCGH6lIIYkoMJQgmhO9vQAax7BDzcr7DdU1Q787/Wq6 Q9YeJVWmEHUFLd5qRENHxmVH7CqsLYHLU+C9jYL0lY2f9fTzGd89JOSSEKcugjH5qV +4OBdFvsT2CsHNrjMfFwwft/J4k+Sn3di3qmQeI8yWpwnFfHQadtT9Nhb/Sh+YCC+o 13cM5XYudDgbte9YduCx4h3FLlpSG0BPdG2nb3Nhzv20aF3IqPZIVxzyK5nrHmLY1z cePPG89HaxuFAEeiheYUlMAMH8JDYucg43I689mqC6DQhyBbg3QctN4ksFohaXYEeh kBPKIAB9Al3EA== 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 05/13] Docs/mm/damon/design: update for address range filters Date: Fri, 28 Jul 2023 20:34:36 +0000 Message-Id: <20230728203444.70703-6-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=-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772700167052014626 X-GMAIL-MSGID: 1772700167052014626 Update DAMON design document's DAMOS filters section for address range DAMOS filters. Because address range filters are handled by the core layer and it makes difference in schemes tried regions and schemes statistics, clearly describe it. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 4bfdf1d30c4a..134912166f5a 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -380,12 +380,21 @@ 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). -As of this writing, anonymous page type and memory cgroup type 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. Hence, users can apply specific schemes to -only anonymous pages, non-anonymous pages, pages of specific cgroups, all pages -excluding those of specific cgroups, and any combination of those. +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. Application Programming Interface