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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240806133823.5cb3f27ef30c42dad5d0c3e8@linux-foundation.org>
Date: Tue, 6 Aug 2024 13:38:23 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: zhiguojiang <justinjiang@...o.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, Will Deacon
 <will@...nel.org>, "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>, Nick
 Piggin <npiggin@...il.com>, Peter Zijlstra <peterz@...radead.org>, Arnd
 Bergmann <arnd@...db.de>, Johannes Weiner <hannes@...xchg.org>, Michal
 Hocko <mhocko@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
 Shakeel Butt <shakeel.butt@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
 linux-arch@...r.kernel.org, cgroups@...r.kernel.org, Barry Song
 <21cnbao@...il.com>, kernel test robot <lkp@...el.com>,
 opensource.kernel@...o.com
Subject: Re: [PATCH v2 0/3] mm: tlb swap entries batch async release

On Thu, 1 Aug 2024 14:30:52 +0800 zhiguojiang <justinjiang@...o.com> wrote:

> > Dumb question: why can't this be done in userspace?  The exiting
> > process does fork/exit and lets the child do all this asynchronous freeing?
> The logic optimization for kernel releasing swap entries cannot be
> implemented in userspace. The multiple exiting processes here own
> their independent mm, rather than parent and child processes share the
> same mm. Therefore, when the kernel executes multiple exiting process
> simultaneously, they will definitely occupy multiple CPU core resources
> to complete it.

What I'm asking is why not change those userspace processes so that they
fork off a child process which shares the MM (shared mm_struct) and
then the original process exits, leaving the asynchronously-running
child to clean up the MM resources.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ