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 0CA6CC07E99 for ; Fri, 9 Jul 2021 08:59:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7A8BA60FEB for ; Fri, 9 Jul 2021 08:59:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A8BA60FEB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 050836B0071; Fri, 9 Jul 2021 04:59:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 000476B0072; Fri, 9 Jul 2021 04:59:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE36A6B0073; Fri, 9 Jul 2021 04:59:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 9FF176B0071 for ; Fri, 9 Jul 2021 04:59:06 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AC42E180A93AB for ; Fri, 9 Jul 2021 08:59:05 +0000 (UTC) X-FDA: 78342449850.06.7C24C49 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf11.hostedemail.com (Postfix) with ESMTP id 572E7F0000BB for ; Fri, 9 Jul 2021 08:59:05 +0000 (UTC) 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: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 572E7F0000BB X-Stat-Signature: g6wmtebq4zngqe4sa4a13eqqmfixoofp Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf11.hostedemail.com: domain of "SRS0=4hh9=MB=ubuntu.com=christian.brauner@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=4hh9=MB=ubuntu.com=christian.brauner@kernel.org" X-HE-Tag: 1625821145-780354 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 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