Re: [PATCH v5 09/11] mm/mempolicy: add get_mempolicy2 syscall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 23, 2023 at 7:14 PM Gregory Price <gourry.memverge@xxxxxxxxx> wrote:
> get_mempolicy2 is an extensible get_mempolicy interface which allows
> a user to retrieve the memory policy for a task or address.
>
> Defined as:
>
> get_mempolicy2(struct mpol_args *args, size_t size,
>                unsigned long addr, unsigned long flags)
>
> Top level input values:
>
> mpol_args:    The field which collects information about the mempolicy
>               returned to userspace.
> addr:         if MPOL_F_ADDR is passed in `flags`, this address will be
>               used to return the mempolicy details of the vma the
>               address belongs to
> flags:        if MPOL_F_ADDR, return mempolicy info vma containing addr
>               else, returns task mempolicy information
>
> Input values include the following fields of mpol_args:
>
> pol_nodes:    if set, the nodemask of the policy returned here
> pol_maxnodes: if pol_nodes is set, must describe max number of nodes
>               to be copied to pol_nodes
>
> Output values include the following fields of mpol_args:
>
> mode:         mempolicy mode
> mode_flags:   mempolicy mode flags
> home_node:    policy home node will be returned here, or -1 if not.
> pol_nodes:    if set, the nodemask for the mempolicy
> policy_node:  if the policy has extended node information, it will
>               be placed here.  For example MPOL_INTERLEAVE will
>               return the next node which will be used for allocation
>
> MPOL_F_NODE has been dropped from get_mempolicy2 (EINVAL).
> MPOL_F_MEMS_ALLOWED has been dropped from get_mempolicy2 (EINVAL).
>
> Suggested-by: Michal Hocko <mhocko@xxxxxxxx>
> Signed-off-by: Gregory Price <gregory.price@xxxxxxxxxxxx>

>  arch/m68k/kernel/syscalls/syscall.tbl         |  1 +

Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux