From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD15C11F68 for ; Fri, 2 Jul 2021 15:27:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D978561427 for ; Fri, 2 Jul 2021 15:27:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D978561427 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4E3C26B0011; Fri, 2 Jul 2021 11:27:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4BA0F6B0036; Fri, 2 Jul 2021 11:27:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 359FF6B005D; Fri, 2 Jul 2021 11:27:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 0EAED6B0011 for ; Fri, 2 Jul 2021 11:27:34 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AE59A180AD802 for ; Fri, 2 Jul 2021 15:27:33 +0000 (UTC) X-FDA: 78318027186.35.5AF2D25 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf12.hostedemail.com (Postfix) with ESMTP id 505AE10000A7 for ; Fri, 2 Jul 2021 15:27:33 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 283F66141D; Fri, 2 Jul 2021 15:27:26 +0000 (UTC) Date: Fri, 2 Jul 2021 17:27:24 +0200 From: Christian Brauner To: Suren Baghdasaryan Cc: Andy Lutomirski , Johannes Weiner , Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Shakeel Butt , Tim Murray , Linux API , Linux-MM , LKML , Android Kernel Team Subject: Re: [PATCH 1/1] mm: introduce process_reap system call Message-ID: <20210702152724.7fv5tnik4qlap6do@wittgenstein> References: <20210623192822.3072029-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Authentication-Results: imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of "SRS0=EvQe=L2=ubuntu.com=christian.brauner@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=EvQe=L2=ubuntu.com=christian.brauner@kernel.org"; dmarc=none X-Stat-Signature: imwdw13k36qm1ixuyeyhjmifpm8oqpnc X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 505AE10000A7 X-HE-Tag: 1625239653-990988 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jul 01, 2021 at 03:59:48PM -0700, Suren Baghdasaryan wrote: > On Wed, Jun 30, 2021 at 5:44 PM Andy Lutomirski wrote: > > > > On Wed, Jun 30, 2021 at 2:45 PM Johannes Weiner wrote: > > > > > > On Wed, Jun 30, 2021 at 11:51:36AM -0700, Suren Baghdasaryan wrote: > > > > On Wed, Jun 30, 2021 at 11:26 AM Andy Lutomirski wrote: > > > > > Also, please consider removing all mention of the word "reap" from the > > > > > user API. For better or for worse, "reap" in UNIX refers to what > > > > > happens when a dead task gets wait()ed. I sincerely wish I could go > > > > > back in time and gently encourage whomever invented that particular > > > > > abomination to change their mind, but my time machine doesn't work. > > > > > > > > I see. Thanks for the note. How about process_mem_release() and > > > > replacing reap with release everywhere? > > > > > > I don't quite understand the objection. This syscall works on tasks > > > that are at the end of their life, right? Isn't something like > > > process_mreap() establishing exactly the mental link we want here? > > > Release is less descriptive for what this thing is to be used for. > > > > For better or for worse, "reap" means to make a zombie pid go away. > > From the description, this new operation takes a dying process (not > > necessarily a zombie yet) and aggressively frees its memory. This is > > a different optioneration. > > > > How about "free_dying_process_memory"? > > process_mreap sounds definitely better and in line with names like > process_madvise. So maybe we can use it? That one was my favorite from the list I gave too but maybe we can satisfy Andy too if we use one of: - process_mfree() - process_mrelease()