From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3494C433EF for ; Thu, 11 Nov 2021 08:20:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 39027611AD for ; Thu, 11 Nov 2021 08:20:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 39027611AD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id CD5856B00A0; Thu, 11 Nov 2021 03:20:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C85136B00A2; Thu, 11 Nov 2021 03:20:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B73E06B00A3; Thu, 11 Nov 2021 03:20:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id A86166B00A0 for ; Thu, 11 Nov 2021 03:20:40 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6A4207401D for ; Thu, 11 Nov 2021 08:20:40 +0000 (UTC) X-FDA: 78795953040.04.47457E7 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP id 2F09BD036A5D for ; Thu, 11 Nov 2021 08:20:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EAB161177; Thu, 11 Nov 2021 08:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636618839; bh=LYmAHq44d36uGm8O5OwzSOPuFUQOFDcOWK1YCWwHIfs=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=G4cKhAvz4FVXbN7eaDGfQDKN5lSDnYJZJmr2kWVZJQ8PSGpdMagOb0zTmVbTCgkLp 69XJ1wp9EI0ebJhwU4tQh/UeGRRwkZwXlsqmYS468jUxSWMyEH9WtIseO8W8LRsnwb T1e9rYxamiPF5thiS2W8SanUPlFw7uZW+9R+NMmSKbuGJsuIEpkyZsWLSqkRGd49Mx pym8NXHtuY561aIvw1ZpY9LQf5369BB24Vl/RKy23tr6xi5FK7+iNH1liOEOMr9eNZ ZP6SAomUz6hFWEJ0NyTGdXcPOvFEw21ryyl+hkyc61+AZxD7C1tWF5RMbW0ulMBRmE kmM2obF6oo5mA== From: SeongJae Park To: Xin Hao Cc: SeongJae Park , sjpark@amazon.de, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1 2/2] mm/damon: Add 'age' of region tracepoint support Date: Thu, 11 Nov 2021 08:20:34 +0000 Message-Id: <20211111082034.13323-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=G4cKhAvz; spf=pass (imf21.hostedemail.com: domain of sj@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2F09BD036A5D X-Stat-Signature: hcoirmwsjz8tn45jmkxz1x9hhmuxj3jb X-HE-Tag: 1636618834-502040 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 11 Nov 2021 10:04:38 +0800 Xin Hao wrote= : > [-- Attachment #1: Type: text/plain, Size: 8070 bytes --] >=20 > Hi Park: >=20 > On 2021/11/10 =E4=B8=8B=E5=8D=889:16, SeongJae Park wrote: > > On Wed, 10 Nov 2021 20:13:14 +0800 Xin Hao w= rote: > > > >> In patch "mm/damon: add a tracepoint", it adds a > >> tracepoint for DAMON, it can monitor each region > >> for each aggregation interval, Now the region add > >> a new 'age' variable, some primitive would calculate > >> the priority of each region as a weight, there put it > >> into tracepoint, so we can easily track the change of > >> its value through perf or damon-tools. > > DAMON calculates the age using the address range and nr_accesses of t= he region, > > which are already in the tracepoint. In other words, user space can = calculate > > the age on their own. Therefore I thought putting age in the tracepo= int as > > adding unnecessary information, at the moment of the implementation. > > > > Of course, I would missing some use cases that need this information = in the > > tracepoint. Furthermore, adding just one more value in the tracepoin= t wouldn't > > incur a real issue. But, I'd like to know why this is necessary and = how much > > benefit it provides. Xin, could you please share that? >=20 > I think these two variables nr_access & age have different meanings,=20 > the nr_access only reflect the >=20 > period of sample_interval, We may be able to get the change of age=20 > through continuous long-term sampling, >=20 > But I think this is not very convenient. >=20 > We only need to observe the change of age value a small number of times= =20 > to replace the continue sampling of the region. >=20 > For example, age has been increasing to 141, but nr_access shows a valu= e=20 > of 0 at a certain time. Through this=EF=BC=8Cwe can >=20 > conclude that the region has a very low nr_access value for a long time= . I understand that you don't want to record all the traces and then proces= s the huge trace data in user space in order to get the age information, becaus= e you want to save disk space and CPU cycles. Is that correct? If so, I think= that makes sense, and it would be better to put that in the commit message. Thanks, SJ [...]