Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3593116pxv; Mon, 5 Jul 2021 00:42:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE/hh7/+tFX6wbxHoxkTDERxQwIYXiInqorGOs22D2B3zkW59pbmopQdRALGgrDMEw4UuE X-Received: by 2002:a92:3f08:: with SMTP id m8mr9651977ila.104.1625470960267; Mon, 05 Jul 2021 00:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625470960; cv=none; d=google.com; s=arc-20160816; b=daqJs0wG0gF7Mi0nRMRLx5RPn4lD3nIQDitp1EF+CfKI5EhX4Son/pHzzryeURvCAd AqdeDZ5UQqh/R7XePgNOZTmyTShmaIoltwIJXccPcDC3bkF1I4BNooCs94c6tOh6E5B4 6G96Sv6RYZpAwtUZzpUQ/W+A342fp8mHGZWX/R5sag/yf99T8nAx5aKIZHMwKFAolH5J 8JMvsZqhkvTpQSM+SGk7fafqc79MynCfMhFVGuVXMcKTR/jayNpwwmcDnyJpTyD0v3hn MIQE2BqzEdJafIy9yIRnviJFiqA1x14bmW5PdZaMztcvB5V4xhUR/08b6V7XNr75lKDc 44+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=4VoHUzGSOequcyOo3F6H8BsyFbZ2tce0N3gMOC9Uf/8=; b=uxKe4ttUZsYqMapBTmI4dketnDpPBzNS246v+nnSEXG4PvJI2Qc5CkP4pxjNI4SwqF d8BzZXk2iI5uv/AIj+mfP8xwlfCR79wQNo6LICqzv7oCFjqfJf3oBxzttcgzROrBINVG 7K4eEAV1qeB2u6lGDxa1ogYXTj2mcrfLqWBkPw34P+OJM6RnT/n+QfXKxc6Tmm2aS3GL Fs7dtxK0EXCnpPtWiC7+ktr3qac5gN5p78B6/pfN6qSMBNbCR/iz67II5ZsduJNf6n11 6izfYHYPcs2Uy367h1BmReSxwPt1WgJZoaX4Xy33+ox+uKEwPiPaxO1tEWopo8S8vhKe MOhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Go3glGjZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si12793683ilf.112.2021.07.05.00.42.28; Mon, 05 Jul 2021 00:42: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Go3glGjZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229978AbhGEHoh (ORCPT + 99 others); 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-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