Skip to contentSkip to conversation

Is MPOL_F_MOF user visible?

QUESTION Yang Shi 2 participants 2 messages Mar 9, 2019 Memory management

lore
Share & tools
lore

Yang Shi

author
#0 lore raw

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

#1 lore raw
Quoted 8 lines · Yang Shi

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:

Quoted 5 lines

    - 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.

Quoted 5 lines

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.

Signature · 2 lines
Mel Gorman
SUSE Labs