Re: [PATCH v5 10/11] mm/mempolicy: add the mbind2 syscall

From: Geert Uytterhoeven
Date: Tue Jan 02 2024 - 09:47:35 EST


On Sat, Dec 23, 2023 at 7:14 PM Gregory Price <gourry.memverge@xxxxxxxxx> wrote:
> mbind2 is an extensible mbind interface which allows a user to
> set the mempolicy for one or more address ranges.
>
> Defined as:
>
> mbind2(unsigned long addr, unsigned long len, struct mpol_args *args,
> size_t size, unsigned long flags)
>
> addr: address of the memory range to operate on
> len: length of the memory range
> flags: MPOL_MF_HOME_NODE + original mbind() flags
>
> Input values include the following fields of mpol_args:
>
> 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: if (flags & MPOL_MF_HOME_NODE), set home node of policy
> to this otherwise it is ignored.
> pol_maxnodes: The max number of nodes described by pol_nodes
> pol_nodes: the nodemask to apply for the memory policy
>
> The semantics are otherwise the same as mbind(), except that
> the home_node can be set.
>
> Suggested-by: Michal Hocko <mhocko@xxxxxxxx>
> Suggested-by: Frank van der Linden <fvdl@xxxxxxxxxx>
> Suggested-by: Vinicius Tavares Petrucci <vtavarespetr@xxxxxxxxxx>
> Suggested-by: Rakie Kim <rakie.kim@xxxxxx>
> Suggested-by: Hyeongtak Ji <hyeongtak.ji@xxxxxx>
> Suggested-by: Honggyu Kim <honggyu.kim@xxxxxx>
> Signed-off-by: Gregory Price <gregory.price@xxxxxxxxxxxx>
> Co-developed-by: Vinicius Tavares Petrucci <vtavarespetr@xxxxxxxxxx>

> 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