Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2025 02:13:26 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: af8de65ef23e - main - runq: Switch to 256 levels
Message-ID:  <202506180213.55I2DQGW024508@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=af8de65ef23e7e447916370851f39aea3f74e16a

commit af8de65ef23e7e447916370851f39aea3f74e16a
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-05-14 12:36:33 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-06-18 02:08:03 +0000

    runq: Switch to 256 levels
    
    This increases the number of levels from 64 to 256, which coincides with
    the distinct internal priority values (priority is currently encoded in
    a 'u_char', whose range is entirely used).
    
    With this change, we become POSIX-compliant for SCHED_FIFO/SCHED_RR in
    that we really provide 32 distinct priority levels for these policies.
    Previously, threads in the same "priority group", with priority groups
    defined as the threads in consecutive spans of 4 priority levels
    starting with level 0 up to 31 (so there are 8 groups), could not
    preempt or be preempted by each other even if they were assigned
    different priority levels.
    
    See also commit "sched_ule: Use a single runqueue per CPU" for all the
    drawbacks that this change also removes.
    
    MFC after:      1 month
    Event:          Kitchener-Waterloo Hackathon 202506
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D45390
---
 sys/sys/runq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/runq.h b/sys/sys/runq.h
index 5f415740099f..590463af192c 100644
--- a/sys/sys/runq.h
+++ b/sys/sys/runq.h
@@ -42,7 +42,7 @@
  */
 
 #define	RQ_MAX_PRIO	(255)	/* Maximum priority (minimum is 0). */
-#define	RQ_PPQ		(4)	/* Priorities per queue. */
+#define	RQ_PPQ		(1)	/* Priorities per queue. */
 
 /*
  * Deduced from the above parameters and machine ones.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506180213.55I2DQGW024508>