Re: [PATCH v5 08/11] mm/mempolicy: add set_mempolicy2 syscall

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

 



On Sat, Dec 23, 2023 at 7:13 PM Gregory Price <gourry.memverge@xxxxxxxxx> wrote:
> set_mempolicy2 is an extensible set_mempolicy interface which allows
> a user to set the per-task memory policy.
>
> Defined as:
>
> set_mempolicy2(struct mpol_args *args, size_t size, unsigned long flags);
>
> relevant mpol_args fields include the following:
>
> mode:         The MPOL_* policy (DEFAULT, INTERLEAVE, etc.)
> mode_flags:   The MPOL_F_* flags that were previously passed in or'd
>               into the mode.  This was split to hopefully allow future
>               extensions additional mode/flag space.
> home_node:    ignored (see note below)
> pol_nodes:    the nodemask to apply for the memory policy
> pol_maxnodes: The max number of nodes described by pol_nodes
>
> The usize arg is intended for the user to pass in sizeof(mpol_args)
> to allow forward/backward compatibility whenever possible.
>
> The flags argument is intended to future proof the syscall against
> future extensions which may require interpreting the arguments in
> the structure differently.
>
> Semantics of `set_mempolicy` are otherwise the same as `set_mempolicy`
> as of this patch.
>
> As of this patch, setting the home node of a task-policy is not
> supported, as this functionality was not supported by set_mempolicy.
> Additional research should be done to determine whether adding this
> functionality is safe, but doing so would only require setting
> MPOL_MF_HOME_NODE and providing a valid home node value.
>
> 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