linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liam Howlett <liam.howlett@oracle.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge()
Date: Sat, 5 Mar 2022 02:00:39 +0000	[thread overview]
Message-ID: <20220305020021.qmwg5dkham4lyz6v@revolver> (raw)
In-Reply-To: <6038ebc2-bc88-497d-a3f3-5936726fb023@google.com>

* Hugh Dickins <hughd@google.com> [220304 17:48]:
> On Fri, 4 Mar 2022, Liam Howlett wrote:
> > * Liam R. Howlett <Liam.Howlett@Oracle.com> [220304 13:49]:
> > > * Hugh Dickins <hughd@google.com> [220303 23:36]:
> > 
> > I just thought of something after my initial email
> > 
> > How does the ->set_policy() requirement on tmpfs play out for the
> > mpol_equal() check earlier in that for loop?
> 
> It took me a while to page all this back in (and remind myself of
> what is case 8) to answer that question!
> 
> The answer is that the mpol_equal() check at the top of the loop is on
> an existing, unmodified vma; so it's right to assume that any necessary
> set_policy() has already been done.
> 
> Whereas the mpol_equal() check being removed in this patch, is being
> done on a vma which may have just been extended to cover a greater range:
> so although the relevant set_policy() may have already been done on a part
> of its range, there is now another part which needs the policy applied.

Doesn't the policy get checked during vma_merge()?  Specifically the
mpol_equal(policy, vma_policy(next)) check?

> 
> > > Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> 
> Thank you, your review is very welcome (but mainly I Cc'ed to alert
> you to how I'm probably stepping on your toes a little here - sorry).

Yes, I figured as much and I really appreciate it.  I'm quite confident
I translated this bug to my patch set.

Thanks,
Liam

  reply	other threads:[~2022-03-05  2:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04  4:36 [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge() Hugh Dickins
2022-03-04 18:06 ` Oleg Nesterov
2022-03-04 22:33   ` Hugh Dickins
2022-03-04 18:49 ` Liam Howlett
2022-03-04 19:05   ` Liam Howlett
2022-03-04 22:48     ` Hugh Dickins
2022-03-05  2:00       ` Liam Howlett [this message]
2022-03-05  2:28         ` Hugh Dickins
2022-03-08 16:05           ` Liam Howlett
2022-03-08 21:32             ` Hugh Dickins
2022-03-09 12:41               ` Vlastimil Babka
2022-03-09 19:10                 ` Liam Howlett
2022-03-11  9:33                   ` Hugh Dickins
2022-03-11  8:54                 ` Hugh Dickins
2022-03-11 12:47                   ` Vlastimil Babka

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=20220305020021.qmwg5dkham4lyz6v@revolver \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.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;
as well as URLs for NNTP newsgroup(s).