lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 10 Oct 2021 15:42:01 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     David Hildenbrand <david@...hat.com>, ultrachin@....com,
        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

On Fri, 8 Oct 2021 14:38:15 +0200 Vlastimil Babka <vbabka@...e.cz> wrote:

> On 10/8/21 10:17, 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.
> 
> OK, but what exactly is the benefit here? The cpu time will have to be spent
> in any case, but we move it to a context that's not accounted to the exiting
> process. Is that good? Also if it's a large process and restarts
> immediately, allocating all the memory back again, it might not be available
> as it's still being freed in the background, leading to a risk of OOM?

Yes, concerns.  Some way of blocking the oom-killer if this freeing is
in progress sounds needed.

Dumb question: can the exiting process just clone(CLONE_MM) then exit? 
Let the child take the burden of all the cleanup?

Powered by blists - more mailing lists