[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201103214532.GC1631979@google.com>
Date: Tue, 3 Nov 2020 13:46:40 -0800
From: Minchan Kim <minchan@...nel.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Michal Hocko <mhocko@...e.com>, linux-api@...r.kernel.org,
linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
Johannes Weiner <hannes@...xchg.org>,
Roman Gushchin <guro@...com>, Rik van Riel <riel@...riel.com>,
Christian Brauner <christian@...uner.io>,
Oleg Nesterov <oleg@...hat.com>,
Tim Murray <timmurray@...gle.com>,
kernel-team <kernel-team@...roid.com>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>
Subject: Re: [RFC]: userspace memory reaping
On Tue, Nov 03, 2020 at 01:40:41PM -0800, Suren Baghdasaryan wrote:
> On Tue, Nov 3, 2020 at 1:32 PM Minchan Kim <minchan@...nel.org> wrote:
> >
> > On Tue, Nov 03, 2020 at 10:35:50AM +0100, Michal Hocko wrote:
> > > On Mon 02-11-20 12:29:24, Suren Baghdasaryan wrote:
> > > [...]
> > > > To follow up on this. Should I post an RFC implementing SIGKILL_SYNC
> > > > which in addition to sending a kill signal would also reap the
> > > > victim's mm in the context of the caller? Maybe having some code will
> > > > get the discussion moving forward?
> > >
> > > Yeah, having a code, even preliminary, might help here. This definitely
> > > needs a good to go from process management people as that proper is land
> > > full of surprises...
> >
> > Just to remind a idea I suggested to reuse existing concept
> >
> > fd = pidfd_open(victim process)
> > fdatasync(fd);
> > close(fd);
> >
>
> Yep, I just posted a comment about that. I think though your above
> sequence is missing a pidfd_send_signal(fd, SIGKILL) before the
> fdatasync(fd)...
> Not sure if fdatasync(pidfd) or fsync(pidfd) would be more appropriate
> for this but will use one and we can discuss details in the RFC with
> the code.
IMO, fdatasync would be better symantic since fsync invovles metadata
(i.e., task_struct, mm_struct and so on). I think what you need is
just pages attached to address_space, which sounds like data, not
metadata.
Powered by blists - more mailing lists