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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFBE2C433F5 for ; Fri, 10 Dec 2021 08:19:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 123CC6B0071; Fri, 10 Dec 2021 03:19:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0ADA66B0072; Fri, 10 Dec 2021 03:19:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8FF46B0074; Fri, 10 Dec 2021 03:19:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id D55466B0071 for ; Fri, 10 Dec 2021 03:19:16 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8E29F8249980 for ; Fri, 10 Dec 2021 08:19:06 +0000 (UTC) X-FDA: 78901184292.25.671B086 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf02.hostedemail.com (Postfix) with ESMTP id 2DB1E80008 for ; Fri, 10 Dec 2021 08:19:05 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 21508B82767; Fri, 10 Dec 2021 08:19:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48197C00446; Fri, 10 Dec 2021 08:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639124342; bh=bjObNgj4Nu4UfmjzJWW93lpqo6GTGtFbMeFqZRgFtVk=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=nG+FimgdAXraTKzVFWBvGloNqYyYm5/af2oO2jKqieA1f8/WCR2PVzL2mju307LvP w2dqYLOMr9D6to90a6vby+toq2cbvmcskhaYQ3nKmeF1YKnrnCfWuUtfYffi6g8ls6 ilyxUGK05Z8LTINHgfo5xN20++EGWuCY1Ts1XfAKTgZ34MwQ5Autkhg9yrRfGm7fb8 iSObEYuvxCsub9rMmMF3SnHD8aFu2KdobQfLilaZAnkuBWuopXgdbPpvAPAgVvtxje H6I2R53OrpkSEsOCQjLdtAgswMM83W4TXnz8nikKC7F5+5MTtMhQ0TJW8i6zZCE3WJ OW+TyaeIgoxsQ== From: SeongJae Park To: Xin Hao Cc: SeongJae Park , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1 2/2] mm/damon: Modify the display form of damon tracepoint Date: Fri, 10 Dec 2021 08:18:59 +0000 Message-Id: <20211210081859.33599-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 X-Stat-Signature: qzramtycte9ob9uf98gx1re7it3ockbw Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nG+Fimgd; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 2DB1E80008 X-HE-Tag: 1639124345-44620 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: Hi Xin, On Fri, 10 Dec 2021 11:36:23 +0800 Xin Hao wrote= : > [-- Attachment #1: Type: text/plain, Size: 4038 bytes --] >=20 > Hi SeongJae=EF=BC=9A >=20 > On 12/10/21 12:46 AM, SeongJae Park wrote: > > On Fri, 10 Dec 2021 00:33:17 +0800 Xin Hao w= rote: > > > >> When I use the perf command to record damon monitor data, like below= . > >> # perf record -e damon:damon_aggregated > >> # perf script > >> ...target_id=3D18446462667479739520 nr_regions=3D13 28147280592= 8960-281472942936064... > >> ...target_id=3D18446462667479739520 nr_regions=3D13 28147294293= 6064-281473080008704... > >> ...target_id=3D18446462667479739520 nr_regions=3D13 28147308000= 8704-281473216634880... > >> > >> From a user's point of view, the 'target_id' and 'damon_region' whi= ch displays in decimal > >> are not very friendly, So there do some changes, keep the 'target_id= ' display consistent > >> with 'dbgfs/target_ids' interface and 'damon_region' is displayed in= hexadecimal, just like > >> below. > >> # perf record -e damon:damon_aggregated > >> # perf script > >> ...target_id=3D5522 nr_regions=3D14 ffff716a3000-ffff79893000..= . > >> ...target_id=3D5522 nr_regions=3D14 ffff79893000-ffff819dc000..= . > >> ...target_id=3D5522 nr_regions=3D14 ffff819dc000-ffff89bd9000..= . > >> > >> Signed-off-by: Xin Hao > >> --- > >> include/trace/events/damon.h | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/include/trace/events/damon.h b/include/trace/events/dam= on.h > >> index 99ffa601e351..67de51814f4c 100644 > >> --- a/include/trace/events/damon.h > >> +++ b/include/trace/events/damon.h [...] > >> TP_fast_assign( > >> - __entry->target_id =3D t->id; > >> + __entry->target_id =3D (int)pid_vnr((struct pid *)t->id); > > I think this would break physical address space monitoring. Have you= tested > > this change for that? >=20 > Yes, you are right, But I encountered some problems while testing=20 > physical address, it seems that my operation did not work >=20 > I did some test like this: >=20 > # echo "42 0x0000000840000000 0x000000103fffffff" > init_regions >=20 > # echo paddr > target_ids >=20 > # echo on > monitor_on >=20 > i get the physical address from my kernel startup log. >=20 > 15 [ 0.000000] Early memory node ranges > 16 [ 0.000000] node 0: [mem 0x0000000040000000-0x000000083bc7ffff] > 17 [ 0.000000] node 0: [mem 0x000000083bc80000-0x000000083bffffff] > 18 [ 0.000000] node 0: [mem 0x000000083c000000-0x000000083c03ffff] > 19 [ 0.000000] node 0: [mem 0x000000083c040000-0x000000083c0fffff] > 20 [ 0.000000] node 0: [mem 0x000000083c100000-0x000000083f3dffff] > 21 [ 0.000000] node 0: [mem 0x000000083f3e0000-0x000000083f46ffff] > 22 [ 0.000000] node 0: [mem 0x000000083f470000-0x000000083f47ffff] > 23 [ 0.000000] node 0: [mem 0x000000083f480000-0x000000083f59ffff] > 24 [ 0.000000] node 0: [mem 0x000000083f5a0000-0x000000083fffffff] > 25 [ 0.000000] node 1: [mem 0x0000000840000000-0x000000103fffffff] > 26 [ 0.000000] node 2: [mem 0x0000001040000000-0x000000183fffffff] > 27 [ 0.000000] node 3: [mem 0x0000001840000000-0x000000203fffffff] > 28 [ 0.000000] Initmem setup node 0 [mem=20 > 0x0000000040000000-0x000000083fffffff] > 29 [ 0.000000] On node 0 totalpages: 8388608 >=20 > Is there anything wrong ? "The target id should already in target_ids file"[1]. For proper use of DAMON, I'd like to recommend you to refer to, or use th= e official DAMON user space tool[2] instead of the debugfs interface. As t= he document[3] says "DAMON user space tool. This is for privileged people su= ch as system administrators who want a just-working human-friendly interface". Also, some of your patches including this break the user space tool. As = it is an important part of DAMON echosystem, it would be great if you could con= sider taking care in keeping it unbroken, too. [1] https://docs.kernel.org/admin-guide/mm/damon/usage.html#initial-monit= oring-target-regions [2] https://github.com/awslabs/damo [3] https://docs.kernel.org/admin-guide/mm/damon/usage.html#detailed-usag= es Thanks, SJ [...]