Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp205341pxv; Thu, 8 Jul 2021 00:17:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfF7GTh1EfowMAGBSiBJ3fccEK3XprVCV9uJXD/w0HELpYTsWVu5G6q9WnO4mb/hveyPw/ X-Received: by 2002:a05:6402:35cd:: with SMTP id z13mr35787622edc.2.1625728663953; Thu, 08 Jul 2021 00:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625728663; cv=none; d=google.com; s=arc-20160816; b=k1MwHHWbupxDTyxvZVizDOp+1PzKsC2bCepRbnGVEKjZ4ORtR0ubj6JjwyOwJttGoa J8+r0hzEEl/FXPppyzeKhygNOTHjAucwwG/LAQHtGK7QgsiBGGPQ2SgqFe3SvL31wbfT VeDUax6QiaIZ3slqSuaH1EEZiBXkPiLaJyazTH1KCmoM4CQGCg37PcwqA9fRdYWiALS1 dKFuWKXnOOr4K91CXu3urMJCH5Dad+9DqaRvWPzAQ6ZnnZmKludPIJknEHzai7HxgwvW +K6SmECgNLg4ICYe69gPdsxiy8Th503Qn8Q6dUksKhxNWe0A2Vm+2aDYsApbz/T8FtQg myQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=aTVrKeNSZQYZXjn+U2KrdBcF3WfqOs66nwM/5SMqCdw=; b=0KUZwwMo70V2YRnUS3fCYxW3GAvPQbQiiFdCsQ2zXi/cDE+z+lcdzPyW99gDe9CTdw 55p0HevGvdtBS/rvFebIXhgzJxnsWcoiEbMwqlv/9bi8T9+jBYnVxPEr1KrmnncbA6f4 2mKWhgw/9nNTgvW2A3lNfpo+6HlQkKtd4ubIfypQtdj2G3qTtL54i0Q7jvKb4eFWh8mh Lp5juH0AWylPGVn2fqa5ReGH3+sJqrb90ehD2slo6tyT6ID+SZTfUgp0ZiNO7nhZy96/ BOVE5nybWNF3l2L3snktuWG//kdE2PguYvsdl0oxzu61vDGu77PT1Ku8+J1Y8GTdPW0n FO6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TSSdMntV; 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 f18si1807877ejx.521.2021.07.08.00.17.21; Thu, 08 Jul 2021 00:17:43 -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=TSSdMntV; 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 S230439AbhGHHQt (ORCPT + 99 others); Thu, 8 Jul 2021 03:16:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37028 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbhGHHQr (ORCPT ); Thu, 8 Jul 2021 03:16:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625728445; 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: in-reply-to:in-reply-to:references:references; bh=aTVrKeNSZQYZXjn+U2KrdBcF3WfqOs66nwM/5SMqCdw=; b=TSSdMntVnKRxEDx7lz7jdYOma51JlVFim6r8e+6okk8SFPXsqZ1VOyF3TVqeOhY7omFZzP qDEf8oDLFIa24nAQcTrdpS9A3NNB1LP36lvDUGFy5hxqvcoO7iVNOHmnTcxhO1u5OMj5AB wlB5qQjwet7Nc63vvkK2W+9JJjiyANo= 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-240-thd_CwFgO0yjDP7m6NA6iA-1; Thu, 08 Jul 2021 03:14:03 -0400 X-MC-Unique: thd_CwFgO0yjDP7m6NA6iA-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 1FDD91084F40; Thu, 8 Jul 2021 07:14:01 +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 9FEBF5D9D3; Thu, 8 Jul 2021 07:13:50 +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> <87wnq1z7kl.fsf@oldenburg.str.redhat.com> <87zguxxrfl.fsf@oldenburg.str.redhat.com> Date: Thu, 08 Jul 2021 09:13:48 +0200 In-Reply-To: (Suren Baghdasaryan's message of "Wed, 7 Jul 2021 23:39:34 -0700") Message-ID: <874kd5xopf.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 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: > Sending SIGKILL is blocking in terms of delivering the signal, but it > does not block waiting for SIGKILL to be processed by the signal > recipient and memory to be released. When I was talking about > "blocking", I meant that current kill() and friends do not block to > wait for SIGKILL to be processed. > process_reap() will block until the memory is released. Whether the > userspace caller is using it right after sending a SIGKILL to reclaim > the memory synchronously or spawns a separate thread to reclaim memory > asynchronously is up to the user. Both patterns are supported. I see, this makes sense. Considering that the pidfd sticks around after process_reap returns, the issue described in bug 154011 probably does not apply to process_reap. (This relates to asynchronous resource deallocation, as discussed before.) Thanks, Florian