From nobody Sat Oct 4 08:05:14 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 D852930FF21; Tue, 19 Aug 2025 07:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587855; cv=none; b=dnVR5Bkv0Z+B77xruqbfL6Yw3fhcai62dBI2bD6sC0aljzAaN5q6wDBE/oSQYMU2Kg/jTmZ6afgSF+Yt21HzOawSvEW4WXFe25iJ/eMuCu2DQeLRDS2i70AXOllHVI+xv/HPK3od1hQzAvAA2rR/OlqYt0fjfO2cuURp0CBcZX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587855; c=relaxed/simple; bh=EBdHFltwlx7q2bFNVo6CBzKmW1i6ihD2pk/pvADqwi0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZH7yhKr6vnOu7CIYvtS/26MPE2F+3JJkIIKQQws5pXsUH9WnFDxwlspyiTGuTSh8uCr0MkPfiSdgYFo6Rto8zIDFpdjOdZY33eWdKHglKZJ0ShgG4zptEZmA35b7bDbdCodyw1j3HC1QrFRN2jtjwOmM3edittTAan0q3LLa64s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wJSNRSGY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xE+qO/vs; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wJSNRSGY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xE+qO/vs" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bipLmqlQqujs91BW8T0MMUYQj3oxqWePKHlhg0j6rFE=; b=wJSNRSGYnNYG8uD1dBnV8/JiwsNZzrDZFf3qQZqQhnVr21G8TeCAr3gP7MWfifK0oy8B0Q rL98CGX2T4UugOIvZ78RGXlnlBXnJeC1CK8ijniEzrku7y2i3lIJ6/W5CpgnbNfGTlMxbb 29/X6ncNpaFgKR0e1qXKedPNgDXmIWDL5gremLiuLaGPoNifgZ4h0auN5sybi8uwnOCA+K 6Kv21BICnwvn6HdwBM8EAgmVH9lwImeQ8g1wFEA1n1w1PIdEU7584PxJFwl1Q6qNLwtgDU cpHn+Jg327z7CobbH5S8EtbgGYVgIxybhywaU+fjffK0JcSZLH1fxoRom/dcsg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bipLmqlQqujs91BW8T0MMUYQj3oxqWePKHlhg0j6rFE=; b=xE+qO/vslAvP2chUEcNRiGOYzhku27+vRO1EtvNJs7Jkv5uFqD5tkDjrdSh3qt3anay9wK 5WQWnC9665vHc8Dw== To: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org Cc: Alejandro Colomar , =?UTF-8?q?Andr=C3=A9=20Almeida?= , Darren Hart , Davidlohr Bueso , Ingo Molnar , Juri Lelli , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Waiman Long , Sebastian Andrzej Siewior Subject: [PATCH v5 1/3] man/man2const/PR_FUTEX_HASH.2const: Update as of Linux v6.17-rc2 Date: Tue, 19 Aug 2025 09:17:26 +0200 Message-ID: <20250819071728.1431543-2-bigeasy@linutronix.de> In-Reply-To: <20250819071728.1431543-1-bigeasy@linutronix.de> References: <20250819071728.1431543-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The PR_FUTEX_HASH prctl interface was updated shortly before the release of v6.16. The changes are: - the functionality was disabled in v6.16 and enabled v6.17-rc1 after some updates the address performance concerns. - the "IMMUTABLE" functionality was removed. Update the page accordingly. Signed-off-by: Sebastian Andrzej Siewior --- man/man2const/PR_FUTEX_HASH.2const | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/man/man2const/PR_FUTEX_HASH.2const b/man/man2const/PR_FUTEX_HA= SH.2const index b500c943bf2cb..bc05226cd1594 100644 --- a/man/man2const/PR_FUTEX_HASH.2const +++ b/man/man2const/PR_FUTEX_HASH.2const @@ -44,7 +44,7 @@ since random processes can share in-kernel locks and it is not deterministic which process will be involved. .P -Linux 6.16 implements a process-wide private hash which is used by all +Linux 6.17 implements a process-wide private hash which is used by all .BR futex (2) operations that specify the .B FUTEX_PRIVATE_FLAG @@ -68,8 +68,6 @@ The value in .I op is one of the options below. .TP -.B PR_FUTEX_HASH_GET_IMMUTABLE -.TQ .B PR_FUTEX_HASH_GET_SLOTS .TQ .B PR_FUTEX_HASH_SET_SLOTS @@ -82,10 +80,9 @@ is set to indicate the error. .SH STANDARDS Linux. .SH HISTORY -Linux 6.16. +Linux 6.17. .SH SEE ALSO .BR prctl (2), .BR futex (2), -.BR PR_FUTEX_HASH_GET_IMMUTABLE (2const), .BR PR_FUTEX_HASH_GET_SLOTS (2const), .BR PR_FUTEX_HASH_SET_SLOTS (2const) --=20 2.50.1 From nobody Sat Oct 4 08:05:14 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 58A2A311941; Tue, 19 Aug 2025 07:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587855; cv=none; b=O0AJYp6BPIC9uedxeLIRP+RQEyHBgDR2z19G0lQBSwFyCl73QiiXlk5UZvj249ytVdHRYs34qK3vxN7PcLK/wdRb7mn/YZz1Qqw5nlKlt47D2J1ihycJEU4sB/CBh+bHzl97xcaOALdlkiPI9/1LeZhTqLH23PwYHlQLtp6sXrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587855; c=relaxed/simple; bh=PGJQYm3B5VIwHUqi5OgCXN0zB+HfuCIakUn0rJjc7p8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Uv9vSUgGbC2aT9JGJOr3lnhMgd7bW2jCTktb3lBr639Vob7R0bW2XYo1dIWQyXX5lzKMa72UBkCvuTMx2JjCUybgw6GlGqyjC80Z51lgpow0YfnUZTuzEFkNDqCA0zP2/AKEHOF04jBawCrx1VadX31uMHvipJpJKYHqqTrd+QE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YjNmGWRj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hj4T8Hza; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YjNmGWRj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hj4T8Hza" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Za4rAwr03keEYCKlJdxGDVcFtG5TbI4ceLeBaBGrh3U=; b=YjNmGWRjTrzZSri5EJJV6Hct1oF+AURijX8nH2nCADCnydu2o+B7mKgbPZRtNWiSRyDy6t PHD5unIS3yuEZwRJVBdj3X4EWhXbM5hdFAJwaFUEC+7DCDw65bVwqdpX2PTMv6waya+mH8 1Odq90L3dp0TUBewWg0iOzYTmqON/lmWcc2kbFSNc56RmNF/rNKTlCr65I8NWIniefMKve LsArlciKdbE2kMewBxXNGdP7e20xLKx7wwGVCXwRz4VkKBrgHkE2GcsAq0Pg3nRytzkWjw P1P3+ohZIf5Sl+eo30luFi1WYSvxPYVRtbQXXEVJvtVUs4yL7tvfLUsXP4G1cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Za4rAwr03keEYCKlJdxGDVcFtG5TbI4ceLeBaBGrh3U=; b=hj4T8HzaVxD6QVU2obX6kgOLqmO7Lq0TBOI9Y/VjXu62J6SJskMTy52D3LrestggVyyDER 1eua7kO693JORuDA== To: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org Cc: Alejandro Colomar , =?UTF-8?q?Andr=C3=A9=20Almeida?= , Darren Hart , Davidlohr Bueso , Ingo Molnar , Juri Lelli , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Waiman Long , Sebastian Andrzej Siewior Subject: [PATCH v5 2/3] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Date: Tue, 19 Aug 2025 09:17:27 +0200 Message-ID: <20250819071728.1431543-3-bigeasy@linutronix.de> In-Reply-To: <20250819071728.1431543-1-bigeasy@linutronix.de> References: <20250819071728.1431543-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Sebastian Andrzej Siewior --- man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const | 67 ++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const diff --git a/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const b/man/man2const/P= R_FUTEX_HASH_SET_SLOTS.2const new file mode 100644 index 0000000000000..93af27cbd5e5e --- /dev/null +++ b/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const @@ -0,0 +1,67 @@ +.\" Copyright, the authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH PR_FUTEX_HASH_SET_SLOTS 2const (date) "Linux man-pages (unreleased)" +.SH NAME +PR_FUTEX_HASH_SET_SLOTS +\- +set the size of the private hash +.SH LIBRARY +Standard C library +.RI ( libc ,\~ \-lc ) +.SH SYNOPSIS +.nf +.BR "#include " " /* Definition of " PR_* " constants */" +.B #include +.P +.B int prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, +.BI " unsigned long " hash_size ", unsigned long " hash_flags "); +.fi +.SH DESCRIPTION +Set the number of slots to use for the private hash. +.TP +.I hash_size +Specify the size of private hash to allocate. +.RS +.TP +.I 0 +Use the global hash. +This is the behaviour used before 6.17. +.TP +.I >0 +Specify the number of slots to allocate. +The value must be power of two, and the lowest possible value is 2. +The upper limit depends on the available memory in the system. +Each slot requires 64 bytes of memory. +Kernels compiled with +.I CONFIG_PROVE_LOCKING +will consume more than that. +.RE +.TP +.I hash_flags +.RS +The argument must be 0. +.SH RETURN VALUE +On success, +0 is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +An argument is invalid. +.TP +.B ENOMEM +Failed to allocate memory. +.TP +.B EBUSY +The global hash is in use and can not be changed. +.SH STANDARDS +Linux. +.SH HISTORY +Linux 6.17. +.SH SEE ALSO +.BR prctl (2), +.BR PR_FUTEX_HASH (2const) --=20 2.50.1 From nobody Sat Oct 4 08:05:14 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9123F311942; Tue, 19 Aug 2025 07:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587856; cv=none; b=bP/pMgN9vZMWLiSkNFczxTVnimrmLIfrLi785jiKNTNOR53DQhTxdDPpmVVzDIsdwpoi+oOVgeQCuqYo46xbR6AfHPvU6tBopuPfTFnSkNdmjlVX95DkxugBrsQ1pghE3fU6NdkdKzJHMtWyH1Ulld938/vJmmQ1xhr8QGwykTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755587856; c=relaxed/simple; bh=Z9n7TfezIWoFKCHxBhL2Y3iTe6Cu/tEI1g4PW/nGVAw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qRD20pLxjOIrDSJK6kCgpHadAtrWef97/rqBqaW+HD1dlQy99m5v4y4DQCos2ltXKRwUpJz79NJsQ534y3FwSSan93NpAN8m6YqWixycbM+KbAvajfPWvDZd51a9dm17MwzAsJzV39gum0qTWA+NGKonYWn3vCBWT871dWKkAO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VFBTVU4O; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yZnH4BD/; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VFBTVU4O"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yZnH4BD/" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUoBzjfJkaeeFgM0ucvyN6K7QcI/6/Z64U3J3djYtCA=; b=VFBTVU4O6dE/cWxcNR974vdsBjOnRG6QRZeit16yhSC5RalWDT7RI5GxDOElWMFIHsfnaE +dZ6qg7IwPOJ9MY0amMJD4nm/H4lqSp3OZTnef8nvcGpYPst4+GGPdIK4FH3MvRBNnMbFk If7zNo9AZTynogznZRjHWNKCxJz9qCH9nibbn6hcfTJXVwba1EZyol4E1UpjYM4BpKSsFT Li17MZ+shnrkCoxg8M9SbZ8Na8vixQgjVhEvpXx2p/hPLMRMxx3sq3SvIBamHBJKn/xbj8 PQfWz3r7nR9gJDGUNna+LN1/npAIbAx25EyAgmsB3umuqYlbyElICX55Y+hkbg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755587852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUoBzjfJkaeeFgM0ucvyN6K7QcI/6/Z64U3J3djYtCA=; b=yZnH4BD/PTKDMHDmvGqLF2XfeNKZRjsjFlljTSZ6zKHcFZi2c3sBf1At7c5vX/bgE1sXlT VOft+wbjwEnA0FDA== To: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org Cc: Alejandro Colomar , =?UTF-8?q?Andr=C3=A9=20Almeida?= , Darren Hart , Davidlohr Bueso , Ingo Molnar , Juri Lelli , Peter Zijlstra , Thomas Gleixner , Valentin Schneider , Waiman Long , Sebastian Andrzej Siewior Subject: [PATCH v5 3/3] man/man2/prctl.2, PR_FUTEX_HASH_GET_SLOTS.2const: Document PR_FUTEX_HASH_GET_SLOTS Date: Tue, 19 Aug 2025 09:17:28 +0200 Message-ID: <20250819071728.1431543-4-bigeasy@linutronix.de> In-Reply-To: <20250819071728.1431543-1-bigeasy@linutronix.de> References: <20250819071728.1431543-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reviewed-by: Alejandro Colomar Signed-off-by: Sebastian Andrzej Siewior --- man/man2const/PR_FUTEX_HASH_GET_SLOTS.2const | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 man/man2const/PR_FUTEX_HASH_GET_SLOTS.2const diff --git a/man/man2const/PR_FUTEX_HASH_GET_SLOTS.2const b/man/man2const/P= R_FUTEX_HASH_GET_SLOTS.2const new file mode 100644 index 0000000000000..dfeffa57930ab --- /dev/null +++ b/man/man2const/PR_FUTEX_HASH_GET_SLOTS.2const @@ -0,0 +1,35 @@ +.\" Copyright, the authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH PR_FUTEX_HASH_GET_SLOTS 2const (date) "Linux man-pages (unreleased)" +.SH NAME +PR_FUTEX_HASH_GET_SLOTS +\- +return the size of the private hash +.SH LIBRARY +Standard C library +.RI ( libc ,\~ \-lc ) +.SH SYNOPSIS +.nf +.BR "#include " " /* Definition of " PR_* " constants */" +.B #include +.P +.B int prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_GET_SLOTS); +.fi +.SH DESCRIPTION +Return the current size of the private hash. +.SH RETURN VALUE +A value of 0 means that a private hash has not been allocated +and the global hash is in use. +A value >0 specifies the size of the private hash. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH STANDARDS +Linux. +.SH HISTORY +Linux 6.17. +.SH SEE ALSO +.BR prctl (2), +.BR PR_FUTEX_HASH (2const), --=20 2.50.1