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 92935C433F5 for ; Mon, 2 May 2022 07:57:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D37426B0072; Mon, 2 May 2022 03:57:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE5BE6B0073; Mon, 2 May 2022 03:57:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD5F66B0074; Mon, 2 May 2022 03:57:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id AAD686B0072 for ; Mon, 2 May 2022 03:57:09 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7C65E2B4B2 for ; Mon, 2 May 2022 07:57:09 +0000 (UTC) X-FDA: 79420047378.17.B1B7C63 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by imf07.hostedemail.com (Postfix) with ESMTP id 945A940072 for ; Mon, 2 May 2022 07:57:03 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VByJntr_1651478218; Received: from 30.30.72.33(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0VByJntr_1651478218) by smtp.aliyun-inc.com(127.0.0.1); Mon, 02 May 2022 15:57:00 +0800 Message-ID: <80586516-d783-8f81-f6d7-338d9af7a3e6@linux.alibaba.com> Date: Mon, 2 May 2022 15:56:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Thunderbird/100.0 Subject: Re: [PATCH 2/3] mm/damon/sysfs: support fixed virtual address ranges monitoring Content-Language: en-US To: sj@kernel.org, akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220426231750.48822-1-sj@kernel.org> <20220426231750.48822-3-sj@kernel.org> From: Rongwei Wang In-Reply-To: <20220426231750.48822-3-sj@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Stat-Signature: 46fq8qicpxzzg3nu6b79hgjzuf8maz9e Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.56 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 945A940072 X-HE-Tag: 1651478223-152134 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, SeongJae I had read and tested your patchset these days. It works. It seems that these patches only fix the issue about init_regions in DAMON-sysfs, but not fix in DAMON-dbgfs? maybe I missing something. If so, do you have any plan to fix this bug in dbgfs? Actually, what I want to say is that I ready a patch for solving the init_regions related bug in dbgfs these days. I not sure if you're interested in it. Best Regards, Rongwei On 4/27/22 7:17 AM, sj@kernel.org wrote: > From: SeongJae Park > > This commit makes DAMON sysfs interface to support the fixed virtual > address ranges monitoring. After this commit, writing 'fvaddr' to the > 'operations' DAMON sysfs file makes DAMON uses the monitoring operations > set for fixed virtual address ranges, so that users can monitor accesses > to only interested virtual address ranges. > > Signed-off-by: SeongJae Park > --- > mm/damon/sysfs.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c > index 719a286d378f..767ab8c33e4d 100644 > --- a/mm/damon/sysfs.c > +++ b/mm/damon/sysfs.c > @@ -1694,7 +1694,7 @@ static struct kobj_type damon_sysfs_attrs_ktype = { > /* This should match with enum damon_ops_id */ > static const char * const damon_sysfs_ops_strs[] = { > "vaddr", > - "unsupported", /* fvaddr is not supported by sysfs yet */ > + "fvaddr", > "paddr", > }; > > @@ -1844,9 +1844,6 @@ static ssize_t operations_store(struct kobject *kobj, > > for (id = 0; id < NR_DAMON_OPS; id++) { > if (sysfs_streq(buf, damon_sysfs_ops_strs[id])) { > - /* fvaddr is not supported by sysfs yet */ > - if (id == DAMON_OPS_FVADDR) > - return -EINVAL; > context->ops_id = id; > return count; > } > @@ -2136,7 +2133,8 @@ static int damon_sysfs_set_targets(struct damon_ctx *ctx, > damon_sysfs_destroy_targets(ctx); > return -ENOMEM; > } > - if (ctx->ops.id == DAMON_OPS_VADDR) { > + if (ctx->ops.id == DAMON_OPS_VADDR || > + ctx->ops.id == DAMON_OPS_FVADDR) { > t->pid = find_get_pid(sys_target->pid); > if (!t->pid) { > damon_sysfs_destroy_targets(ctx);