lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] RFC: add pidfd_send_signal flag to reclaim mm while killing a process
On Fri, 13 Nov 2020 17:09:37 -0800 Suren Baghdasaryan <surenb@google.com> wrote:

> > > > Seems to me that the ability to reap another process's memory is a
> > > > generally useful one, and that it should not be tied to delivering a
> > > > signal in this fashion.
> > > >
> > > > And we do have the new process_madvise(MADV_PAGEOUT). It may need a
> > > > few changes and tweaks, but can't that be used to solve this problem?
> > >
> > > Thank you for the feedback, Andrew. process_madvise(MADV_DONTNEED) was
> > > one of the options recently discussed in
> > > https://lore.kernel.org/linux-api/CAJuCfpGz1kPM3G1gZH+09Z7aoWKg05QSAMMisJ7H5MdmRrRhNQ@mail.gmail.com
> > > . The thread describes some of the issues with that approach but if we
> > > limit it to processes with pending SIGKILL only then I think that
> > > would be doable.
> >
> > Why would it be necessary to read /proc/pid/maps? I'd have thought
> > that a starting effort would be
> >
> > madvise((void *)0, (void *)-1, MADV_PAGEOUT)
> >
> > (after translation into process_madvise() speak). Which is equivalent
> > to the proposed process_madvise(MADV_DONTNEED_MM)?
>
> Yep, this is very similar to option #3 in
> https://lore.kernel.org/linux-api/CAJuCfpGz1kPM3G1gZH+09Z7aoWKg05QSAMMisJ7H5MdmRrRhNQ@mail.gmail.com
> and I actually have a tested prototype for that.

Why is the `vector=NULL' needed? Can't `vector' point at a single iovec
which spans the whole address range?

> If that's the
> preferred method then I can post it quite quickly.

I assume you've tested that prototype. How did its usefulness compare
with this SIGKILL-based approach?

\
 
 \ /
  Last update: 2020-11-14 02:19    [W:0.061 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site