* [QUESTION] Is MPOL_F_MOF user visible?
@ 2019-03-09 6:22 Yang Shi
2019-03-09 12:49 ` Mel Gorman
0 siblings, 1 reply; 2+ messages in thread
From: Yang Shi @ 2019-03-09 6:22 UTC (permalink / raw)
To: mgorman, Michal Hocko, Vlastimil Babka; +Cc: linux-mm
Hi folks,
When reading the mempolicy code, I got confused by MPOL_F_MOF flag. It
is defined in include/uapi/linux/mempolicy.h, so it looks visible to the
users. But, man page doesn't mention it at all. And, the code in
do_set_mempolicy() -> mpol_new() doesn't set it. It looks it is just set
by two places:
- NUMA default policy (preferred_node_policy)
- When MPOL_MF_LAZY is passed in. But, it is not configurable from
user since it is not valid MF
So, actually it can't be set by user with set_mempolicy()/mbind() APIs,
right? As long as the process' or vmas' policy is changed to non-default
one (i.e. MPOL_BIND), those processes or vmas are *not* eligible for
migrating with NUMA balancing anymore?
Thanks,
Yang
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [QUESTION] Is MPOL_F_MOF user visible?
2019-03-09 6:22 [QUESTION] Is MPOL_F_MOF user visible? Yang Shi
@ 2019-03-09 12:49 ` Mel Gorman
0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2019-03-09 12:49 UTC (permalink / raw)
To: Yang Shi; +Cc: Michal Hocko, Vlastimil Babka, linux-mm
On Fri, Mar 08, 2019 at 10:22:59PM -0800, Yang Shi wrote:
> Hi folks,
>
>
> When reading the mempolicy code, I got confused by MPOL_F_MOF flag. It is
> defined in include/uapi/linux/mempolicy.h, so it looks visible to the users.
> But, man page doesn't mention it at all. And, the code in do_set_mempolicy()
> -> mpol_new() doesn't set it. It looks it is just set by two places:
>
> - NUMA default policy (preferred_node_policy)
>
> - When MPOL_MF_LAZY is passed in. But, it is not configurable from user
> since it is not valid MF
>
It was never exported to userspace because it was not clear how the
policy would be used sensibly outside the context of the default policy.
> So, actually it can't be set by user with set_mempolicy()/mbind() APIs,
> right? As long as the process' or vmas' policy is changed to non-default one
> (i.e. MPOL_BIND), those processes or vmas are *not* eligible for migrating
> with NUMA balancing anymore?
>
Correct because if the policy is MPOL_BIND, it's not defined how lazy
migration should behave.
--
Mel Gorman
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-09 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09 6:22 [QUESTION] Is MPOL_F_MOF user visible? Yang Shi
2019-03-09 12:49 ` Mel Gorman
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.