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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4024FC07E9B for ; Fri, 9 Jul 2021 08:59:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 237DE613CC for ; Fri, 9 Jul 2021 08:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbhGIJBs (ORCPT ); Fri, 9 Jul 2021 05:01:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:52578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhGIJBr (ORCPT ); Fri, 9 Jul 2021 05:01:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D61A761375; Fri, 9 Jul 2021 08:58:59 +0000 (UTC) Date: Fri, 9 Jul 2021 10:58:57 +0200 From: Christian Brauner To: Suren Baghdasaryan Cc: Michal Hocko , David Hildenbrand , Andy Lutomirski , Johannes Weiner , Andrew Morton , 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 Subject: Re: [PATCH 1/1] mm: introduce process_reap system call Message-ID: <20210709085857.zf5ik3btet3yw4ab@wittgenstein> References: <20210623192822.3072029-1-surenb@google.com> <20210702152724.7fv5tnik4qlap6do@wittgenstein> 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 Wed, Jul 07, 2021 at 02:14:23PM -0700, Suren Baghdasaryan wrote: > On Wed, Jul 7, 2021 at 5:38 AM Michal Hocko wrote: > > > > On Mon 05-07-21 09:41:54, David Hildenbrand wrote: > > > On 02.07.21 17:27, Christian Brauner wrote: > > [...] > > > > 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. > > > > Agreed. > > Ok, sounds like process_mrelease() would be an acceptable compromise. > > > > > > Further, a new > > > syscall feels cleaner than some magic sysfs/procfs toggle. Just my 2 cents. > > > > Yeah, proc based interface is both tricky to use and kinda ugly now that > > pidfd can solve all at in once. > > Sounds good. Will keep it as is then. > > > My original preference was a more generic kill syscall to allow flags > > but a dedicated syscall doesn't look really bad either. > > Yeah, I have tried that direction unsuccessfully before arriving at > this one. Hopefully it represents the right compromise which can > satisfy everyone's usecase. I think a syscall is fine and it's not we're running out of numbers (anymore). :) Christian