Re: [PATCH v6 07/15] digest_cache: Allow registration of digest list parsers

2024-11-26 Thread Luis Chamberlain
On Tue, Nov 26, 2024 at 11:25:07AM +0100, Roberto Sassu wrote: > On Mon, 2024-11-25 at 15:53 -0800, Luis Chamberlain wrote: > > Firmware, eBPF programs and so on are supposed Keyword: "supposed". > As far as the LSM infrastructure is concerned, I'm not adding new LSM > hooks, nor extending/modi

Re: [PATCH] docs: media: document media multi-committers rules and process

2024-11-26 Thread Laurent Pinchart
Hi Mauro and Hans, On Mon, Nov 25, 2024 at 02:28:58PM +0100, Mauro Carvalho Chehab wrote: > As the media subsystem will experiment with a multi-committers model, > update the Maintainer's entry profile to the new rules, and add a file > documenting the process to become a committer and to maintain

Re: [PATCH v4 0/9] mm: workingset reporting

2024-11-26 Thread Johannes Weiner
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. However, the concept of workingset applies generically to > all types of memory, which co

Re: [PATCH v4 1/9] mm: aggregate workingset information into histograms

2024-11-26 Thread Matthew Wilcox
On Tue, Nov 26, 2024 at 06:57:20PM -0800, Yuanchu Xie wrote: > diff --git a/mm/internal.h b/mm/internal.h > index 64c2eb0b160e..bbd3c1501bac 100644 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -470,9 +470,14 @@ extern unsigned long highest_memmap_pfn; > /* > * in mm/vmscan.c: > */ > +struc

[PATCH v4 1/9] mm: aggregate workingset information into histograms

2024-11-26 Thread Yuanchu Xie
Hierarchically aggregate all memcgs' MGLRU generations and their page counts into working set page age histograms. The histograms break down the system's workingset per-node, per-anon/file. The sysfs interfaces are as follows: /sys/devices/system/node/nodeX/workingset_report/page_age A per

[PATCH v4 2/9] mm: use refresh interval to rate-limit workingset report aggregation

2024-11-26 Thread Yuanchu Xie
The refresh interval is a rate limiting factor to workingset page age histogram reads. When a workingset report is generated, the oldest timestamp of all the lruvecs is stored as the timestamp of the report. The same report will be read until the report expires beyond the refresh interval, at which

[PATCH v4 3/9] mm: report workingset during memory pressure driven scanning

2024-11-26 Thread Yuanchu Xie
When a node reaches its low watermarks and wakes up kswapd, notify all userspace programs waiting on the workingset page age histogram of the memory pressure, so a userspace agent can read the workingset report in time and make policy decisions, such as logging, oom-killing, or migration. Sysfs in

[PATCH v4 6/9] selftest: test system-wide workingset reporting

2024-11-26 Thread Yuanchu Xie
A basic test that verifies the working set size of a simple memory accessor. It should work with or without the aging thread. When running tests with run_vmtests.sh, file workingset report testing requires an environment variable WORKINGSET_REPORT_TEST_FILE_PATH to store a temporary file, which is

[PATCH v4 4/9] mm: extend workingset reporting to memcgs

2024-11-26 Thread Yuanchu Xie
Break down the system-wide workingset report into per-memcg reports, which aggregages its children hierarchically. The per-node workingset reporting histograms and refresh/report threshold files are presented as memcg files, showing a report containing all the nodes. The per-node page age interva

[PATCH v4 5/9] mm: add kernel aging thread for workingset reporting

2024-11-26 Thread Yuanchu Xie
For reliable and timely aging on memcgs, one has to read the page age histograms on time. A kernel thread makes it easier by aging memcgs with valid refresh_interval when they can be refreshed, and also reduces the latency of any userspace consumers of the page age histogram. The kerne aging threa

[PATCH v4 9/9] virtio-balloon: add workingset reporting

2024-11-26 Thread Yuanchu Xie
Ballooning is a way to dynamically size a VM, and it requires guest collaboration. The amount to balloon without adversely affecting guest performance is hard to compute without clear metrics from the guest. Workingset reporting can provide guidance to the host to allow better collaborative balloo

[PATCH v4 7/9] Docs/admin-guide/mm/workingset_report: document sysfs and memcg interfaces

2024-11-26 Thread Yuanchu Xie
Add workingset reporting documentation for better discoverability of its sysfs and memcg interfaces. Also document the required kernel config to enable workingset reporting. Signed-off-by: Yuanchu Xie --- Documentation/admin-guide/mm/index.rst| 1 + .../admin-guide/mm/workingset_report

[PATCH v4 8/9] Docs/admin-guide/cgroup-v2: document workingset reporting

2024-11-26 Thread Yuanchu Xie
Add workingset reporting documentation for better discoverability of its memcg interfaces. Point the memcg documentation to Documentation/admin-guide/mm/workingset_report.rst for more details. Signed-off-by: Yuanchu Xie --- Documentation/admin-guide/cgroup-v2.rst | 35 +

[PATCH v4 0/9] mm: workingset reporting

2024-11-26 Thread Yuanchu Xie
This patch series provides workingset reporting of user pages in lruvecs, of which coldness can be tracked by accessed bits and fd references. However, the concept of workingset applies generically to all types of memory, which could be kernel slab caches, discardable userspace caches (databases),

Re: [PATCH v6 00/15] integrity: Introduce the Integrity Digest Cache

2024-11-26 Thread Roberto Sassu
On Tue, 2024-11-26 at 00:13 +, Eric Snowberg wrote: > > > On Nov 19, 2024, at 3:49 AM, Roberto Sassu > > wrote: > > > > From: Roberto Sassu > > > > The Integrity Digest Cache can also help IMA for appraisal. IMA can simply > > lookup the calculated digest of an accessed file in the list o

Re: [PATCH v6 07/15] digest_cache: Allow registration of digest list parsers

2024-11-26 Thread Roberto Sassu
On Mon, 2024-11-25 at 15:53 -0800, Luis Chamberlain wrote: > On Tue, Nov 19, 2024 at 11:49:14AM +0100, Roberto Sassu wrote: > > From: Roberto Sassu > > Introduce load_parser() to load a kernel module containing a > > parser for the requested digest list format (compressed kernel modules are > > su