From nobody Wed Jun 18 02:13:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bMS2b5Qy1z5q6ps; Wed, 18 Jun 2025 02:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bMS2Z73dzz41rL; Wed, 18 Jun 2025 02:13:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750212807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VUi9Bv8WkR0Noh2i1boohhYuYQcnD6s4PIcRnp5pn5c=; b=P6FtSIxZt0DL1TnYfANUgcBQiZqqPfPA99zqp43RKfMXQht+3S+7T/zAafKYtmj7vsDniP jP10iHaQyhXO3NMEKdQk3A4tLtErEjn2V5pcbWfceydgU6yuBDAtmuIrKkmB6CFNHRKzmn QZj9T6wh9pezn/zBnvAHEdNmF2ZVQkLQcRhQcG/z18c4f86bPhGbOt9ZHfZ7loiVkPqLJc c96H1f2ny8ttURIyarGFulp/j1bme/9beXiSBICuQQIVGIfpPG66ESycsBBULt4nmsaqmJ z6BmAJpUJ12CK0dUpdxKXgX9SAEnKnI9fUlbdq39ciNLbeqEhMiOUkEuyUpVRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750212807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VUi9Bv8WkR0Noh2i1boohhYuYQcnD6s4PIcRnp5pn5c=; b=eL+ESguhTzK8XrlGQQKZrZ2h/f8GtLeF9lasdra+jkSZIWOF187kEmMvSfqX9HUKbNvCp9 HR2w53B3mI4QmUO3IayG5aHZ/ayKi13MTSKccLXesy2V8BGrfuqNn1X6nvHDV8tM/HSRkN hY74242qN5js7ggGfVvB5ajSpzMN9f/Djb3iW3gcKCGj9bT6imTapXo04KMEmH7Jn1R87w ICMRzRjs6tFohlv+HbFadMHEyllwf5937C8zVQLFm2CBM94HbxjB0QAP4yYMW2wXv56tuP Qdys2XTCi0ihqEJWtJs2v9s9El2NMESS3AOWKYqXpOASPiBYgKJQ7BXzCYezEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750212807; a=rsa-sha256; cv=none; b=V/ub97LWPU11AWiod+uOEXr6/f33BdVeuRNHoSVpPWlO53nTRwCmR9e3Izi/bjowkYbrbl rUXqF9h9BnDT7R7ULll/9LcRVuVJDV0rCCLLDHP5wt5voZFl0uQsoH40e0VA7jD+Tm6RPm kD0+lwHrs9op9QNtUq4IvlrbWoL2tRrtF1nEGSMgUI6eBiZpuNCFPdTonYTiNpf+1FGE19 FRex1KtlxKEDAl+EBn3lzCgKBdwSXEYtEESAdzaUuvXszr3S5JV1La7B/WSWbD1QIw5qTJ aNAOLkidtpYolqPGiNvIPy+lVQhR4EXoTer3xKv3bwym8k74xaOXFE60zkKtGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bMS2Z6ZTsz18SC; Wed, 18 Jun 2025 02:13:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55I2DQ93024511; Wed, 18 Jun 2025 02:13:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55I2DQGW024508; Wed, 18 Jun 2025 02:13:26 GMT (envelope-from git) Date: Wed, 18 Jun 2025 02:13:26 GMT Message-Id: <202506180213.55I2DQGW024508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: af8de65ef23e - main - runq: Switch to 256 levels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af8de65ef23e7e447916370851f39aea3f74e16a Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=af8de65ef23e7e447916370851f39aea3f74e16a commit af8de65ef23e7e447916370851f39aea3f74e16a Author: Olivier Certner AuthorDate: 2024-05-14 12:36:33 +0000 Commit: Olivier Certner 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.