Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1986029iog; Sun, 19 Jun 2022 04:23:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1udAdqX1s7wgHqX0ZVg0jQ+8vZ3zvCkfMfJP+iZu4Cr3cSAs3SwngFYD3Ko3azHWcpkfxi7 X-Received: by 2002:aa7:dcc1:0:b0:435:5db1:c749 with SMTP id w1-20020aa7dcc1000000b004355db1c749mr15598147edu.124.1655637801446; Sun, 19 Jun 2022 04:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655637801; cv=none; d=google.com; s=arc-20160816; b=uTfEwdwv4eAIgcaKtWqVrXWlRdJHybKHyzANyWpxl1X5hz+cSD7OELB8TWFBcHjyLA /JrDBklgr6aEdEAezt31sH4GldttXzlrFogDcCT0GgYAj/NqPqjuODyjFJMh8+qpWL+8 z0KT2eAlkkCAVaBeV8XKLKPNuePHQPCrp9/cO4Lxr8pJOONQVtrWZGy7AtoI4l7qyqce RVNfZMEVDucS786jUfELnGbdZ4exsReaeyrKU1G+z5IzyD3E5Pw4DuaJvMC92BroYfn/ FX51qGk8EYFHpTb5+NZneSzxSnFdTNeCL6jXJop3d7TT/0OHCHfOB9XaagpFXdq31nrT T1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to :content-transfer-encoding:mime-version:from:subject:cc:to; bh=jbMQrcKIjQBk8IfGAXowQnwYrmA+FsCvOSpflTFOJqA=; b=selQ229PiVyPu9kDgdchXC890cGBxLsrp8JYezI2a2nt/lseoOlgzYommuRZaP4hki Rm8oxWLXq+FYnZeojbnyOINOeregecsN1QZJigQDLbXkfOZfUrDdSkQ8mD9NYW7zuH53 7j3d0mnLyOt/uuWS522kc4IUvePTfr/2IyTDc1+2w08llCeloK/BT1GyA+ceUsDlUaZY 5FUeA6wKCDF6+RtVztovCagoL2OwPMtfY6iFz9i2Z8H5yVoECRaYqM+3Q9LNy3Osq24N gbGJ/BaDmoXqg9cO8zy8z0n8rB2MpTGxnFdNFPAmGzlT3IamSSbNUwNHDWJY30Nb8DPn WBYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n19-20020a17090673d300b006fef8c40049si9012198ejl.202.2022.06.19.04.22.56; Sun, 19 Jun 2022 04:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235063AbiFSKmf (ORCPT + 99 others); Sun, 19 Jun 2022 06:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233877AbiFSKmc (ORCPT ); Sun, 19 Jun 2022 06:42:32 -0400 Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A6A10546; Sun, 19 Jun 2022 03:42:31 -0700 (PDT) Received: from orac.inputplus.co.uk (unknown [84.51.159.244]) by relay05.pair.com (Postfix) with ESMTP id D388F1A1987; Sun, 19 Jun 2022 06:42:29 -0400 (EDT) Received: from orac.inputplus.co.uk (orac.inputplus.co.uk [IPv6:::1]) by orac.inputplus.co.uk (Postfix) with ESMTP id A9789201F7; Sun, 19 Jun 2022 11:42:28 +0100 (BST) To: Matthew Wilcox cc: Nate Karstens , Alexander Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Jakub Kicinski , Eric Dumazet , David Laight , linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Changli Gao Subject: Re: [PATCH v2] Implement close-on-fork From: Ralph Corderoy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-reply-to: References: <20200515152321.9280-1-nate.karstens@garmin.com> <20220618114111.61EC71F981@orac.inputplus.co.uk> Date: Sun, 19 Jun 2022 11:42:28 +0100 Message-Id: <20220619104228.A9789201F7@orac.inputplus.co.uk> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthew, thanks for replying. > > The need for O_CLOFORK might be made more clear by looking at a > > long-standing Go issue, i.e. unrelated to system(3), which was started > > in 2017 by Russ Cox when he summed up the current race-condition > > behaviour of trying to execve(2) a newly created file: > > https://github.com/golang/go/issues/22315. > > The problem is that people advocating for O_CLOFORK understand its > value, but not its cost. Other google employees have a system which > has literally millions of file descriptors in a single process. > Having to maintain this extra state per-fd is a cost they don't want > to pay (and have been quite vocal about earlier in this thread). So do you agree the userspace issue is best solved by *_CLOFORK and the problem is how to implement *_CLOFORK at an acceptable cost? OTOH David Laight was making suggestions on moving the load to the fork/exec path earlier in the thread, but OTOH Al Viro mentioned a ‘portable solution’, though that could have been to a specific issue rather than the more general case. How would you recommend approaching an acceptable cost is progressed? Iterate on patch versions? Open a bugzilla.kernel.org for central tracking and linking from the other projects? ..? -- Cheers, Ralph.