lkml.org 
[lkml]   [2023]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 00/11] mm/mempolicy: Make task->mempolicy externally modifiable via syscall and procfs
On Tue, Nov 28, 2023 at 10:45:02AM +0100, Michal Hocko wrote:
> > 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

\
 
 \ /
  Last update: 2023-11-28 14:16    [W:0.086 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site