[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211013173834.lrff6wloae4c6uol@oracle.com>
Date: Wed, 13 Oct 2021 13:38:34 -0400
From: Daniel Jordan <daniel.m.jordan@...cle.com>
To: Michal Hocko <mhocko@...e.com>
Cc: David Hildenbrand <david@...hat.com>, ultrachin@....com,
akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, brookxu.cn@...il.com,
chen xiaoguang <xiaoggchen@...cent.com>,
zeng jingxiang <linuszeng@...cent.com>,
lu yihui <yihuilu@...cent.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>
Subject: Re: [PATCH] mm: Free per cpu pages async to shorten program exit time
(I'm just back from vacation)
On Mon, Oct 11, 2021 at 11:28:10AM +0200, Michal Hocko wrote:
> On Fri 08-10-21 10:17:50, David Hildenbrand wrote:
> > On 08.10.21 08:39, ultrachin@....com wrote:
> > > From: chen xiaoguang <xiaoggchen@...cent.com>
> > >
> > > The exit time is long when program allocated big memory and
> > > the most time consuming part is free memory which takes 99.9%
> > > of the total exit time. By using async free we can save 25% of
> > > exit time.
> > >
> > > Signed-off-by: chen xiaoguang <xiaoggchen@...cent.com>
> > > Signed-off-by: zeng jingxiang <linuszeng@...cent.com>
> > > Signed-off-by: lu yihui <yihuilu@...cent.com>
> >
> > I recently discussed with Claudio if it would be possible to tear down the
> > process MM deferred, because for some use cases (secure/encrypted
> > virtualization, very large mmaps) tearing down the page tables is already
> > the much more expensive operation.
> >
> > There is mmdrop_async(), and I wondered if one could reuse that concept when
> > tearing down a process -- I didn't look into feasibility, however, so it's
> > just some very rough idea.
>
> This is not a new problem. Large process tear down can take ages. The
> primary road block has been accounting. This lot of work has to be
> accounted to the proper domain (e.g. cpu cgroup). A deferred and
> properly accounted context implementation is still lacking AFAIK.
Right, still doesn't exist. It's coming though, and there was a session
on it at LPC this year[1].
> I have a vague recollection we have padata framework but I am not sure
> anybody has explored this to be used for the address space shutdown.
> IIRC Daniel Jordan was active in that area.
Yeah, address space teardown is one of the things we want to use padata
for. It's on the list.
[1] https://linuxplumbersconf.org/event/11/contributions/1041/
Powered by blists - more mailing lists