Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1123518lqm; Thu, 2 May 2024 06:08:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHT5C/1GPJhJhrcpnR/IOEvCjAK9HeCwHEnpeoGZD6nY3LcKZiFS1PKsgSBG8gqjs7yBa74xa008a1udyXRuK9pcUNH9YvGNkIFdIodw== X-Google-Smtp-Source: AGHT+IHlAQVHL0H4bE4g6kCTvhqd+Tm2iEYBsN9/GVcCyp2P8BA/P8hBAyUI7vRNAOpGqcjtDgUz X-Received: by 2002:a17:906:37c9:b0:a58:8394:85b3 with SMTP id o9-20020a17090637c900b00a58839485b3mr3869372ejc.35.1714655301379; Thu, 02 May 2024 06:08:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714655301; cv=pass; d=google.com; s=arc-20160816; b=yA8hpx+Ur4UhMn33TFZt4lmdx1lj/ih+Gfh3B2+hWmdL34557ByJwBMQY3/7Wtm4o0 k2AbSyWE1rfnVr49DMjCjhSfOUrln7iVT0tMoUpnPgt5U1G+0/Kmp1In+N6Rfv7J0GHO Ia6j9o7gMor6RK8KV1GuTbyLwXozB/0sfsakdGXDSII6xkkw2e72/vMnMX2jeAPi7O+s lK9jrDjcE6mKAf/bSBHmAFuIeE130xcWQx/LnwhwjSqRfu3G5hEc1cXuKfkRwQZjje9d ej7LbhqqRR3kI2GJNx4UPtByS4yG+iTR5Tj16UuqK0XemvNoRCV188npg2B+rLs4RiZB CWog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Y35D65BLmD4eLHhHOtDiZkhUIVEiUytUe1lA3C90F68=; fh=9g7BUErInwRTYrZfe45rzjHksn8wOmQO2NC8YzIrU2E=; b=jO4AT4QvPJur3/K0w6zUHfp7difQNJgKxGS/NvQItnCAhZppr7oxTAfRUpeknIzLXZ hJRGDfALz1JXFBx0gXGToWcQDg9HD+NH5t2dAvZj5OUdYe6pkClR1F6sPsQ19JOWe58c ZG+fHsX0ChIpc6dBIneJPlHOAaZhYYvhT3dZezfzIHzfIf6Yp8H1mjRDqgQt7W5JhLIX ifBXxYdMA0Qz159y+hYYTNAbmDwEiK+C7QJIsiykC2QY2f6oQSX7jNmfRy6qOR73K+L0 lhOp7kcyA0Lnl8zpzFn6EJt6Pvc6II8hQMsCRt3GMOOEm+nu3ZRwZVgKHeEIfYrR6zdb GevQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LEP+fCsl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id mp17-20020a1709071b1100b00a570bc721a2si567938ejc.536.2024.05.02.06.08.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 06:08:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LEP+fCsl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 21BB21F2363F for ; Thu, 2 May 2024 13:08:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EED4883CD7; Thu, 2 May 2024 13:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LEP+fCsl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A957580A; Thu, 2 May 2024 13:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714655292; cv=none; b=KKYWM63XaXRfKBIkeH+L2S6+jqAFNT0V74ohbbyB2WUhiEGXhFjamb39y+QecTJQsf1c/fkIP9JpZF8MbqXNYqQKbCLuwkTunbMyS0mED2wl5EnMiFntkI4NU5ejTgHjmvZfPf3ZllQ/c9XXm7dQ57A9Z6mtryyZpPADyQw138I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714655292; c=relaxed/simple; bh=k5KOH2RHPzrvgy56nRKWhjolv43Wf2+3vKU6xOlkz+o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r5zMPpI+UeWes/C5cpSZOT6d2BF37WoJ948lKU2uihyqbu2uXYzDlBwrfNSBLz9/C8I+bEg3xTYeT77sz2I2iSoMSpEN1CHObwhUtIOJv0VGdhPRAI6077PVKea9q8pjrm2NUidjmk0KAQ0uAbPDKZ5iwEBur2jqk11r2qlEnUI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LEP+fCsl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F122C113CC; Thu, 2 May 2024 13:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714655291; bh=k5KOH2RHPzrvgy56nRKWhjolv43Wf2+3vKU6xOlkz+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LEP+fCslkDiCXBWoib3/vE2nA3zyjK6T+9NcChZhIsb6rZbSukPaaVSgmsKsOuxXN WQwftKhXPr1O7EK/iL6q+hVLYS9eOqu0p+g2nMYiCrS9swQbWDgY7caLHOQRvNj7e/ KxkMpehYRJsise3+duVhFqC6I037uK07URGiQtnoqm1iovoxMT21W6wqEXKPkAw0KS TZ08f/sm49oxZee39RLL/FwgScmwgJzGAvWPq5pMl3SY85/TNK52iEq8A65bUnIutZ SadWpDqsn2hVh9fuQbRORxcFa+h2gHP9Q9omgD+37Z4j8zlJMqjhV36J7l0TzwPVG8 U7TXOZnC21frg== Date: Thu, 2 May 2024 15:08:02 +0200 From: Christian Brauner To: Florian Weimer Cc: =?utf-8?B?QW5kcsOp?= Almeida , Mathieu Desnoyers , Peter Zijlstra , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E . McKenney" , Boqun Feng , "H . Peter Anvin" , Paul Turner , linux-api@vger.kernel.org, David.Laight@aculab.com, carlos@redhat.com, Peter Oskolkov , Alexander Mikhalitsyn , Chris Kennelly , Ingo Molnar , Darren Hart , Davidlohr Bueso , libc-alpha@sourceware.org, Steven Rostedt , Jonathan Corbet , Noah Goldstein , Daniel Colascione , longman@redhat.com, kernel-dev@igalia.com Subject: Re: [RFC PATCH 0/1] Add FUTEX_SPIN operation Message-ID: <20240502-notversorgung-unerreichbar-2b2d434194cf@brauner> References: <20240425204332.221162-1-andrealmeid@igalia.com> <20240426-gaumen-zweibeinig-3490b06e86c2@brauner> <20240502-gezeichnet-besonderen-d277879cd669@brauner> <8734r0o81v.fsf@oldenburg.str.redhat.com> <20240502-sporen-pirschen-039688cd9efe@brauner> <871q6kmra1.fsf@oldenburg.str.redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <871q6kmra1.fsf@oldenburg.str.redhat.com> On Thu, May 02, 2024 at 12:39:34PM +0200, Florian Weimer wrote: > * Christian Brauner: > > >> From a glibc perspective, we typically cannot use long-term file > >> descriptors (that are kept open across function calls) because some > >> applications do not expect them, or even close them behind our back. > > > > Yeah, good point. Note, I suggested it as an extension not as a > > replacement for the TID. I still think it would be a useful extension in > > general. > > Applications will need a way to determine when it is safe to close the > pidfd, though. If we automate this in glibc (in the same way we handle > thread stack deallocation for example), I think we are essentially back > to square one, except that pidfd collisions are much more likely than > TID collisions, especially on systems that have adjusted kernel.pid_max. > (File descriptor allocation is designed to maximize collisions, after > all.) (Note that with pidfs (current mainline), pidfds have 64bit unique inode numbers that are unique for the lifetime of the system. So they can reliably be compared via statx() and so on.)