From patchwork Fri Jun 16 19:17: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: 13283220 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 5E7A3EB64D8 for ; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 410948E0001; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C0316B0078; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ADD88E0001; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 216276B0075 for ; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CC916C0D06 for ; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) X-FDA: 80909570742.06.BFDF0DD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 2C77510000A for ; Fri, 16 Jun 2023 19:17:49 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Qr2d0sNY; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686943070; 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=ZOA9Y3WaxSy0wQxXiJlLMJbVdTR4WHvdGzBT7/g3vag=; b=e6Ll5RbcVU7uIQdDvkoHyFeJM1BNjKmTACA38Xvit9YXFc4r9Dv3saNJAeS1ull9C3K+nF Dlz5dVIWFoKuW13ot6F5yvbcC0zb5Y+CfQcLE9+qQuLNaeCwe/lWp58yTFuLPSp7ujPWg4 L1FgZSsCcRTY/3HvgSycV+tTO+dCjv0= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Qr2d0sNY; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686943070; a=rsa-sha256; cv=none; b=Gaji4FS8MsivvACN6IMTDC3N6D0Rwm03uO4TVhkvGptrpogKdbwO3H55RBTMkgqomncQoY 4wU2YRH5Y+hkHEbcKeqByIMDKB0vWl4WOpOUWq2VHx3QPU6IamBqXGcNfT3ul5LXDW3UP2 UfIik2teQSQ9UAeWmGuUqsjk8mgIMdk= 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 57E2263CEC; Fri, 16 Jun 2023 19:17:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36B0FC433C8; Fri, 16 Jun 2023 19:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943068; bh=l86JWMdvVZwYcsvalUMuaAJbJetoG2ebBMyTen7o1Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qr2d0sNYjVXHU2h2cqGjllyRexevn0t+autu/4Fqlk1gSHpY9elRfUlnnfCb22CC/ RK82KqUj8pDaUCmh8ryWEwzBGIbYN/6c2k397K0rPqsiIJVrhl8bRsXwM+Q78JRv7U 269xagijYdqtqDx/F8VEPtQGJpO3G9VdcRPTHE7by+L7mas3ZcuFDLHQ/99JVsSxyz 1Kn6h1liPOopyFtjUysuO9LFXG0UUSTxBzLoEt+If/QMY8avmU1cTkUNdeHFmSfZeS EpLAqipTwBQROZWN92bRjNy+hxtQe1Alu/SJN9XXXeudr8b93h5JkbgExk1uMLmDFB MjbTIMb3ILl1g== 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 1/7] Docs/mm/damon/design: document 'age' of region Date: Fri, 16 Jun 2023 19:17:36 +0000 Message-Id: <20230616191742.87531-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 2C77510000A X-Stat-Signature: rxngastsnfek7b6cx3rcsa8j5mikfbhj X-Rspam-User: X-HE-Tag: 1686943069-754289 X-HE-Meta: U2FsdGVkX1+ZhI0yZkx8aIyRDpl5vUYbasC74f6JIO7kCByLeOG5gPjsSCIIpuRaDFB0Id4PmwjhB4pFj8TyXiUjauHqH7Jayo0CDsfKuHWm78FUbQlSTrVVBJUB9BXkiXSGeuWc147ctaK7FmuA0TKnM+JSmqI5vdMvHyOihIoHcW8BM+UtkXCTW7qibnBCXKzng4GXVaoMA29uHaRWrht58oa5AbP/xHSlNwTMJ7W1+3ovhxUUn/mkAitU9ORfZ0L7H8+EHpWy6pjY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spamicity=0.000040, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The 'age' of each region in DAMON monitoring results is an important concept for both monitoring part and DAMOS. And DAMOS section of the design document is mentioning it. However, the age itself is not explained in the document. Add a section for that. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index da110e89cab4..a98af99bb705 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -190,6 +190,20 @@ In this way, DAMON provides its best-effort quality and minimal overhead while keeping the bounds users set for their trade-off. +Age Tracking +~~~~~~~~~~~~ + +By analyzing the monitoring results, users can also find how long the current +access pattern of a region has maintained. That could be used for good +understanding of the access pattern. For example, page placement algorithm +utilizing both the frequency and the recency could be implemented using that. +To make such access pattern maintained period analysis easier, DAMON maintains +yet another counter called ``age`` in each region. For each ``aggregation +interval``, DAMON checks if the region's size and access frequency +(``nr_accesses``) has significantly changed. If so, the counter is reset to +zero. Otherwise, the counter is increased. + + Dynamic Target Space Updates Handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~