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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 9356DC11F67 for ; Thu, 1 Jul 2021 23:00:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C4FD61410 for ; Thu, 1 Jul 2021 23:00:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C4FD61410 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F05A8D02B7; Thu, 1 Jul 2021 19:00:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 49FF58D0001; Thu, 1 Jul 2021 19:00:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 366EB8D02B7; Thu, 1 Jul 2021 19:00:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 0F86E8D0001 for ; Thu, 1 Jul 2021 19:00:02 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A948D181CBC24 for ; Thu, 1 Jul 2021 23:00:01 +0000 (UTC) X-FDA: 78315538602.06.4631575 Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by imf23.hostedemail.com (Postfix) with ESMTP id 18EB990000AA for ; Thu, 1 Jul 2021 23:00:00 +0000 (UTC) Received: by mail-yb1-f175.google.com with SMTP id o139so13444482ybg.9 for ; Thu, 01 Jul 2021 16:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eKQAwFjuaAaCUshwMfZMCC25WSRc/6MI7bYOaT2lCu0=; b=FoF9JYuQr2PlAVV/PhJWgD36muB9/aW/s+nV24F+xMy0h2zSpj362f8TWPJDLDGa18 QHu25LoAVyZ3n/D4n+D4/Yw3QqVLPAkMkedrYl3t6mUMyP6FffkPvJr/mgzJ6CKPeocY JUfsSwAkeJoevYgGMRK4v1MYvth6O2/Rlwkh/ziIDs7+zoMwbI6ROOaHte8KUCwQQd++ HLbbCDyi2U/PtWgvf/r6u8Ta7WSkJVDfet8kOKMK6qsJ6K+zcoq6p93aP1XjH0MNOOHX Vj4luGFFW0KdDZB586uQS/Wf7MXqo+USQJHhoOL4+OQZgCerlNgrrN3YVIgCcojWU34p YTQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eKQAwFjuaAaCUshwMfZMCC25WSRc/6MI7bYOaT2lCu0=; b=oP83A/c3EW8YutDUS4zUXYIY3JHwYMq4a0FeMlSVyl/E1vq9RC3PrE6oDSzq3yYPVv Pnox/myPV74lBertuSxVMAn70/lYBwlHBpMMqVxo3qZKvRU5abao8fh5m9vpYi728uoV lcEVeb8WPFkJ5YQ7i1NqQ6xvEkY4rFoA4j1srtpMJ42U1XCDQAX8wi5maGjPCSNY+BIO fQEIfswtp0OWKmuOYXy19nCT+zPc0Sy67Cbn9Fpdj92IzdKwNgFDTwnBqgsb875f10Lj LbQre/qhMhoKo34/+wRvjS0u1IcCM+v5DBYzYUdWazIM4XaA2j2FnEwW/aYxj0t9fuBm u0IA== X-Gm-Message-State: AOAM5328NMjzbZiuzXXvRXTWxLzL62ThSDAEXY2kPGPaAbHue3phwmsO rol0LLZPw8IWSIS224Ojampxdn/ZsbSxoooPLpjU5Q== X-Google-Smtp-Source: ABdhPJz1GahShCzpqEDbjJXS/OG05BwiTLL16WKqm1uItCK8AEpt3nGqA1WXxQC4ONTDzI4RGDY9KSIsX7TYVHYAPS8= X-Received: by 2002:a25:83ca:: with SMTP id v10mr2997364ybm.84.1625180400150; Thu, 01 Jul 2021 16:00:00 -0700 (PDT) MIME-Version: 1.0 References: <20210623192822.3072029-1-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 1 Jul 2021 15:59:48 -0700 Message-ID: Subject: Re: [PATCH 1/1] mm: introduce process_reap system call To: Andy Lutomirski Cc: 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 Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=FoF9JYuQ; spf=pass (imf23.hostedemail.com: domain of surenb@google.com designates 209.85.219.175 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 18EB990000AA X-Stat-Signature: yszx5jji9zpntuamdmenbu7zngp6xnna X-HE-Tag: 1625180400-736337 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 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?