From: SeongJae Park <sj@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: "SeongJae Park" <sj@kernel.org>,
"Yuanchu Xie" <yuanchu@google.com>,
"David Hildenbrand" <david@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
"Khalid Aziz" <khalid.aziz@oracle.com>,
"Henry Huang" <henry.hj@antgroup.com>,
"Yu Zhao" <yuzhao@google.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Gregory Price" <gregory.price@memverge.com>,
"Huang Ying" <ying.huang@intel.com>,
"Lance Yang" <ioworker0@gmail.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Tejun Heo" <tj@kernel.org>, "Michal Koutný" <mkoutny@suse.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Roman Gushchin" <roman.gushchin@linux.dev>,
"Shakeel Butt" <shakeel.butt@linux.dev>,
"Muchun Song" <muchun.song@linux.dev>,
"Mike Rapoport" <rppt@kernel.org>,
"Shuah Khan" <shuah@kernel.org>,
"Christian Brauner" <brauner@kernel.org>,
"Daniel Watson" <ozzloy@each.do>,
cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, virtualization@lists.linux.dev,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
damon@lists.linux.dev
Subject: Re: [PATCH v4 0/9] mm: workingset reporting
Date: Wed, 27 Nov 2024 11:40:38 -0800 [thread overview]
Message-ID: <20241127194038.84382-1-sj@kernel.org> (raw)
In-Reply-To: <20241127072604.GA2501036@cmpxchg.org>
+ damon@lists.linux.dev
I haven't thoroughly read any version of this patch series due to my laziness,
sorry. So I may saying something completely wrong. My apology in advance, and
please correct me in the case.
> On Tue, Nov 26, 2024 at 06:57:19PM -0800, Yuanchu Xie wrote:
> > This patch series provides workingset reporting of user pages in
> > lruvecs, of which coldness can be tracked by accessed bits and fd
> > references.
DAMON provides data access patterns of user pages. It is not exactly named as
workingset but a superset of the information. Users can therefore get the
workingset from DAMON-provided raw data. So I feel I have to ask if DAMON can
be used for, or help at achieving the purpose of this patch series.
Depending on the detailed definition of workingset, of course, the workingset
we can get from DAMON might not be technically same to what this patch series
aim to provide, and the difference could be somewhat that makes DAMON unable to
be used or help here. But I cannot know if this is the case with only this
cover letter.
> > However, the concept of workingset applies generically to
> > all types of memory, which could be kernel slab caches, discardable
> > userspace caches (databases), or CXL.mem. Therefore, data sources might
> > come from slab shrinkers, device drivers, or the userspace.
> > Another interesting idea might be hugepage workingset, so that we can
> > measure the proportion of hugepages backing cold memory. However, with
> > architectures like arm, there may be too many hugepage sizes leading to
> > a combinatorial explosion when exporting stats to the userspace.
> > Nonetheless, the kernel should provide a set of workingset interfaces
> > that is generic enough to accommodate the various use cases, and extensible
> > to potential future use cases.
This again sounds similar to what DAMON aims to provide, to me. DAMON is
designed to be easy to extend for vairous use cases and internal mechanisms.
Specifically, it separates access check mechanisms and core logic into
different layers, and provides an interface to use for implementing extending
DAMON with new mechanisms. DAMON's two access check mechanisms for virtual
address spaces and the physical address space are made using the interface,
indeed. Also there were RFC patch series extending DAMON for NUMA-specific and
write-only access monitoring using NUMA hinting fault and soft-dirty PTEs as
the internal mechanisms.
My humble understanding of the major difference between DAMON and workingset
reporting is the internal mechanism. Workingset reporting uses MGLRU as the
access check mechanism, while current access check mechanisms for DAMON are
using page table accessed bits checking as the major mechanism. I think DAMON
can be extended to use MGLRU as its another internal access check mechanism,
but I understand that there could be many things that I overseeing.
Yuanchu, I think it would help me and other reviewers better understand this
patch series if you could share that. And I will also be more than happy to
help you and others better understanding what DAMON can do or not with the
discussion.
>
> Doesn't DAMON already provide this information?
>
> CCing SJ.
Thank you for adding me, Johannes :)
[...]
> It does provide more detailed insight into userspace memory behavior,
> which could be helpful when trying to make sense of applications that
> sit on a rich layer of libraries and complicated runtimes. But here a
> comparison to DAMON would be helpful.
100% agree.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2024-11-27 19:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 2:57 Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 1/9] mm: aggregate workingset information into histograms Yuanchu Xie
2024-11-27 4:21 ` Matthew Wilcox
2024-11-27 17:47 ` Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 2/9] mm: use refresh interval to rate-limit workingset report aggregation Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 3/9] mm: report workingset during memory pressure driven scanning Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 4/9] mm: extend workingset reporting to memcgs Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 5/9] mm: add kernel aging thread for workingset reporting Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 6/9] selftest: test system-wide " Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 7/9] Docs/admin-guide/mm/workingset_report: document sysfs and memcg interfaces Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 8/9] Docs/admin-guide/cgroup-v2: document workingset reporting Yuanchu Xie
2024-11-27 2:57 ` [PATCH v4 9/9] virtio-balloon: add " Yuanchu Xie
2024-11-27 23:14 ` Daniel Verkamp
2024-11-27 23:38 ` Yuanchu Xie
2024-11-27 7:26 ` [PATCH v4 0/9] mm: " Johannes Weiner
2024-11-27 19:40 ` SeongJae Park [this message]
2024-11-27 23:33 ` Yu Zhao
2024-12-06 19:57 ` Yuanchu Xie
2024-12-11 19:53 ` SeongJae Park
2025-01-30 2:02 ` Yuanchu Xie
2025-01-30 4:11 ` 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=20241127194038.84382-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=eperezma@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.price@memverge.com \
--cc=hannes@cmpxchg.org \
--cc=henry.hj@antgroup.com \
--cc=ioworker0@gmail.com \
--cc=jasowang@redhat.com \
--cc=khalid.aziz@oracle.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=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=mst@redhat.com \
--cc=muchun.song@linux.dev \
--cc=ozzloy@each.do \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=shuah@kernel.org \
--cc=tj@kernel.org \
--cc=usama.anjum@collabora.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
--cc=ying.huang@intel.com \
--cc=yuanchu@google.com \
--cc=yuzhao@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox