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 3ACCEC07E99 for ; Mon, 5 Jul 2021 07:42:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A45B6115A for ; Mon, 5 Jul 2021 07:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbhGEHoh (ORCPT ); Mon, 5 Jul 2021 03:44:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36264 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbhGEHog (ORCPT ); Mon, 5 Jul 2021 03:44:36 -0400 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-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-IfR5u9JNNSSc5JBqHxTWTw-1; Mon, 05 Jul 2021 03:41:58 -0400 X-MC-Unique: IfR5u9JNNSSc5JBqHxTWTw-1 Received: by mail-wm1-f72.google.com with SMTP id n37-20020a05600c3ba5b02901fe49ba3bd0so2961987wms.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=umo3dvzzWR1D4uUmw0TpDKceRuA7/wCsOq8ZozjQb4mWdVIjsy5xG5QotU/b2LNW61 kosJRjMYBnTsEebrzeGg0qORdzRviCKt5qPhE+0FOAqR0pUNtIQQdwxQnZzyDUajVvUS JZY4XhVIM8mDVSSw643St/F63MsaR6yv/ZASczTwnEAlU1Rb72IYf4a/T6iVYydrQNyT cnwAW+KALWEHd5qnDh0ittC+oB9qKiSB1tcEvw5vNBHH1BIDOu3ScCKqyWWZzruqLrB1 FB5atgPCYeo0/+OeA7YKnbWRd2eolQ4kxbBEmRG2P2Z3lKEFXTHloZu2yiRHevFL2tiy THQA== X-Gm-Message-State: AOAM531C7Ke2vE3HJJrUGrpni3365TKFsklvDlpeDCmCFJymU6G41Zdh D0Z1k4qO6moj5+n2Ad16sFaqFuqDCmgqJnsir0JumeidfRVTq5AvuyTQQtrBKOlDOZ+7YGLW3Aw ei3uFhknUkwlwn6IYh9bD8+fv X-Received: by 2002:a05:6000:2c6:: with SMTP id o6mr13958751wry.299.1625470917224; 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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