linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	wang lian <lianux.mm@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, SeongJae Park <sj@kernel.org>,
	zijing.zhang@proton.me, ryncsn@gmail.com, p1ucky0923@gmail.com,
	gkwang@linx-info.com, "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>
Subject: Re: [PATCH] selftests/mm: add test for (BATCH_PROCESS)MADV_DONTNEED
Date: Mon, 23 Jun 2025 15:49:05 +0200	[thread overview]
Message-ID: <e80fa23e-f659-4eef-89ba-8c9f5578b78e@redhat.com> (raw)
In-Reply-To: <8fb737cc-ba83-4949-b4fb-2a2e1af0967a@lucifer.local>

On 23.06.25 14:35, Lorenzo Stoakes wrote:
> +cc Liam, David, Vlastimil, Jann
> 
> (it might not be obvious from get_maintainers.pl but please cc
> maintainers/reviewers of the thing you are adding a test for, thanks!)
> 
> Overall I'm not in favour of us taking this patch.
> 
> There are a number of issues with it (explained inline below), but those aside,
> it seems to be:
> 
> - Checking whether a simple anon buffer of arbitrary size is zapped by
>    MADV_DONTNEED.
> 
> - Printing out a dubious microbenchmark that seems to be mostly asserting that
>    fewer sycalls are faster when using process_madvise() locally.
> 
> And I'm struggling to see the value of that.

We have other tests that should already severely break if MADV_DONTNEED 
doesn't work ... but sure, we could think about more elaborate 
functional tests when they provide a clear benefit. (zapping all kinds 
of memory types, anon/ksm/huge zeropage/pagecache/hugetlb/ ... and using 
/proc/self/pagemap to see if the page table mappings are already gone)

I don't think we have a lot of process_madvise selftests, right?

hugtlb handling that was added recently is already tested to some degree 
in hugetlb-madvise.c.

In general, I'm not a fan of selftests that measure syscall performance ...


-- 
Cheers,

David / dhildenb



  reply	other threads:[~2025-06-23 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 13:30 wang lian
2025-06-23 12:35 ` Lorenzo Stoakes
2025-06-23 13:49   ` David Hildenbrand [this message]
2025-06-23 13:56     ` Lorenzo Stoakes
2025-06-23 14:36 wang lian
2025-06-23 14:39 ` Lorenzo Stoakes

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=e80fa23e-f659-4eef-89ba-8c9f5578b78e@redhat.com \
    --to=david@redhat.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=gkwang@linx-info.com \
    --cc=jannh@google.com \
    --cc=lianux.mm@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=p1ucky0923@gmail.com \
    --cc=ryncsn@gmail.com \
    --cc=shuah@kernel.org \
    --cc=sj@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=zijing.zhang@proton.me \
    /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