From: SeongJae Park <sj@kernel.org>
To: xhao@linux.alibaba.com
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, corbet@lwn.net,
skhan@linuxfoundation.org, rientjes@google.com,
gregkh@linuxfoundation.org, linux-damon@amazon.com,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 05/13] mm/damon/sysfs: Support the physical address space monitoring
Date: Mon, 28 Feb 2022 16:25:14 +0000 [thread overview]
Message-ID: <20220228162514.4111-1-sj@kernel.org> (raw)
In-Reply-To: <d4b7fe7b-a908-989c-e86b-2ed404372d78@linux.alibaba.com>
On Tue, 1 Mar 2022 00:11:12 +0800 xhao@linux.alibaba.com wrote:
>
> On 2/28/22 4:13 PM, SeongJae Park wrote:
> > This commit makes DAMON sysfs interface supports the physical address
> > space monitoring. Specifically, this commit adds support of the initial
> > monitoring regions set feature by adding 'regions' directory under each
> > target directory and makes context operations file to receive 'paddr' in
> > addition to 'vaddr'.
> >
> > As a result, the files hierarchy becomes as below:
> >
> > /sys/kernel/mm/damon/admin
> > │ kdamonds/nr_kdamonds
> > │ │ 0/state,pid
> > │ │ │ contexts/nr_contexts
> > │ │ │ │ 0/operations
> > │ │ │ │ │ monitoring_attrs/
> > │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us
> > │ │ │ │ │ │ nr_regions/min,max
> > │ │ │ │ │ targets/nr_targets
> > │ │ │ │ │ │ 0/pid_target
> > │ │ │ │ │ │ │ regions/nr_regions <- NEW DIRECTORY
> > │ │ │ │ │ │ │ │ 0/start,end
> > │ │ │ │ │ │ │ │ ...
> > │ │ │ │ │ │ ...
> > │ │ │ │ ...
> > │ │ ...
> >
> > Signed-off-by: SeongJae Park <sj@kernel.org>
> > ---
> > mm/damon/sysfs.c | 276 ++++++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 271 insertions(+), 5 deletions(-)
> >
> > diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
> > index 9221c93db6cc..968a4ba8e81b 100644
> > --- a/mm/damon/sysfs.c
> > +++ b/mm/damon/sysfs.c
> > @@ -113,12 +113,220 @@ static struct kobj_type damon_sysfs_ul_range_ktype = {
> > .default_groups = damon_sysfs_ul_range_groups,
> > };
> >
> > +/*
> > + * init region directory
> > + */
> > +
> > +struct damon_sysfs_region {
> > + struct kobject kobj;
> > + unsigned long start;
> > + unsigned long end;
> > +};
> > +
> > +static struct damon_sysfs_region *damon_sysfs_region_alloc(
> > + unsigned long start,
> > + unsigned long end)
> > +{
> > + struct damon_sysfs_region *region = kmalloc(sizeof(*region),
> > + GFP_KERNEL);
> > +
> > + if (!region)
> > + return NULL;
> > + region->kobj = (struct kobject){};
> > + region->start = start;
> > + region->end = end;
> > + return region;
> > +}
> > +
>
> The interface "start" and "end" have the same problems
>
> [root@rt2k03395 0]# echo 100 > start
> [root@rt2k03395 0]# echo 10 > end
> [root@rt2k03395 0]# cat end
> 10
> [root@rt2k03395 0]# cat start
> 100
As mentioned on the above answer[1], this is an intended behavior, so I don't
think a fix is needed.
[1] https://lore.kernel.org/linux-mm/20220228162318.4046-1-sj@kernel.org/
Thanks,
SJ
[...]
> --
> Best Regards!
> Xin Hao
>
next prev parent reply other threads:[~2022-02-28 16:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 8:13 [PATCH v3 00/13] Introduce DAMON sysfs interface SeongJae Park
2022-02-28 8:13 ` [PATCH v3 01/13] mm/damon/core: Allow non-exclusive DAMON start/stop SeongJae Park
2022-02-28 8:13 ` [PATCH v3 02/13] mm/damon/core: Add number of each enum type values SeongJae Park
2022-02-28 8:13 ` [PATCH v3 03/13] mm/damon: Implement a minimal stub for sysfs-based DAMON interface SeongJae Park
2022-02-28 16:09 ` xhao
2022-02-28 16:23 ` SeongJae Park
2022-02-28 8:13 ` [PATCH v3 04/13] mm/damon/sysfs: Link DAMON for virtual address spaces monitoring SeongJae Park
2022-02-28 8:13 ` [PATCH v3 05/13] mm/damon/sysfs: Support the physical address space monitoring SeongJae Park
2022-02-28 16:11 ` xhao
2022-02-28 16:25 ` SeongJae Park [this message]
2022-02-28 8:13 ` [PATCH v3 06/13] mm/damon/sysfs: Support DAMON-based Operation Schemes SeongJae Park
2022-02-28 8:13 ` [PATCH v3 07/13] mm/damon/sysfs: Support DAMOS quotas SeongJae Park
2022-02-28 8:13 ` [PATCH v3 08/13] mm/damon/sysfs: Support schemes prioritization SeongJae Park
2022-02-28 8:13 ` [PATCH v3 09/13] mm/damon/sysfs: Support DAMOS watermarks SeongJae Park
2022-02-28 8:13 ` [PATCH v3 10/13] mm/damon/sysfs: Support DAMOS stats SeongJae Park
2022-02-28 8:13 ` [PATCH v3 11/13] selftests/damon: Add a test for DAMON sysfs interface SeongJae Park
2022-02-28 8:13 ` [PATCH v3 12/13] Docs/admin-guide/mm/damon/usage: Document " SeongJae Park
2022-02-28 8:13 ` [PATCH v3 13/13] Docs/ABI/testing: Add DAMON sysfs interface ABI document SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220228162514.4111-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-damon@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=skhan@linuxfoundation.org \
--cc=xhao@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.