From: Yuanchu Xie <yuanchu@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Michael S . Tsirkin" <mst@redhat.com>,
David Hildenbrand <david@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>, Yu Zhao <yuzhao@google.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Kairui Song <kasong@tencent.com>,
Yosry Ahmed <yosryahmed@google.com>,
Yuanchu Xie <yuanchu@google.com>,
"T . J . Alumbaugh" <talumbau@google.com>
Cc: Wei Xu <weixugc@google.com>, SeongJae Park <sj@kernel.org>,
Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>,
kai.huang@intel.com, hch@lst.de, jon@nutanix.com,
Aneesh Kumar K V <aneesh.kumar@linux.ibm.com>,
Matthew Wilcox <willy@infradead.org>,
Vasily Averin <vasily.averin@linux.dev>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
cgroups@vger.kernel.org
Subject: [RFC PATCH v2 0/6] mm: working set reporting
Date: Wed, 21 Jun 2023 18:04:48 +0000 [thread overview]
Message-ID: <20230621180454.973862-1-yuanchu@google.com> (raw)
RFC v1: https://lore.kernel.org/linux-mm/20230509185419.1088297-1-yuanchu@google.com/
For background and interfaces, see the RFC v1 posting.
Changes from v1 -> v2:
- Refactored the patchs into smaller pieces
- Renamed interfaces and functions from wss to wsr (Working Set Reporting)
- Fixed build errors when CONFIG_WSR is not set
- Changed working_set_num_bins to u8 for virtio-balloon
- Added support for per-NUMA node reporting for virtio-balloon
The RFC adds CONFIG_WSR and requires MGLRU to function. T.J. and I aim to support
the active/inactive LRU and working set estimation from the userspace as well.
This series should be build with the following configs:
CONFIG_LRU_GEN=y
CONFIG_LRU_GEN_ENABLED=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_WSR=y
TODO list:
- There's a hack in mm/vmscan.c that calls into the virtio-balloon driver,
which doesn't work if CONFIG_VIRTIO_BALLOON=m. T.J. Alumbaugh (talumbau@google.com)
and I plan on solving this problem with a working set notification mechanism
that would allow multiple consumers to subscribe for working set changes.
- memory.reaccess.histogram does not consider swapped out pages to be reaccessed.
I plan to implement this with the shadow entry computed from mm/workingset.c.
QEMU device implementation:
https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg06617.html
virtio-dev spec proposal v1 (v2 to be posted by T.J.):
https://lore.kernel.org/virtio-dev/CABmGT5Hv6Jd_F9EoQqVMDo4w5=7wJYmS4wwYDqXK3wov44Tf=w@mail.gmail.com/
LSF/MM discussion slides:
https://lore.kernel.org/linux-mm/CABmGT5HK9xHz=E4q4sECCD8XodP9DUcH0dMeQ8kznUQB5HTQhQ@mail.gmail.com/
T.J. Alumbaugh (1):
virtio-balloon: Add Working Set reporting
Yuanchu Xie (5):
mm: aggregate working set information into histograms
mm: add working set refresh threshold to rate-limit aggregation
mm: report working set when under memory pressure
mm: extend working set reporting to memcgs
mm: add per-memcg reaccess histogram
drivers/base/node.c | 3 +
drivers/virtio/virtio_balloon.c | 288 +++++++++++++++++
include/linux/balloon_compaction.h | 3 +
include/linux/memcontrol.h | 6 +
include/linux/mmzone.h | 5 +
include/linux/wsr.h | 114 +++++++
include/uapi/linux/virtio_balloon.h | 33 ++
mm/Kconfig | 7 +
mm/Makefile | 1 +
mm/internal.h | 12 +
mm/memcontrol.c | 351 ++++++++++++++++++++-
mm/mmzone.c | 3 +
mm/vmscan.c | 194 +++++++++++-
mm/wsr.c | 464 ++++++++++++++++++++++++++++
14 files changed, 1480 insertions(+), 4 deletions(-)
create mode 100644 include/linux/wsr.h
create mode 100644 mm/wsr.c
--
2.41.0.162.gfafddb0af9-goog
next reply other threads:[~2023-06-21 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 18:04 Yuanchu Xie [this message]
2023-06-21 18:04 ` [RFC PATCH v2 1/6] mm: aggregate working set information into histograms Yuanchu Xie
2023-06-21 18:04 ` [RFC PATCH v2 2/6] mm: add working set refresh threshold to rate-limit aggregation Yuanchu Xie
2023-06-21 18:04 ` [RFC PATCH v2 3/6] mm: report working set when under memory pressure Yuanchu Xie
2023-06-21 18:04 ` [RFC PATCH v2 4/6] mm: extend working set reporting to memcgs Yuanchu Xie
2023-06-21 18:04 ` [RFC PATCH v2 5/6] mm: add per-memcg reaccess histogram Yuanchu Xie
2023-06-21 18:04 ` [RFC PATCH v2 6/6] virtio-balloon: Add Working Set reporting Yuanchu Xie
2023-06-21 18:48 ` [RFC PATCH v2 0/6] mm: working set reporting Yu Zhao
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=20230621180454.973862-1-yuanchu@google.com \
--to=yuanchu@google.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=cgroups@vger.kernel.org \
--cc=david@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=jasowang@redhat.com \
--cc=jon@nutanix.com \
--cc=kai.huang@intel.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mst@redhat.com \
--cc=muchun.song@linux.dev \
--cc=quic_sudaraja@quicinc.com \
--cc=rafael@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=sj@kernel.org \
--cc=talumbau@google.com \
--cc=vasily.averin@linux.dev \
--cc=virtualization@lists.linux-foundation.org \
--cc=wangkefeng.wang@huawei.com \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=yosryahmed@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;
as well as URLs for NNTP newsgroup(s).