From: Petr Vorel <pvorel@suse.cz>
To: Ricardo Branco <rbranco@suse.de>
Cc: valgrind-developers@lists.sourceforge.net,
Martin Cermak <mcermak@redhat.com>,
ltp@lists.linux.it
Subject: Re: [LTP] [Valgrind-developers] [PATCH] Make userfaultfd0{1, 3, 4} LTP tests valgrind compatible
Date: Wed, 22 Apr 2026 14:17:42 +0200 [thread overview]
Message-ID: <20260422121742.GA419002@pevik> (raw)
In-Reply-To: <319d3965-30f0-49c5-b747-ad16334391e2@suse.de>
> On 4/22/26 7:37 AM, Petr Vorel wrote:
> > > However, some of the testcases can be easily changed to use forked
> > > processes instead of threads. That's what this patch does. When
> > > client program forks, Valgrind forks too, and that allows for the needed
> > > parallelism to handle the page fault.
> > You understand process vs. threads more than me. But shouldn't mmap() use
> > MAP_SHARED instead of MAP_PRIVATE for those which aren't using /dev/userfaultfd?
> The documentation for userfaultfd mentions threads. I'm afraid we'll
> lose vital coverage if we move to forked processes.
+1, at least some tests would keep threads (not all userfaultfd tests would be
converted, but yes, that's why I suggested to use MAP_SHARED, which could be
similar to threads (yes, the difference between processes and threads in Linux
kernel is not that huge as both are created in clone(), it's mostly about what
is shared).
> Perhaps we should cover both?
What do you mean by "both"?
Run test with both processes and threads e.g. via .test_variants?
Because combine MAP_SHARED | MAP_PRIVATE is not possible (mutually exclusive).
> Also checkout UFFD_FEATURE_EVENT_FORK and the BUGS section for this in
> userfaultfd(2).
+1
> I have like 3 patches for userfaultfd that I'm afraid I'd have to rebase
> then.\ Best,
Yeah, that's life of an open source development.
Kind regards,
Petr
> Ricardo
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-22 12:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 15:23 [LTP] [PATCH] Make userfaultfd0{1, 3, 4} LTP tests valgrind compatible Martin Cermak via ltp
2026-04-21 17:06 ` [LTP] " linuxtestproject.agent
2026-04-22 5:37 ` [LTP] [Valgrind-developers] [PATCH] " Petr Vorel
2026-04-22 7:54 ` Ricardo Branco
2026-04-22 12:17 ` Petr Vorel [this message]
2026-04-22 12:42 ` Ricardo Branco
2026-04-22 13:08 ` Martin Cermak via ltp
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=20260422121742.GA419002@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mcermak@redhat.com \
--cc=rbranco@suse.de \
--cc=valgrind-developers@lists.sourceforge.net \
/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