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 30B89C433EF for ; Tue, 12 Oct 2021 07:57:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9711160EBB for ; Tue, 12 Oct 2021 07:57:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9711160EBB 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 359BF6B006C; Tue, 12 Oct 2021 03:57:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 309AF6B0071; Tue, 12 Oct 2021 03:57:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F8FA6B0073; Tue, 12 Oct 2021 03:57:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 1223E6B006C for ; Tue, 12 Oct 2021 03:57:24 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CD0A02FDE0 for ; Tue, 12 Oct 2021 07:57:23 +0000 (UTC) X-FDA: 78687030366.29.A436B9F Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf21.hostedemail.com (Postfix) with ESMTP id 90FC7D040299 for ; Tue, 12 Oct 2021 07:57:21 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UrYcJvG_1634025437; Received: from B-X3VXMD6M-2058.local(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0UrYcJvG_1634025437) by smtp.aliyun-inc.com(127.0.0.1); Tue, 12 Oct 2021 15:57:18 +0800 From: Xin Hao Reply-To: xhao@linux.alibaba.com Subject: Re: [PATCH] mm/damon/dbgfs: add region_stat interface To: SeongJae Park Cc: sjpark@amazon.de, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20211012071119.32320-1-sj@kernel.org> Message-ID: <7ab062d3-f087-78ef-4630-471bb6d16275@linux.alibaba.com> Date: Tue, 12 Oct 2021 15:57:17 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20211012071119.32320-1-sj@kernel.org> Content-Type: text/plain; charset=gbk; format=flowed Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf21.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.57 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 90FC7D040299 X-Stat-Signature: 5pycma47auw4uzz6y416iwa4xj681fpj X-HE-Tag: 1634025441-22408 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: =D4=DA 2021/10/12 =CF=C2=CE=E73:11, SeongJae Park =D0=B4=B5=C0: > Hello Xin, thank you for this patch! > > On Tue, 12 Oct 2021 13:49:48 +0800 Xin Hao wro= te: > >> Using damon-dbgfs has brought great convenience to user-mode >> operation damon, but sometimes if i want to be able to view >> the division of task regions, nr_access values etc,but i found >> that it is impossible to view directly through the dbgfs interface, >> so there i add a interface "region_stat", it displays like this. >> >> # cat region_stat >> last_aggregation=3D120.87s >> target_id=3D5148 >> nr_regions=3D10 >> 400000-258c000(34352 KiB): 1 >> 258c000-4719000(34356 KiB): 0 >> 4719000-abbf000(103064 KiB): 0 >> abbf000-c4d4000(25684 KiB): 11 >> c4d4000-ff5c000(59936 KiB): 15 >> ff5c000-152f9000(85620 KiB): 20 >> 152f9000-1599e000(6804 KiB): 10 >> 1599e000-19573000(61268 KiB): 0 >> 19573000-1f92c000(102116 KiB): 0 >> 1f92c000-22a4c000(50304 KiB): 0 > I think similar information could also be collected via the 'damon_aggr= egated' > tracepoint[1], which is merged in the mainline, or 'DAMOS_STAT'[2], whi= ch is > merged in -mm. The recording feature[3] could also be used, though it = would > take some time before it is merged in the mainline. Have you considere= d using > those but found some problem? Yes, i know we can use damon_aggregated tracepoint, but i think, add a=20 "region_stat" will be more convenient and intuitive, especially when we use damon-dbgfs interface. > > [1] https://git.kernel.org/torvalds/c/2fcb93629ad8 > [2] https://lore.kernel.org/linux-mm/20211001125604.29660-6-sj@kernel.o= rg/ > [3] https://lore.kernel.org/linux-mm/20211008094509.16179-1-sj@kernel.o= rg/ > > > Thanks, > SJ > > [...] --=20 Best Regards! Xin Hao