From nobody Thu Oct 2 15:20:04 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 D401231B828; Mon, 15 Sep 2025 14:13:09 +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=1757945591; cv=none; b=f2xaGTZGsbk5LaLT5FTgKt2RtmS4j5EXmLB8aCdSWhF64EC4CqY63L/7VHLpa/xuUvtvTUVMzVzzvsa3Swb0QfZ1Wqro4f/oslLsr8oe2NaeHMtGC3GK6CEkmvgDD74tct/bJq3pEM+n8O/I+ldr5SE1zXgWjW2cWPnQgVXmaqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945591; c=relaxed/simple; bh=FkIQ/D+qjr2VukEpgI4XQgMfbuYPEeEYZTJPk4Q6FBk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MQfdT3rBC92iuAf/0KV+pA83wAtMdubSeCZm6pcgX/OfYdNRpNjyyxVQ9NB1zGksoAsaatd/dyfQbgXqWKuuqO0H3b/S3ll7wwb4km8ntWKG33KkMyMWp2DAYGMxX4/tDTvDUoy/XOpXLwE46sb9T6PbQQthzhtcG0ukvEXTb54= 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=mJlsOC9j; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6k+c4iBC; 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="mJlsOC9j"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6k+c4iBC" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757945587; 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=OJP1JQxJAMmaNtt20+x0eFfFxE9Jzbze9SVWc83JM6A=; b=mJlsOC9jfa6XsW8lrLYsG0Ul5H32MoB+pPcjMjeAuaFDqfwWAG5SekbMJX7juabwvMWOhv 2x60X/DSRx76UlQB5mu863XIXDggHd3hLU64u3m48BNZ+5vZwSb9SYhN2jG6s68HRgIOeO +yxdL0MX6ajPuNGL0grDvpvUS3FVSfXFYdXNr2a7nSeA1Ui3CydyQqQagw3j6zHFEpzsdk Kh3lki65jEaChUHsAiTY60uSjmHehMtyvaFE8bnhX3+FtjmzH2JTlaqdZ1+58ZFqquAGJc uXNIAmUZY8NuPx7PYh3BQ8ZTKipHSlevOcErQtPWEuBZTDC/jUgZD+n3VqfMcQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757945587; 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=OJP1JQxJAMmaNtt20+x0eFfFxE9Jzbze9SVWc83JM6A=; b=6k+c4iBCe399vX3nZs12hYKFJL33L9gM+XC4Pj4GqJ+B61BDyR4pTw0rynYx8UaH7CalYW 2QAPQJ+KDtfaeZCw== 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 v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Date: Mon, 15 Sep 2025 16:13:01 +0200 Message-ID: <20250915141305.906440-2-bigeasy@linutronix.de> In-Reply-To: <20250915141305.906440-1-bigeasy@linutronix.de> References: <20250915141305.906440-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..1605c18c6985b --- /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 " size ", unsigned long " flags "); +.fi +.SH DESCRIPTION +Set the number of slots to use for the private hash. +.TP +.I 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 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.51.0 From nobody Thu Oct 2 15:20:04 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 D410B31C570; Mon, 15 Sep 2025 14:13:09 +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=1757945591; cv=none; b=M7/hZPitOMRQ/QEaUf4453DNONrTBiYuXqnLR/yW6hmWHAwgM/6cuoXOVrnvVqGTqNyQDxfXWXaaPPLEo7eOihkYlHiJoofwjdpJ1EYIaJOmOfo59l+m1vRTJV/HK9Nh2w+3KhC5eKZAjKk2mdFXr3TFVtV1xGLOZ0J0y+mWvVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945591; c=relaxed/simple; bh=1BLnblQJwq/UClc1wfdQ7Lvlue7Sd0NW+Fx6i2xHPvs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CFKpfI7Ek/qqbDzSh4ndsuMRiY1P3KXH1J7fl6YrphUOwrZl6pGTD2cFxt6YUhNHQ2Y+MKExEoay/Z0gKpJqSYsmzmWZg0HLDikP65V7qZHjicnocfvmhsQT3CpSjXVsjHTWUGV8tZyXq9gl6eXjZKwfcHW8AjspZjA2f+wfSAY= 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=caYXf9D5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OdZ4xYKt; 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="caYXf9D5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OdZ4xYKt" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757945588; 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=D63VAdF1221Ei3EYJCGYIEiLPIfe21aX7zZS/4205RI=; b=caYXf9D59d52H+BTnbUYD/kpQErDzF/qACRwQOqo40K7ze0WRs3dIN1PNNzdz6vnMiz9ZP AyHjf0yZzGLY1FXrV0/wBFZlazIY+R6T5q0EalUtUESwz8x+RnMnr6DzfmdnboXGihUuhZ g/hgcIG3xpX/8la9yvyp8GhDKXFzZEjpDW1go2r5VOUWZ37FKK/LnBUUDpoQBjHjv3FMVn ziJScyOsXWEZc5HTPyP9ezUvf55t3Qi0LoodkadPrJ1U1PyVEy6vdB14l7nUgoW9Uls2yW vQdTfoU0R6XNpzgUD2GGltnZo0bBislrDesfP79TgiEGmiF4/JbH0o/gDIvi3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757945588; 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=D63VAdF1221Ei3EYJCGYIEiLPIfe21aX7zZS/4205RI=; b=OdZ4xYKt7VpdfXIEQgqSWlYHGNKYtCDGDE4zYN64yZppammEM6L2vvWavCtf8RBTrb8/rA 2UmHb7WkDL7Y7eCA== 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 v2 2/5] man/man7/sched.7: Update the real-time section Date: Mon, 15 Sep 2025 16:13:02 +0200 Message-ID: <20250915141305.906440-3-bigeasy@linutronix.de> In-Reply-To: <20250915141305.906440-1-bigeasy@linutronix.de> References: <20250915141305.906440-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" Update the outdated information: - The PREEMPT_RT patch is merged. The patch continues to exist (as of now) but is not mandatory. - The patch can be still downloaded but most people use the git tree these days. Add a reference to it. - CONFIG_PREEMPT_DESKTOP was never thing as far as I remember. It was always CONFIG_PREEMPT and its description referred to "low latency desktop". - Within the PREEMPT-RT patch there was a brief window which introduced PREEMPT_RT_BASE and PREEMPT_RT_FULL. I am going to ignore this. - The introduction of PREEMPT_LAZY in 6.13 moved PREEMPT_RT from a preemption model to an option. - The mentioned wiki is deprecated. Update the URL to the new one. Signed-off-by: Sebastian Andrzej Siewior --- man/man7/sched.7 | 58 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/man/man7/sched.7 b/man/man7/sched.7 index 3299c21dc1ad8..db7753c9e912c 100644 --- a/man/man7/sched.7 +++ b/man/man7/sched.7 @@ -933,16 +933,12 @@ the following to modify the autogroup nice value for .EE .in .SS Real-time features in the mainline Linux kernel -.\" FIXME . Probably this text will need some minor tweaking -.\" ask Carsten Emde about this. +.\" The archaeologist knows about v2.6.9-mm1-V0.1-realtime-preempt Since Linux 2.6.18, Linux is gradually becoming equipped with real-time capabilities, most of which are derived from the former .I realtime\-preempt patch set. -Until the patches have been completely merged into the -mainline kernel, -they must be installed to achieve the best real-time performance. These patches are named: .P .in +4n @@ -953,24 +949,52 @@ they must be installed to achieve the best real-time = performance. .P and can be downloaded from .UR http://www.kernel.org\:/pub\:/linux\:/kernel\:/projects\:/rt/ +.UE +or cloned from a git tree +.UR https://git.kernel.org\:/pub\:/scm\:/linux\:/kernel\:/git\:/rt\:/linux= -stable-rt.git .UE . +The individual releases are maintained as long as +the matching LTS kernel is maintained. .P -Without the patches and prior to their full inclusion into the mainline -kernel, the kernel configuration offers only the three preemption classes +Since 6.12 it possible to enable the real-time preemption +without the need for any patches. +The +.I realtime\-patch +continues to exist and contains support +for not yet integrated architectures, +drivers and features that are in development. +.P +Since 6.13 real-time becomes an option +and not a preemption model. +With this change, +the following preemption models are available: .BR CONFIG_PREEMPT_NONE , .BR CONFIG_PREEMPT_VOLUNTARY , +.BR CONFIG_PREEMPT , and -.B CONFIG_PREEMPT_DESKTOP -which respectively provide no, some, and considerable -reduction of the worst-case scheduling latency. -.P -With the patches applied or after their full inclusion into the mainline -kernel, the additional configuration item +.BR CONFIG_PREEMPT_LAZY . +The real-time capabilities can be enabled with the option .B CONFIG_PREEMPT_RT -becomes available. -If this is selected, Linux is transformed into a regular +and the preemption model be set to either +.B CONFIG_PREEMPT +or +.BR CONFIG_PREEMPT_LAZY . +The latter model is less eager to preempt +.B SCHED_NORMAL +tasks in an attempt to reduce lock holder preemption. +It does not affect real-time tasks. +.P +With +.B CONFIG_PREEMPT_RT +enabled, +Linux is transformed into a regular real-time operating system. -The FIFO and RR scheduling policies are then used to run a thread +The +.BR SCHED_FIFO , +.BR SCHED_RR , +and +.B SCHED_DEADLINE +scheduling policies are then used to run a thread with true real-time priority and a minimum worst-case scheduling latency. .SH NOTES The @@ -1032,5 +1056,5 @@ and .I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt .P Worth looking at: -.UR http://rt.wiki.kernel.org/\:index.php +.UR https://wiki.linuxfoundation.org/\:realtime/\:start .UE --=20 2.51.0 From nobody Thu Oct 2 15:20:04 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 81E002F3624; Mon, 15 Sep 2025 14:13:10 +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=1757945592; cv=none; b=k1VoyIuOIoGCPk1QAuuATM+CDyOC5O2r8XfZbRBzdZ0Ph/avXvj5wK4MfAH6E29j58KYs8zz5SVSLGvrAR8wJl/7DCh/VVtb5WaBJPtehH9VDhm1oQM+uDRWvrwV7lE3eKlqoq9aeiz8NsELTryys3K6Udtw2T+HYBPgiOfdhGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945592; c=relaxed/simple; bh=gsRYXwnNg86WJcfbm/8nPopRQVGgrb5Pz7ENAUT1Uqg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sPAZuyx8PUNxtrasicn3GbL5oz1kamd9de9ptQ08v44vY1NIgRmPqO/27MOBa2WyNNY3y7GwZoRQxGyeC/m8l8Luq+ykBknsHWMs50fvdcNZfAOjmiDqWcP1VHI6qlC0N149VYt6iiO2/DonaBuralLG6rkOkhledM0SN4gYzzU= 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=y4SAes2A; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VPV5bv5q; 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="y4SAes2A"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VPV5bv5q" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757945588; 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=gsRYXwnNg86WJcfbm/8nPopRQVGgrb5Pz7ENAUT1Uqg=; b=y4SAes2AWI5N2dBCzZLM/pcinuNG7RQRWXL7eZRqNWIZJTpfdpXPTdRWsvjwnVFAMzQkvN xqaXjLsoDCOA/v0IeVaGHWX3BevaF3uzVyZJvF3mCNnEPXAobI07CMnf/q9CpePjkQaGE1 oGfNmLh2XK1wR1ybTUjQWaIOkQmjexKjn2R8Z+oOXmt4rnEjxPbBz77Au19bmMRpA2rHRV 3cM1GJ8cZF2b29BGHarZB4rLT4uqC6wqyPoxa3Lc5nfY6p1eHEFUHJauh2EQLnrQ0XeNL3 CQPegIr3n9SP53QG85/QD13uSbWclML7NkyeZhrOZBjdpae60sjIU72ckTLIKw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757945588; 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=gsRYXwnNg86WJcfbm/8nPopRQVGgrb5Pz7ENAUT1Uqg=; b=VPV5bv5q7IqISlLx1NZefGBywDG1ZNpAYZ/NEmSExT4P7eQo3CiyaxqZryLwmlRmr3COFj UG+oudUQGh82FOAg== 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 v2 3/5] man/man7/sched.7: Update the documentation references Date: Mon, 15 Sep 2025 16:13:03 +0200 Message-ID: <20250915141305.906440-4-bigeasy@linutronix.de> In-Reply-To: <20250915141305.906440-1-bigeasy@linutronix.de> References: <20250915141305.906440-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 section refers to .txt files but they have been moved/ renamed to .rst some time ago. The mentioned sched-rt-group is inconvenient as people always complained about CONFIG_RT_GROUP_SCHED. Everything that describes CFS is not wrong but the kernel the kernel switched to the Earliest Virtual Deadline First (EEVDF) scheduler. Instead of updating the file links below (and adding new ones), replace them with a link to the automatically created scheduler documetation from that folder. This also has some EEVDF bits :) Signed-off-by: Sebastian Andrzej Siewior --- man/man7/sched.7 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/man/man7/sched.7 b/man/man7/sched.7 index db7753c9e912c..935ff1fb82db5 100644 --- a/man/man7/sched.7 +++ b/man/man7/sched.7 @@ -1048,12 +1048,9 @@ was not possible up to Linux 2.6.17. .I Programming for the real world \- POSIX.4 by Bill O.\& Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0. .P -The Linux kernel source files -.IR \%Documentation/\:scheduler/\:sched\-deadline\:.txt , -.IR \%Documentation/\:scheduler/\:sched\-rt\-group\:.txt , -.IR \%Documentation/\:scheduler/\:sched\-design\-CFS\:.txt , -and -.I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt +.UR https://docs.kernel.org/\:scheduler +The Linux kernel documentation for the scheduler +.UE .P Worth looking at: .UR https://wiki.linuxfoundation.org/\:realtime/\:start --=20 2.51.0 From nobody Thu Oct 2 15:20:04 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 8766831B102; Mon, 15 Sep 2025 14:13:11 +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=1757945593; cv=none; b=uSR61kXQvDjPd2/gmgzNAN6aGSz33WQ6VrV4UwtjVhWQwXlrRWGSgH3TFXSo7ZVKY+Bj/zvhlNjeUjuYmYIHdW9HiO2buQILUgamuD5TKGxzOOkFXDukjnS/mIa9hajHN76pYNAeLIUgx0v++2tB6be4riCE4DmI52R4SA+Ieek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945593; c=relaxed/simple; bh=TIfkXMFMkSx1WW3j7mRXsB1XS0dH6CHK3eRZO5Ufy5A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VrUYaUB/TJVLbzBJzFF60NNdbPNFBO9uX5HwsEs+mWawI2UJgPiDju+lAGVDjMo9H1BEyJujim3d6sRZIO56mM/UAqRwXRDm+JsIJdUod+dpaFJ8s77dH04V6eKCHBA9+aDzwbVctJ07kIPPeqDDtQuGjQ8dmuYsCrzfLM0hLao= 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=rIWQLeWz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3pWCzr8/; 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="rIWQLeWz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3pWCzr8/" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757945589; 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=0GTPD0Jg24qZ4wvtVY/gWrfu7stE2l/DR018tFCz2so=; b=rIWQLeWzwM03P1r8Oeiqmsj62FckjJUPD9xZYwiL0Q0N5p4Ev50qGMEevdQFh4s5+PjW2b OPa8RzDyqbLcTKMGLp8SiQBnieSH0QfWzeyrONmx23oFL0+ifsJXO0e6rUXmuRrhOnMZhe rPD/mp3FkgU9Zxc+XGtApOzorCqMoIZcMExEm58wmuTi4Td2KvUcJQmVBzgv5i7uhMmJS2 5skteCXIHfBAYbD53fWEjHIjm3aVPGATSEm8OacNkDY88kdrVE4Od2L5VMsPgS3MQlyofq mLxcLGS9nWppOw6OJu73WiJs+3EZly5EvdOxc57NqOLHf8EUsU9QYT5n5zYlVw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757945589; 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=0GTPD0Jg24qZ4wvtVY/gWrfu7stE2l/DR018tFCz2so=; b=3pWCzr8/tU9QKuqhHODw8t8JKgFBvVzkvJn94X4C/Cy29/mqPRLm1X0G96CtwgEnzIuLeI tm+ghSCfZhwIBADw== 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 , Carlos O'Donell Subject: [PATCH v2 4/5] man/man2/futex.2: Update the link reference again. Date: Mon, 15 Sep 2025 16:13:04 +0200 Message-ID: <20250915141305.906440-5-bigeasy@linutronix.de> In-Reply-To: <20250915141305.906440-1-bigeasy@linutronix.de> References: <20250915141305.906440-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" Carlos O'Donell says based on the context, it should be the former link from that day. Update the link accordingly. Cc: Carlos O'Donell Link: https://lore.kernel.org/all/710e8f05-b0b3-489a-9e89-8967cf6a9e70@redh= at.com Signed-off-by: Sebastian Andrzej Siewior --- man/man2/futex.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man2/futex.2 b/man/man2/futex.2 index fe4a239c3812c..1a7cb1b5e08c4 100644 --- a/man/man2/futex.2 +++ b/man/man2/futex.2 @@ -6,7 +6,7 @@ .\" .\" FIXME Still to integrate are some points from Torvald Riegel's mail of .\" 2015-01-23: -.\" https://lore.kernel.org/lkml/1422037788.29655.0.camel@triegel.csb +.\" https://lore.kernel.org/lkml/1422037145.27573.0.camel@triegel.csb .\" .\" FIXME Do we need to add some text regarding Torvald Riegel's 2015-01-2= 4 mail .\" https://lore.kernel.org/lkml/1422105142.29655.16.camel@triegel.c= sb --=20 2.51.0 From nobody Thu Oct 2 15:20:04 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 D357B31D74B; Mon, 15 Sep 2025 14:13:12 +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=1757945594; cv=none; b=Q3FGO/4r+50weACToRPqi01amR8CjVxMCbDIe8w9jvaFZEnmPj6ykzBQwgDzWHi5vs82a6IAHMLh/OKvWU0q8CwzdfRYfQ8Nqc7pfey9liQP33GVX1B3Z8lo9sN0bI58GpRAXcQxm0nCsxbEK6rMymsyY67Sv5GcuKAmIV3pH6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945594; c=relaxed/simple; bh=5Rn9dwSGcgqmXesGq3sO7tJZTHE0jfoqufhzztrn+Ts=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n3Zx2DULNj4qnzhNMn8YhiPt6q+C7PG7JGkr4cNFae0t6QrUmLcXvUOJstJsx6TDaAPTIIDQgRHlncN6BEOc65bclDY+Pou8n0NeWET+PIubsueWbRA0+iM+8IJeQHC8l6ROHCqIfdFAzZvJZBUu/cpcCnsDLyu5QJlhsf+szzc= 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=xD2Qj/9n; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DTGgEAgG; 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="xD2Qj/9n"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DTGgEAgG" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757945589; 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=5Rn9dwSGcgqmXesGq3sO7tJZTHE0jfoqufhzztrn+Ts=; b=xD2Qj/9nhStiXalG126MRVIH+H7mtNx9+9dXlZxaUYv/oDGZumZf1gyA8GGVg/tWYOCNse GohE00tI9RCXjC4ivukgM2K2C/QJlD9NUiAIPKyY02/qn+pcxCMgVs5ihvuhJYhaAlcoLm bYMrij7HrY3N6gYi0GHWYEYwf4oDiY1CI88mW9EOIiIarZFhNr0CV+dqnKtNdx3n75rs9K 8UW80dxQbllrwQy0vpNYYdRjNsWqlDldeOJ29jVuSOipjiO3/JZXMsat3Gb9W618sscNmY lnPxD5naFIu7MkLdGoknhTIpdkaDYjvLY3aBDmJChKDrMdCoukPl4irvgSbetA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757945589; 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=5Rn9dwSGcgqmXesGq3sO7tJZTHE0jfoqufhzztrn+Ts=; b=DTGgEAgG/FVG5heWi2lR5XJ44ZUhLlmTbbaY+tsqTsppBjxcbKDLLvYwHErFKdMeKXVc7A H0+10gTm92PZJtCQ== 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 v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage Date: Mon, 15 Sep 2025 16:13:05 +0200 Message-ID: <20250915141305.906440-6-bigeasy@linutronix.de> In-Reply-To: <20250915141305.906440-1-bigeasy@linutronix.de> References: <20250915141305.906440-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 "old" implementation led to priority inversion and was more or less easy to trigger. It seems that after the rewrite the issue disappeared especially since the old workaround does not apply anymore. Add a note mentioning the old problem and why the issue is not gone since the rewrite in glibc 2.25 but harder to trigger. Signed-off-by: Sebastian Andrzej Siewior --- man/man3/pthread_cond_init.3 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/man/man3/pthread_cond_init.3 b/man/man3/pthread_cond_init.3 index 0045e7ecee075..779f6de6d064b 100644 --- a/man/man3/pthread_cond_init.3 +++ b/man/man3/pthread_cond_init.3 @@ -115,6 +115,7 @@ if all threads always acquire the mutex before signalin= g the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable. +See NOTES below. .P .BR pthread_cond_timedwait () atomically unlocks @@ -240,6 +241,26 @@ Some threads are currently waiting on .BR gettimeofday (2), .BR nanosleep (2). . +.SH NOTES +The implementation of the provided functions until +glibc 2.25 used an internal data lock. +This lock did not support priority-inheritance and +was subject to unbounded priority inversion, +visible on a real-time system. +After the rewrite of the implementation in 2.25 +the usage of internal lock changed. +The internal lock is always acquired by +the signaling functions +.BR pthread_cond_signal () +and +.BR pthread_cond_broadcast (). +The waiting function acquires the lock +if the waiting process was interrupted. +The interruption can be caused for instance by a specified timeout +and denoted by the error value +.B ETIMEDOUT +or a received signal which is denoted by the error value +.BR EINTR . . .SH EXAMPLE Consider two shared variables --=20 2.51.0