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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 82CCDC07E9A for ; Mon, 5 Jul 2021 07:42:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1D184613D1 for ; Mon, 5 Jul 2021 07:42:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D184613D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CFAD06B0011; Mon, 5 Jul 2021 03:42:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD1C76B0036; Mon, 5 Jul 2021 03:42:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4C3B6B005D; Mon, 5 Jul 2021 03:42:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0244.hostedemail.com [216.40.44.244]) by kanga.kvack.org (Postfix) with ESMTP id 8D0CA6B0011 for ; Mon, 5 Jul 2021 03:42:02 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 07B0A18416405 for ; Mon, 5 Jul 2021 07:42:02 +0000 (UTC) X-FDA: 78327740484.02.6518952 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf02.hostedemail.com (Postfix) with ESMTP id 9129D7005250 for ; Mon, 5 Jul 2021 07:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625470919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4VoHUzGSOequcyOo3F6H8BsyFbZ2tce0N3gMOC9Uf/8=; b=Go3glGjZhuNiN09Ho07IsHlUOjbcgY2WL/RG0cK8jP3669/svJ/2yz5TC+OBSSYpbqk5lh 1554+dxnGICWPV84C9kC2+rq3gqVSUIz0NP9G1dsgw5XhIJBGa0b2TEwqZp2IiZek77Ged Sr8G/1LAr6jRo0OzBkRhUkJdZZDi13g= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-RKQJsmVLN1-6O224iOmY_Q-1; Mon, 05 Jul 2021 03:41:58 -0400 X-MC-Unique: RKQJsmVLN1-6O224iOmY_Q-1 Received: by mail-wm1-f71.google.com with SMTP id g141-20020a1c9d930000b02901edd380b6a7so2809370wme.1 for ; Mon, 05 Jul 2021 00:41:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=4VoHUzGSOequcyOo3F6H8BsyFbZ2tce0N3gMOC9Uf/8=; b=F+rSPqq2w8nyFGPmOKcKPQlJdcjc7+AsJWM0cDm1juPBHEApE9rfKU0TK4Z9iM7NRx VK5cbH6+S9p73f9on7JA9/8gTB0YM6WzIne3cVFmlA4vzKurg5KOpV5dRhMCVaz2FNcI gaOjsjmxZQawevXndkNLrqPS8YcL91yzRRLIw0v83H7N80aY6dtOA5gTyvxiCUdJTTog uxx0OrXp6E+oRH89TYwcyKqOqu83So1NWK9KrPlVIOyS9PQ+b1yCxR3q55vC/sk8pBWw a1FiBdveADxCQw12ZLaIEGlHv+wA7fYWUtwBv43IzolMBeUP4UqEUIQ5j0mhNUzdqfkw NkHQ== X-Gm-Message-State: AOAM53393tZWWnhYym5vNCMK9oQ0aiu9AKcbLKzzfHjJi/Q+VC0iBJfZ ZTQuovv3HBtt+0M7sCPd2QiKbBAB7w/9IXpiN9b7dE0aYANfO1irCFaIvb/172E2xgpACFNEcp5 ip+hkKMNo1NA= X-Received: by 2002:a05:6000:2c6:: with SMTP id o6mr13958770wry.299.1625470917226; Mon, 05 Jul 2021 00:41:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcx+WC36pR7wWTgO82M+tfm+vTSe542c1Nbeh+g9RtlXwZwnIn83qNzboNxZSL/BOnfACf5w== X-Received: by 2002:a05:6000:2c6:: with SMTP id o6mr13958737wry.299.1625470917079; Mon, 05 Jul 2021 00:41:57 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id m5sm214888wmq.2.2021.07.05.00.41.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 00:41:56 -0700 (PDT) Subject: Re: [PATCH 1/1] mm: introduce process_reap system call To: Christian Brauner , 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 , Jann Horn , Shakeel Butt , Tim Murray , Linux API , Linux-MM , LKML , Android Kernel Team References: <20210623192822.3072029-1-surenb@google.com> <20210702152724.7fv5tnik4qlap6do@wittgenstein> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Mon, 5 Jul 2021 09:41:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210702152724.7fv5tnik4qlap6do@wittgenstein> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9129D7005250 X-Stat-Signature: dbzpmeihu58zxmxy7kpyaa74nyjiuaqd Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Go3glGjZ; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf02.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com X-HE-Tag: 1625470921-310950 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 02.07.21 17:27, Christian Brauner wrote: > 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() > FWIW, I tend to like process_mrelease(), due to the implied "release" ("free the memory if there are no other references") semantics. Further, a new syscall feels cleaner than some magic sysfs/procfs toggle. Just my 2 cents. -- Thanks, David / dhildenb