[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVur0O-Df1jN8SC0wbfPv7o7yZNt2UsupAw2NJjz-bWSw@mail.gmail.com>
Date: Tue, 2 Jan 2024 15:38:17 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Gregory Price <gourry.memverge@...il.com>
Cc: linux-mm@...ck.org, linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org, x86@...nel.org, akpm@...ux-foundation.org,
arnd@...db.de, tglx@...utronix.de, luto@...nel.org, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com, mhocko@...nel.org,
tj@...nel.org, ying.huang@...el.com, gregory.price@...verge.com,
corbet@....net, rakie.kim@...com, hyeongtak.ji@...com, honggyu.kim@...com,
vtavarespetr@...ron.com, peterz@...radead.org, jgroves@...ron.com,
ravis.opensrc@...ron.com, sthanneeru@...ron.com, emirakhur@...ron.com,
Hasan.Maruf@....com, seungjun.ha@...sung.com, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v5 08/11] mm/mempolicy: add set_mempolicy2 syscall
On Sat, Dec 23, 2023 at 7:13 PM Gregory Price <gourry.memverge@...il.com> 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@...e.com>
> Signed-off-by: Gregory Price <gregory.price@...verge.com>
> arch/m68k/kernel/syscalls/syscall.tbl | 1 +
Acked-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
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
Powered by blists - more mailing lists