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 E6055C433F5 for ; Thu, 11 Nov 2021 08:29:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B6FD611AD for ; Thu, 11 Nov 2021 08:29:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7B6FD611AD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 1594E6B00A2; Thu, 11 Nov 2021 03:29:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 10A256B00A4; Thu, 11 Nov 2021 03:29:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0201F6B00A5; Thu, 11 Nov 2021 03:29:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id E89E16B00A2 for ; Thu, 11 Nov 2021 03:29:30 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9DE5C824C454 for ; Thu, 11 Nov 2021 08:29:30 +0000 (UTC) X-FDA: 78795975300.09.6073D36 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by imf16.hostedemail.com (Postfix) with ESMTP id A4244F00009B for ; Thu, 11 Nov 2021 08:29:18 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Uw0LiUY_1636619363; Received: from B-X3VXMD6M-2058.local(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0Uw0LiUY_1636619363) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Nov 2021 16:29:24 +0800 From: Xin Hao Reply-To: xhao@linux.alibaba.com Subject: Re: [PATCH V1 2/2] mm/damon: Add 'age' of region tracepoint support To: SeongJae Park Cc: sjpark@amazon.de, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20211111082034.13323-1-sj@kernel.org> Message-ID: <929062d1-7e6f-4426-9ffc-b5d2b124f1ad@linux.alibaba.com> Date: Thu, 11 Nov 2021 16:29:23 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211111082034.13323-1-sj@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A4244F00009B X-Stat-Signature: jp71fhrsocke4xiqisjr6xxyz9nxf3wo Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.132 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-HE-Tag: 1636619358-863678 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000426, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, Park: On 2021/11/11 =E4=B8=8B=E5=8D=884:20, SeongJae Park wrote: > On Thu, 11 Nov 2021 10:04:38 +0800 Xin Hao wro= te: > >> [-- Attachment #1: Type: text/plain, Size: 8070 bytes --] >> >> Hi Park: >> >> 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? >> I think these two variables nr_access & age have different meanings, >> the nr_access only reflect the >> >> period of sample_interval, We may be able to get the change of age >> through continuous long-term sampling, >> >> But I think this is not very convenient. >> >> We only need to observe the change of age value a small number of time= s >> to replace the continue sampling of the region. >> >> For example, age has been increasing to 141, but nr_access shows a val= ue >> of 0 at a certain time. Through this=EF=BC=8Cwe can >> >> conclude that the region has a very low nr_access value for a long tim= e. > I understand that you don't want to record all the traces and then proc= ess the > huge trace data in user space in order to get the age information, beca= use you > want to save disk space and CPU cycles. Is that correct? If so, I thi= nk that > makes sense, and it would be better to put that in the commit message. Yes, What you said is absolutely correct, that's how I thought about it,=20 I will add this part of the information to the commit=EF=BC=8Cthanks! > > > Thanks, > SJ > > [...] --=20 Best Regards! Xin Hao