public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Ricardo Branco <rbranco@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] userfaultfd: Add test using UFFDIO_POISON
Date: Wed, 18 Feb 2026 11:49:01 +0100	[thread overview]
Message-ID: <aZWZHec0KoEH42H5@yuki.lan> (raw)
In-Reply-To: <20260206155244.243291-1-rbranco@suse.de>

Hi!
> +static void *handle_thread(void)
> +{
> +	static struct uffd_msg msg;
> +	struct uffdio_poison uffdio_poison = {};
> +	struct pollfd pollfd;
> +	int nready;
> +
> +	SAFE_PTHREAD_BARRIER_WAIT(&barrier);

I still do not understand why we need the barrier here. The thread that
tries to access the memory should block until this thread processes the
event sicne the usefaultfd range was registered before the memory is
accessed. 

Also the same pattern is present in rest of the usefaultfd tests, so
either we need this barrier in all of them, or it shouldn't be needed
here.

And the test seems to work just fine if I remove the barrier code.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-02-18 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 15:52 [LTP] [PATCH v2] userfaultfd: Add test using UFFDIO_POISON Ricardo Branco
2026-02-18 10:49 ` Cyril Hrubis [this message]
2026-02-18 13:51   ` Ricardo Branco

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=aZWZHec0KoEH42H5@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rbranco@suse.de \
    /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