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=-14.0 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 1B28FC07E9C for ; Fri, 9 Jul 2021 20:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04AB3613BD for ; Fri, 9 Jul 2021 20:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbhGIUIf (ORCPT ); Fri, 9 Jul 2021 16:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbhGIUIe (ORCPT ); Fri, 9 Jul 2021 16:08:34 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F47C0613E5 for ; Fri, 9 Jul 2021 13:05:50 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id a6so10730139qka.4 for ; Fri, 09 Jul 2021 13:05:50 -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=P5+WmqauNzbChUW8XqTixtKA8dFJS+e/U7EkZz1A0EE=; b=iSgKXodyEj1EqcLcoxTixy6u1pO5YCAun7vY+u/KhEWcHHJgwfXA6g3XNiut6VaTVB lgk+FXZsyJ9zTHKFiIHltQuKku5R2gYNv70uOM1vvxxytHaNQaJ43aGv4c6rVPeuFTuq NB0nQVZHvAkhAIGIYcSzaJBiZ8Pxy6LflyAFo9QZ0p8gbmXj7K1j217OQMYCB6c2Xrn6 NcJyt5Cu6Qd0BQijqleEB9j9Aju1BmPZ8yykdkvnoZmFThvncDOR5oPj2Oj92PScho6a C27ghu6HIsDBdBLIu33ce3uc+pr/SEDPZaZe9yzDFyNGQ3z9mZ47Yzu/qpVQLRdOWeEC Yq9A== 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=P5+WmqauNzbChUW8XqTixtKA8dFJS+e/U7EkZz1A0EE=; b=rK3cWWIc/e8QUUeYugrs3ODy//ppDGeui8fr3LxBK2fQ6/M3TJoYhNLSwyVhW0dsM8 YZ/PtURgxmanX/MM3oEa2s78rikkWiJV6pBdcYSKsz8gzAJaMwuNq+oUUjIufp3Ecd8m vyvSvsE5WqMc4sBTVslwfEtIUjGaPYAb8BXhYwd1rjmERWT9CWIvY2zYNClg2bDKFEdR WFV7EPn1/GZ/3q5sratGIEmtzxboex75mHjm3C+fillCDjdLaHFwzJnYZo3yaLkIgelX g1FpnnmvLe4ScBG0hHJeLqf0d8nxij++Ocdz3aSN963ov7+aJMyxxNBRDNRdW7QUIdTO +kLA== X-Gm-Message-State: AOAM531pKAL/G+3JAanNwnUgK371gVrtCj4+kBtLctVkn4UKBsBVyCky 58kWehyd8rYbXCBQ1u1poQWGwlvgtx8lEK/6Cq0a2A== X-Google-Smtp-Source: ABdhPJzJvR1wZq9AfX5vthaOvHt9sFNe4kSP3CmRNZ1+aIxNbfPPVIY8wNmMWEtvUzL4LbsqaBnidsC5UYvDm6CiFQU= X-Received: by 2002:a25:7ec4:: with SMTP id z187mr48449448ybc.136.1625861149937; Fri, 09 Jul 2021 13:05:49 -0700 (PDT) MIME-Version: 1.0 References: <20210623192822.3072029-1-surenb@google.com> <20210702152724.7fv5tnik4qlap6do@wittgenstein> <20210709085857.zf5ik3btet3yw4ab@wittgenstein> In-Reply-To: <20210709085857.zf5ik3btet3yw4ab@wittgenstein> From: Suren Baghdasaryan Date: Fri, 9 Jul 2021 13:05:38 -0700 Message-ID: Subject: Re: [PATCH 1/1] mm: introduce process_reap system call To: Christian Brauner 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 9, 2021 at 1:59 AM Christian Brauner wrote: > > 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). :) Thanks everyone for the input! So far I collected: 1. rename the syscall to process_mrelease() 2. replace "dying process" with "process which was sent a SIGKILL signal" in the manual page text I'll respin a v2 with these changes next week. Have a great weekend! Suren. > > Christian