Re: [PATCH v1 1/4] mm/mempolicy: skip nodemask intersect check for 'interleave' when oom

From: Michal Hocko
Date: Thu May 27 2021 - 09:15:11 EST

On Thu 27-05-21 21:05:01, Feng Tang wrote:
> On Thu, May 27, 2021 at 09:30:00AM +0200, Michal Hocko wrote:
> > Until now this was not a real problem even for OOM context because
> > alloc_page_interleave is always used for the interleaving policy
> > and that one doesn't use any node mask so the code is not really
> > exercised. With your MPOL_PREFERRED this would no longer be the case.
> Given the 'interleave' task may have memory allocated from all nodes,
> shouldn't the mempolicy_nodemask_intersects() return true for 'interleave'?
> or I'm still missing something?

Well, if you go with the renaming then it should be quite obvious that
any policies which are not a hard binding should return true.

Michal Hocko