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 57DD2C11F6A for ; Fri, 2 Jul 2021 15:27:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D2786142D for ; Fri, 2 Jul 2021 15:27:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbhGBPaG (ORCPT ); Fri, 2 Jul 2021 11:30:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:36380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbhGBPaE (ORCPT ); Fri, 2 Jul 2021 11:30:04 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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()