From: Peter Xu <peterx@redhat.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Ujwal Kundur <ujwal.kundur@gmail.com>,
David Hildenbrand <david@redhat.com>,
shuah@kernel.org, jackmanb@google.com
Subject: Re: [PATCH] selftests/mm: Reduce uffd-unit-test poison test to minimum
Date: Thu, 26 Jun 2025 14:28:26 -0400 [thread overview]
Message-ID: <aF2RSsjuEOtzXcUa@x1.local> (raw)
In-Reply-To: <CAJHvVchZHQCQnO48Q3OhTPYncZdXSoBc1CK-CHz_XAOO+CL9gA@mail.gmail.com>
On Thu, Jun 26, 2025 at 10:32:20AM -0700, Axel Rasmussen wrote:
> On Fri, Jun 20, 2025 at 8:01 AM Peter Xu <peterx@redhat.com> wrote:
> >
> > The test will still generate quite some unwanted MCE error messages to
> > syslog. There was old proposal ratelimiting the MCE messages from kernel,
> > but that has risk of hiding real useful information on production systems.
> >
> > We can at least reduce the test to minimum to not over-pollute dmesg,
> > however trying to not lose its coverage too much.
> >
> > Cc: Axel Rasmussen <axelrasmussen@google.com>
> > Signed-off-by: Peter Xu <peterx@redhat.com>
>
> Besides a small nitpick you can take:
>
> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>
Thanks, Axel.
>
> Making the functional tests small makes sense to me, especially for
> poisoning. Only reason to use a huge number of pages is if we're
> trying to stress racy bugs or so, but really for that you'd want even
> more pages / more threads / run for a longer time. It makes sense to
> separate that use case out / maybe not run it by default, and leave
> the functional tests small + fast.
IIUC the major complain from others are the pollutions in the dmesg. And
yes, it's also slow and IIUC it's because of the messages piped, at least
when I ran it in VMs with a serial console.
>
> > ---
> > tools/testing/selftests/mm/uffd-unit-tests.c | 20 ++++++++++++++------
> > 1 file changed, 14 insertions(+), 6 deletions(-)
> >
> > diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
> > index c73fd5d455c8..39b3fd1b7bf2 100644
> > --- a/tools/testing/selftests/mm/uffd-unit-tests.c
> > +++ b/tools/testing/selftests/mm/uffd-unit-tests.c
> > @@ -1027,6 +1027,9 @@ static void uffd_poison_handle_fault(
> > do_uffdio_poison(uffd, offset);
> > }
> >
> > +/* Make sure to cover odd/even, and minimum duplications */
> > +#define UFFD_POISON_TEST_NPAGES 4
> > +
> > static void uffd_poison_test(uffd_test_args_t *targs)
> > {
> > pthread_t uffd_mon;
> > @@ -1034,12 +1037,17 @@ static void uffd_poison_test(uffd_test_args_t *targs)
> > struct uffd_args args = { 0 };
> > struct sigaction act = { 0 };
> > unsigned long nr_sigbus = 0;
> > - unsigned long nr;
> > + unsigned long nr, poison_pages = UFFD_POISON_TEST_NPAGES;
> > +
> > + if (nr_pages < poison_pages) {
> > + uffd_test_skip("Too less pages for POISON test");
>
> I think "Too few pages for POISON test" is more grammatically correct.
Right.. This is currently in mm-unstable. Andrew, would you mind take
below as a fixup? TIA!
===8<===
commit 810f5674e1b990775600ffca533dbf75505adbef (HEAD -> test-poison)
Author: Peter Xu <peterx@redhat.com>
Date: Thu Jun 26 14:22:21 2025 -0400
fixup! selftests/mm: reduce uffd-unit-test poison test to minimum
Signed-off-by: Peter Xu <peterx@redhat.com>
---
tools/testing/selftests/mm/uffd-unit-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index 39b3fd1b7bf2..50501b38e34e 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -1040,7 +1040,7 @@ static void uffd_poison_test(uffd_test_args_t *targs)
unsigned long nr, poison_pages = UFFD_POISON_TEST_NPAGES;
if (nr_pages < poison_pages) {
- uffd_test_skip("Too less pages for POISON test");
+ uffd_test_skip("Too few pages for POISON test");
return;
}
--
Peter Xu
prev parent reply other threads:[~2025-06-26 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 15:00 [PATCH] selftests/mm: Reduce uffd-unit-test poison test to minimum Peter Xu
2025-06-26 17:32 ` Axel Rasmussen
2025-06-26 18:28 ` Peter Xu [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=aF2RSsjuEOtzXcUa@x1.local \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=ujwal.kundur@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.