From patchwork Wed Aug 2 21:43:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13338865 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 951B2C04FE0 for ; Wed, 2 Aug 2023 21:43:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CDAEA2801F2; Wed, 2 Aug 2023 17:43:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C65BF2801EB; Wed, 2 Aug 2023 17:43:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8FB52801F2; Wed, 2 Aug 2023 17:43:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 930A42801EB for ; Wed, 2 Aug 2023 17:43:22 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 51B37C05FE for ; Wed, 2 Aug 2023 21:43:22 +0000 (UTC) X-FDA: 81080491044.22.A504B52 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf22.hostedemail.com (Postfix) with ESMTP id AAFB8C000B for ; Wed, 2 Aug 2023 21:43:20 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KUY46xF7; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691012600; 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=N2Dh371ZmBlYpauiue0Vw10+cKdgFzpWgDU1O6AHC1g=; b=rtq5bDngRXp7Fe6aSRQv7L1y7n1LBa/nQ0HYfxW5ueoFcZSRbRTtwad5MlfUDCOy2XcpsT vTFadR9gvwiD7yk8Qfgx5a3k4wQ4fub5PgQvsgpubgWBcPMTRcX9UxvlqQBoQaOR8iRs1H zD1otm1woVjqRyMF4VlpW9hUXMhmYjY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691012600; a=rsa-sha256; cv=none; b=IYDt/bxuOXAwRh25CGfd2IkGUkgmx2uEkuq50MLoz3APZcNBLMoeBBR3nQUisT+NBpIyRQ YLpKnCLLiA+r+LzQO/3mbpDzUQGvesgPb3S1YLhqD0+IHNCrsuSeQE/A00k9hqhtHYxJ3t /AdAqRhK48Cdt+HhoPOxMCi4CJTj7tM= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KUY46xF7; spf=pass (imf22.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org 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 EF47A61B51; Wed, 2 Aug 2023 21:43:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF748C433C7; Wed, 2 Aug 2023 21:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012599; bh=OCzjAXySbo2P2W2ofPo/GLfYFykKqV/gINis3/IWY+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUY46xF7JqWyv4xqIFT5XLrz9FauytM1EkCm1oel9sWJQ0iCMj0WzZBtKq2pXQ+eH 2wuOPp+Gpx8XS7jBUD5QU1IobXgPnT/MdQMklMZD/IoaZQRWBVJfnLrtqGBljC1BZ8 oSrKO0CnfUwrjpnPBPt7lHU4RAIrgaJY18cWctBUEzU/3n+5ZfAZdkq9XBuaANfRKO QYaY46+oWoNTKZJrtiEGDB8ls7al1YS94keLHmddp2Es71dupRGlPFPdY9Clwc9uI6 f3waIxdyaJ652r3kNBOxrQAZXy7XuA9Owyh3fs5aRS/bIsxrpEHBuERf7H7wP0Ptxl FekurPKo97gLg== 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 05/13] Docs/mm/damon/design: update for address range filters Date: Wed, 2 Aug 2023 21:43:04 +0000 Message-Id: <20230802214312.110532-6-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-Rspamd-Queue-Id: AAFB8C000B X-Rspam-User: X-Stat-Signature: kwhbnp5simo81zmixdtnrtrr8kqrmaib X-Rspamd-Server: rspam03 X-HE-Tag: 1691012600-572895 X-HE-Meta: U2FsdGVkX19O2uGgpPS/FTtgSFhMe6Yv7kCgV1XszR4XapcwgdBGQ1scJWGUZw2uF4ypYtmMWORfoUymqOGbwr7Cwdjxyx2bf2ZfhcydGAyULgovvBR8KHt9BgsR2gYXWFe06DiKAO6QPjyAX3RsX09aH1myMWtT6WhndZ5dzeMEqUyGnVW1nusDmTnixVQoLBLUD84Z7bItbqGMUvU2HtGtJKjCrO4FrlL/yQZDGZQB+Zb1SZcLIpZYE1KZL5otsl/3I1dPNh/XVwekHU+Yw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000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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