mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: David Rientjes <rientjes@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Sarthak Sharma <sarthak.sharma@arm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch v5] mm: vmstat_kunit: add synthetic benchmark for mm stats
Date: Tue, 20 Oct 2026 09:59:07 +0200	[thread overview]
Message-ID: <b66b3450-ec8a-4c85-bb19-3731e21c0dff@kernel.org> (raw)
In-Reply-To: <8b077a83-3f79-cbfa-0273-e086b0e51ae4@google.com>

On 10/17/26 00:35, David Rientjes wrote:
> On Fri, 9 Oct 2026, David Rientjes wrote:
> 
>> From: Christoph Lameter <cl@gentwo.org>
>>
>> Add a synthetic benchmark that can be used to measure performance of MM
>> statistics.  This is used to analyze any improvements or regressions in
>> functions that are frequently used in hot code paths.
>>
>> This is the first of three tests that measure the execution times of
>> critical MM functions anticipated to be used by developers to measure the
>> impact of any core changes that would end up causing workload performance
>> issues.  Vmstats are embedded into MM hotpaths, so any regression can
>> cause performance and scalability impact for users.  Google has carried
>> these tests internally and kept them updated since Christoph posted them
>> back in 2009 for this purpose.
>>
>> This can also be used to detect regressions over time, from kernel
>> version to kernel version, independent of development use cases.
>>
>> 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>
>> ---
>> v5:
>>  - added dependency on CONFIG_VM_EVENT_COUNTERS
>>  - expanded commit description
>>
>> Once we're happy with this change, I'll apply the same treatment to the
>> proposed pgalloc and slab tests.
>>
> 
> I've added the rationale for the change to the commit description as 
> primairly being used by developers to benchmark and monitor any 
> regressions in functions that are known to be super hot and impact 
> workload performance.
> 
> This is the simplest of the three tests that Christoph provided back in 
> 2009, the others are pgalloc and slab tests, see 
> https://marc.info/?l=linux-mm&m=178547194364290 and 
> https://marc.info/?l=linux-mm&m=178547193264283 for those.  Based on the 
> feedback to move to kunit, I forked this one off independently because it 
> was the simplest to address all the feedback and pave the way for the 
> other two to be upstreamed afterwards.
> 
> Is this acceptable for merge?  If we're happy with this, I'll move onto 
> the pgalloc and slab variants.

Works for me. The tests are rather small and I see value in them.


-- 
Cheers,

David

      reply	other threads:[~2026-10-20  7:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 22:46 David Rientjes
2026-10-16 22:35 ` David Rientjes
2026-10-20  7:59   ` David Hildenbrand (Arm) [this message]

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=b66b3450-ec8a-4c85-bb19-3731e21c0dff@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rientjes@google.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

all inboxes | Powered by JetHome®