Re: [PATCH v2] selftests: filesystems: add missing stddef header

2024-05-04 Thread Amer Al Shanawany
On 4/22/24 15:49, Muhammad Usama Anjum wrote: > On 4/22/24 6:16 PM, Amer Al Shanawany wrote: >> fix compiler warning and errors when compiling statmount test. >> >> gcc 12.3 (Ubuntu 12.3.0-1ubuntu1~22.04) >> >> statmount_test.c:572:24: warning: implicit declaration of function >> ‘offsetof’ [-Wimpl

Re: [PATCH] selftests: filesystems: fix warn_unused_result build warnings

2024-05-04 Thread Amer Al Shanawany
On 4/19/24 18:41, Muhammad Usama Anjum wrote: > On 4/17/24 11:49 PM, Amer Al Shanawany wrote: >> Fix the following warnings by adding return check and error messages. >> >> statmount_test.c: In function ‘cleanup_namespace’: >> statmount_test.c:128:9: warning: ignoring return value of ‘fchdir’ >> de

[PATCH] selftests/capabilities: fix warn_unused_result build warnings

2024-05-04 Thread Amer Al Shanawany
Fix the following warnings by adding return check and error handling. test_execve.c: In function ‘do_tests’: test_execve.c:100:17: warning: ignoring return value of ‘capng_get_caps_process’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 100 | capng_get_caps_proc

Re: [PATCH] kunit: Cover 'assert.c' with tests

2024-05-04 Thread Ivan Orlov
On 5/3/24 12:10, Ivan Orlov wrote: On 5/2/24 00:20, Rae Moar wrote: On Sat, Apr 27, 2024 at 6:04 PM Ivan Orlov wrote: There are multiple assertion formatting functions in the `assert.c` file, which are not covered with tests yet. Implement the KUnit test for these functions. The test consist

[PATCH] selftests: kselftest_deps: fix l5_test() empty variable

2024-05-04 Thread Lu Dai
In the function l5_test(), variable $tests is empty when there is no .mk file in the subsystem to be tested. It causes the following grep operation stuck. This fix check the variable $tests, return when it is empty. Signed-off-by: Lu Dai --- tools/testing/selftests/kselftest_deps.sh | 1 + 1 fi

Re: [PATCH v4 05/10] platform: Add test managed platform_device/driver APIs

2024-05-04 Thread David Gow
On Fri, 3 May 2024 at 09:04, Stephen Boyd wrote: > > Quoting David Gow (2024-05-01 00:55:46) > > On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote: > > > diff --git a/Documentation/dev-tools/kunit/api/platformdevice.rst > > > b/Documentation/dev-tools/kunit/api/platformdevice.rst > > > new file m

Re: [PATCH v4 01/10] of: Add test managed wrappers for of_overlay_apply()/of_node_put()

2024-05-04 Thread David Gow
On Fri, 3 May 2024 at 08:36, Stephen Boyd wrote: > > Quoting David Gow (2024-05-01 00:55:10) > > On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote: > > > diff --git a/Documentation/dev-tools/kunit/api/index.rst > > > b/Documentation/dev-tools/kunit/api/index.rst > > > index 2d8f756aab56..282befa1

Re: [PATCH v2 01/15] KVM: x86/xen: Do not corrupt KVM clock in kvm_xen_shared_info_init()

2024-05-04 Thread Marcelo Tosatti
On Sat, Apr 27, 2024 at 12:04:58PM +0100, David Woodhouse wrote: > From: David Woodhouse > > The KVM clock is an interesting thing. It is defined as "nanoseconds > since the guest was created", but in practice it runs at two *different* > rates — or three different rates, if you count implementat

[PATCH v1 6/7] mm: add kernel aging thread for workingset reporting

2024-05-04 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 v1 7/7] selftest: test system-wide workingset reporting

2024-05-04 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. Question: I don't know how to best test file memory in selftests. Is there a place where I should put the temporary file? /tmp can be tmpfs mounted in many distros. Signed

[PATCH v1 5/7] mm: extend working set reporting to memcgs

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

[PATCH v1 4/7] mm: report workingset during memory pressure driven scanning

2024-05-04 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 v1 2/7] mm: aggregate working set information into histograms

2024-05-04 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 working set per-node, per-anon/file. The sysfs interfaces are as follows: /sys/devices/system/node/nodeX/page_age A per-node page age hi

[PATCH v1 3/7] mm: use refresh interval to rate-limit workingset report aggregation

2024-05-04 Thread Yuanchu Xie
The refresh interval is a rate limiting factor to workingset page age histogram reads. When a workingset report is generated, a timestamp is noted, and the same report will be read until it expires beyond the refresh interval, at which point a new report is generated. Sysfs interface /sys/devices/

[PATCH v1 1/7] mm: multi-gen LRU: ignore non-leaf pmd_young for force_scan=true

2024-05-04 Thread Yuanchu Xie
When non-leaf pmd accessed bits are available, MGLRU page table walks can clear the non-leaf pmd accessed bit and ignore the accessed bit on the pte if it's on a different node, skipping a generation update as well. If another scan occurrs on the same node as said skipped pte. the non-leaf pmd acce

[PATCH v1 0/7] mm: workingset reporting

2024-05-04 Thread Yuanchu Xie
Changes from RFC v3 -> PATCH v1: - Updated selftest to use ksft_print_msg instead of fprintf(stderr, ...) (Muhammad Usama Anjum) - Included more detail in patch skipping pmd_young with force_scan (Huang, Ying) - Deferred reaccess histogram as a followup - Removed per-memcg page age interval con