Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp143135pxv; Wed, 7 Jul 2021 22:42:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlQqfZKCfOKUbERq30O6mdT+qV39d9efMzPSnNuvqnL/kW5ehbVwy0ekXPAMjB6X9hB8dg X-Received: by 2002:a92:c7a6:: with SMTP id f6mr6279205ilk.20.1625722960816; Wed, 07 Jul 2021 22:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625722960; cv=none; d=google.com; s=arc-20160816; b=w1cz38hW4r8UYVmf89Ottb8jkNA+MCkQtZOyI3BFJIi0mgAycrTeRF9mSBSSytvM4G ErYIBfF1AxJ7muRn/zuyMlUTVdrxpQRXgiPa4ubCEXvyQe0JWEVQ4A7AbVf8hUijE1gl JP9Hdl32nAlyNCIW2b3ievyz6pge/otORol3l5p+v5kabOSI05sTALYwKm6Ut4wXLszL dtW6Uq6XKlZEZXRzCMAFyFyjWCk2M0MPMB7xDL7yOXg3BPnXYfNcHTz3E1IDpHdOibZi 6NVcF9g6fI60zbAqq6VAWZLAoGDBSDiz6WhMwhE2sVYEU0Cq+CI+5mTV3nzPQ1ybCOGX 3hkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=n1q1GzSSargcyAtgTNwOM0FZXkXUZDLZ+n4JlGr4Nm8=; b=Rs2d8vnhTFy6Rla6F8NYZ8FEhZaIdWGEmdHHTxfWEZbd1cAYQuD70xAqXr5rBdK6Bp VaKb2y9zCuiJ9cWrArcAV5dce8PPQcIh2go6V8UaoD7Xb30XJvX4bCBWPnQOfm4X/epX O3ZgL3UoV3DCySnn9VjNOAwBzIPa3A+ntMyzjII0EXUNN4XtYt6xqAkj7GQhWL9/tGug a31wNHTpTBpI2vLMR6KoyUpKnf1UzEYF7zOr9xVPQfSPSJaoZKf+5H07Z3YfmbcNLRs1 QNwl1hHJejxLV9U8uGCrhpBe0mEU7wFNz3txzAJ0LoQxilPOvPSYRMeVJhCZ+b8Vudoy HHWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GlI1fx7T; 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 v6si1428097ilo.115.2021.07.07.22.42.28; Wed, 07 Jul 2021 22: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=GlI1fx7T; 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 S229646AbhGHFoC (ORCPT + 99 others); Thu, 8 Jul 2021 01:44:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37410 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbhGHFoC (ORCPT ); Thu, 8 Jul 2021 01:44:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625722880; 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=n1q1GzSSargcyAtgTNwOM0FZXkXUZDLZ+n4JlGr4Nm8=; b=GlI1fx7Ty88ms/5OQpfUI7vORtDgFTNdEVOAoMiq4dpJ/umYM910oLKP4GfIpAaTBwJAjv +D3qwZc7Nwycftqu0k4pyayigHwcMdQvL5/wlJRPdko7LmNz3pgrROY+cSlNpl5wrLN6oq 5P6cYl52xuVWWFgEKgRsvLzLVggxTOM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-109-wtLBaRfVPLy05KoC9hwVRQ-1; Thu, 08 Jul 2021 01:41:17 -0400 X-MC-Unique: wtLBaRfVPLy05KoC9hwVRQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AAE5A1084F4C; Thu, 8 Jul 2021 05:41:14 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB8CD5D9DD; Thu, 8 Jul 2021 05:41:00 +0000 (UTC) From: Florian Weimer To: Suren Baghdasaryan Cc: Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Shakeel Butt , Tim Murray , Linux API , linux-mm , LKML , kernel-team Subject: Re: [PATCH 1/1] mm: introduce process_reap system call References: <20210623192822.3072029-1-surenb@google.com> <87sg0qa22l.fsf@oldenburg.str.redhat.com> Date: Thu, 08 Jul 2021 07:40:58 +0200 In-Reply-To: (Suren Baghdasaryan's message of "Wed, 7 Jul 2021 14:07:15 -0700") Message-ID: <87wnq1z7kl.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Suren Baghdasaryan: > On Wed, Jul 7, 2021 at 2:47 AM Florian Weimer wrote: >> >> * Suren Baghdasaryan: >> >> > The API is as follows, >> > >> > int process_reap(int pidfd, unsigned int flags); >> > >> > DESCRIPTION >> > The process_reap() system call is used to free the memory of= a >> > dying process. >> > >> > The pidfd selects the process referred to by the PID file >> > descriptor. >> > (See pidofd_open(2) for further information) >> > >> > The flags argument is reserved for future use; currently, th= is >> > argument must be specified as 0. >> > >> > RETURN VALUE >> > On success, process_reap() returns 0. On error, -1 is return= ed >> > and errno is set to indicate the error. >> >> I think the manual page should mention what it means for a process to be >> =E2=80=9Cdying=E2=80=9D, and how to move a process to this state. > > Thanks for the suggestion, Florian! Would replacing "dying process" > with "process which was sent a SIGKILL signal" be sufficient? That explains very clearly the requirement, but it raises the question why this isn't an si_code flag for rt_sigqueueinfo, reusing the existing system call. Thanks, Florian