Thread (26 messages) 26 messages, 4 authors, 2023-11-28

Re: [RFC PATCH 00/11] mm/mempolicy: Make task->mempolicy externally modifiable via syscall and procfs

From: Gregory Price <hidden>
Date: 2023-11-28 13:16:00
Also in: linux-arch, linux-doc, linux-fsdevel, linux-mm, lkml

On Tue, Nov 28, 2023 at 10:45:02AM +0100, Michal Hocko wrote:
quoted
2) Should we combine all the existing operations into set_mempolicy2 and
   add an operation arg.

   set_mempolicy2(pidfd, arg_struct, len)

   struct {
     int pidfd; /* optional */
     int operation; /* describe which op_args to use */
     union {
       struct {
       } set_mempolicy;
       struct {
       } set_vma_home_node;
       struct {
       } mbind;
       ...
     } op_args;
   } args;

   capturing:
     sys_set_mempolicy
     sys_set_mempolicy_home_node
     sys_mbind

   or should we just make a separate interface for mbind/home_node to
   limit complexity of the single syscall?
My preference would be to go with specific syscalls. Multiplexing
syscalls have turned much more complex and less flexible over time.
Just have a look at futex.
got it, that simplifies things a bit.  I can pull my set/get mempolicy2
work forward and just keep the interfaces pretty much the same. Only
difference being an argument structure that is extensible and possibly
some additional refactoring in do_get_mempolicy to make things a bit
cleaner.

~Gregory
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help