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: 109342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1571051vqr; Fri, 16 Jun 2023 12:35:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Uz5cZjajn3MgdSrIgapXWvZpyDlnZRyQ/cjEKZmn7Rzy5TjGQCZ11lfvUL8bnS9ktvdGG X-Received: by 2002:a05:6a20:9144:b0:10c:513d:2bd9 with SMTP id x4-20020a056a20914400b0010c513d2bd9mr3142749pzc.50.1686944153621; Fri, 16 Jun 2023 12:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944153; cv=none; d=google.com; s=arc-20160816; b=neyCCDlsw6jhBuf+McgmVQ+wN6CAVfT/p/G3Jpa1adplg8qHo32mKZa7GePMtEnnQW Kf8ElzQj1xfOqr4jU6s55YiyIyE1rq87R+ipO8WFTiN/LdPldZTj3oNXj0uok35bhaHg iFvGzMwo+d8S8z8BNVRPLwJ7IWIG7wzvLK9V76VavaOhYranjtFcWeT+ZeFjgI+X7Sel 8qa83wzZROLEcZDZfc3+VLvJbxhmZ1eYIxASH+iAWaGYV9JNG8cWKGSeX7iij56Q3G5/ TKBp4f5eddb5EoVc8hSuQ5fD40fs+JJTksCzRqFQcAajWjxHg1WLlpEYsHLu+djuT4eT ldyg== 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=ZOA9Y3WaxSy0wQxXiJlLMJbVdTR4WHvdGzBT7/g3vag=; b=RniRW10Jj41XLLlwZrSLmq+HvFkEiut6MX6zsfKUKdocQHcgfOEyq81NaLUDSWeg5E bWwwDGIN8zBlaF1FZtUGHSh2kFSuynoFBc5bbZkgLEbgMHu4l+45+E8hNDTLoOtiAwjE o8q8qOBF2W8Ac41KAPSlM/zYiJO5aGTvlKhxoeUd6RGugC9ovdFJYfsIVXOCfahfbz/p 7EfF3VVpLk2A9PyED5PViRirirR25tmtN45iTkdc/bpvRVnEZ6zjtu3/1nwk6Ee4V2AN o1igPgWin5jENpbBpbd2t6ze7aL9Apo3HzIhnB//XI169HzUGkwNHB5pfqYFND/q7FZS jcyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qr2d0sNY; 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 bv128-20020a632e86000000b0054f93b05b51si9915354pgb.96.2023.06.16.12.35.38; Fri, 16 Jun 2023 12:35:53 -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=Qr2d0sNY; 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 S1346124AbjFPTVp (ORCPT + 99 others); Fri, 16 Jun 2023 15:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345417AbjFPTVY (ORCPT ); Fri, 16 Jun 2023 15:21:24 -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 515235256; Fri, 16 Jun 2023 12:19:07 -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 5B83E637D2; 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-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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889152838458678?= X-GMAIL-MSGID: =?utf-8?q?1768889152838458678?= 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~