Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1642272pxv; Fri, 2 Jul 2021 08:39:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOSxPV4D3zaIexzghRi6wm6F0SxlZVIeJfPEr8c+Jrw+6AIvR3k6TQfVsIAstJGd69fg5Q X-Received: by 2002:a6b:7905:: with SMTP id i5mr456198iop.175.1625240380029; Fri, 02 Jul 2021 08:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625240380; cv=none; d=google.com; s=arc-20160816; b=YmTh5XMxigxgYUvYOeOijAIcaSmVF43XxarjeplNot8ijjHLxn5a34yveqH2cLvkAy sCLHH26hbg1JuTzE1GngMnhOim50DFg82ls1ba1BtbvuW0BYc6b9WHiEL8dpHWh88PNw Jl+lSRijgJ3ASlieMv378PFXz9NqeRlTXEOIKLGS6EzDzlE67padKoTEDlzZ/ApyaLyY wtzzLhWtA9ZAWhukvp3WWl2FJS2OvsShBU6H1AnL6wu9xZQOYGr2et3Trr7YdQzoPMiK FguT1kgWhZdMRhriHq0dQ3Xuv3/SVj0DtZvKzwNogvOIw307IeA8oXgNe/xBANQk+Epf psfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=D42fQAbrnT5HZKQOOW9rA6U6vyNxkeUtTHdYl4bQ9U8=; b=WG8KFgXSSbLOUJNUERIZD0YMrsZAR0JJBpJHHIew1DFKuyvEfl2wVwLzMBsbXpo9Ml x07Sc3aI5ocN+L2v5oAVPGgKoL7f8/oh5uKDxqZyEPHgEkt+og7J7CMJg0x1RU6jcpAH oxBCCKdatJ/u5Fel3AfoiSYP5K9or225bdkiH7ZJHhCh2Otu2U1AHSJDFieQFd24daLd CzXd97RltN0et/90Mb48egZH/NpwRnW2Mal0UUTt81sDfpqjwuYekviPBGYqZw0uEN7e m1mBepNnMza+qVAD6Dg0zIGA+HsNAWqxy3Je1MRuVlS0qc24PZXdhAYuRBi26vTjL+ey k/+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si3338531iom.105.2021.07.02.08.39.27; Fri, 02 Jul 2021 08:39:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231757AbhGBPaE (ORCPT + 99 others); Fri, 2 Jul 2021 11:30:04 -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()