From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
To: David Hildenbrand <david@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
syzbot+3511625422f7aa637f0d@syzkaller.appspotmail.com,
stable@vger.kernel.org, Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH v1] mm/mempolicy: fix migrate_to_node() assuming there is at least one VMA in a MM
Date: Fri, 22 Nov 2024 09:44:12 -0500 [thread overview]
Message-ID: <m4p5ngz7l4hgavwysczmliqrgumlx6dxg35jjwlpcmqtzrpmsk@q2wwxruumhrl> (raw)
In-Reply-To: <608c7f17-037b-401b-9336-c26bd45d3147@redhat.com>
* David Hildenbrand <david@redhat.com> [241122 04:32]:
> On 22.11.24 07:19, Andrew Morton wrote:
> > On Wed, 20 Nov 2024 15:27:46 -0500 "Liam R. Howlett" <Liam.Howlett@oracle.com> wrote:
> >
> > > I hate the extra check because syzbot can cause this as this should
> > > basically never happen in real life, but it seems we have to add it.
> >
> > So..
> >
> > --- a/mm/mempolicy.c~mm-mempolicy-fix-migrate_to_node-assuming-there-is-at-least-one-vma-in-a-mm-fix
> > +++ a/mm/mempolicy.c
> > @@ -1080,7 +1080,7 @@ static long migrate_to_node(struct mm_st
> > mmap_read_lock(mm);
> > vma = find_vma(mm, 0);
> > - if (!vma) {
> > + if (unlikely(!vma)) {
> > mmap_read_unlock(mm);
> > return 0;
> > }
> > _
> >
> > ?
>
> Why not, at least for documentation purposes. Because I don't think this is
> any fast-path we really care about, so expect the runtime effects to be
> mostly negligible. Thanks!
The next email we get about this will be a bot with a micro benchmark
performance drop.
Really though, I'm happy either way because of what David said.
Thanks,
Liam
next prev parent reply other threads:[~2024-11-22 14:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 20:11 David Hildenbrand
2024-11-20 20:27 ` Liam R. Howlett
2024-11-20 20:49 ` David Hildenbrand
2024-11-22 6:19 ` Andrew Morton
2024-11-22 9:32 ` David Hildenbrand
2024-11-22 14:44 ` Liam R. Howlett [this message]
2024-11-22 14:57 ` David Hildenbrand
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=m4p5ngz7l4hgavwysczmliqrgumlx6dxg35jjwlpcmqtzrpmsk@q2wwxruumhrl \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+3511625422f7aa637f0d@syzkaller.appspotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox