Re: [RFC] mm: add new syscall pidfd_set_mempolicy()

From: Michal Hocko
Date: Wed Oct 12 2022 - 09:23:44 EST


On Wed 12-10-22 15:07:48, Michal Hocko wrote:
> On Wed 12-10-22 07:34:06, Vinicius Petrucci wrote:
[...]
> > Having a feature like "pidfd/process_mbind" would really simplify our
> > user-level agent implementation moving forward, as right now we are
> > adding a LD_PRELOAD wrapper (for signal handler) to listen and execute
> > "mbind" requests from another process. If there's any other
> > alternative solution to this already (via ptrace?), please let me
> > know.
>
> userfaultfd sounds like the closest match if #PF handling under control
> of an external agent is viable.

And just to clarify. I haven't ever played with using userfaultfd for
numa balancing so I might be completely wrong here.
--
Michal Hocko
SUSE Labs