From: Peter Xu <peterx@redhat.com>
To: David Carlier <devnexen@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/userfaultfd: fix wrong likely() hint on mmap_changing check in move_pages()
Date: Mon, 30 Mar 2026 15:39:06 -0400 [thread overview]
Message-ID: <acrRWoNgZLwLNJza@x1.local> (raw)
In-Reply-To: <20260328170101.184163-2-devnexen@gmail.com>
On Sat, Mar 28, 2026 at 05:01:01PM +0000, David Carlier wrote:
> The mmap_changing check in move_pages() uses likely() but the condition
> being true (concurrent mapping changes during UFFDIO_MOVE) is the
> exceptional case, not the common one. All other mmap_changing checks in
> the same file correctly use no branch hint or use unlikely().
>
> Replace likely() with unlikely() to match the expected branch behavior.
>
> Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
next prev parent reply other threads:[~2026-03-30 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 17:01 [PATCH 1/2] mm/userfaultfd: fix stale ops and VMA type mismatch after copy retry David Carlier
2026-03-28 17:01 ` [PATCH 2/2] mm/userfaultfd: fix wrong likely() hint on mmap_changing check in move_pages() David Carlier
2026-03-30 19:39 ` Peter Xu [this message]
2026-03-31 11:42 ` Mike Rapoport
2026-03-30 19:38 ` [PATCH 1/2] mm/userfaultfd: fix stale ops and VMA type mismatch after copy retry Peter Xu
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=acrRWoNgZLwLNJza@x1.local \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@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 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.