From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"David Hildenbrand (Arm)" <david@kernel.org>
Cc: Christoph Lameter <cl@gentwo.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sarthak Sharma <sarthak.sharma@arm.com>
Subject: Re: [patch v4] mm: vmstat_kunit: add synthetic benchmark for vm stats
Date: Sat, 26 Sep 2026 14:48:02 -0700 (PDT) [thread overview]
Message-ID: <88982723-cf05-52e2-92fb-f14c0dc4dc77@google.com> (raw)
In-Reply-To: <cfc1edae-8aaa-8fd0-95de-af3d4774c6dd@google.com>
On Fri, 18 Sep 2026, David Rientjes wrote:
> From: Christoph Lameter <cl@gentwo.org>
>
> Add a synthetic benchmark that can be used to measure performance of VM
> statistics. This is used to analyze any improvements or regressions in
> functions that are frequently used in hot code paths.
>
> The test is run by KUnit or doing modprobe vmstat_kunit directly.
>
> Sample output:
> KTAP version 1
> 1..1
> KTAP version 1
> # Subtest: vmstat
> # module: vmstat_kunit
> 1..3
> # vmstat_test_inc_dec_zone_page_state: 10000 ops: inc_zone_page_state -> 8 cycles (4 ns/op), dec_zone_page_state -> 9 cycles (4 ns/op)
> ok 1 vmstat_test_inc_dec_zone_page_state
> # vmstat_test_interleaved_zone_page_state: 10000 ops: inc/dec pair -> 17 cycles (8 ns/op)
> ok 2 vmstat_test_interleaved_zone_page_state
> # vmstat_test_count_vm_event: 10000 ops: count_vm_event -> 4 cycles (2 ns/op)
> ok 3 vmstat_test_count_vm_event
> # vmstat: pass:3 fail:0 skip:0 total:3
> # Totals: pass:3 fail:0 skip:0 total:3
> ok 1 vmstat
>
> Assisted-by: Gemini:gemini-3.8-flash
> Signed-off-by: Christoph Lameter <cl@gentwo.org>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
> v4:
> - included sample output in the commit description
> - switched to NR_MLOCK which is display only so no side effects
> - remove unnecessary "rem" variable
>
> Once we're happy with this change, I'll apply the same treatment to the
> proposed pgalloc and slab tests.
>
Andrew, let me know if there is any additional feedback for this one and
I'd be happy to integrate it. I've got the other two test cases converted
over to kunit tests as well per the feedback so will send this out as soon
as we're happy with this one. Thanks!
next prev parent reply other threads:[~2026-09-26 21:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 20:39 [patch v4] mm: vmstat_kunit: add synthetic benchmark for vm stats David Rientjes
2026-09-26 21:48 ` David Rientjes [this message]
2026-09-26 22:38 ` Andrew Morton
2026-09-28 12:19 ` David Hildenbrand (Arm)
2026-10-03 0:50 ` David Rientjes
2026-09-29 4:23 ` Anshuman Khandual
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=88982723-cf05-52e2-92fb-f14c0dc4dc77@google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=sarthak.sharma@arm.com \
--cc=vbabka@kernel.org \
/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