Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2025 13:31:38 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 00c1b4fac2ab - stable/14 - sched_4bsd: Remove RQ_PPQ from ESTCPULIM()'s formula
Message-ID:  <202507281331.56SDVcLj082115@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch stable/14 has been updated by olce:

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

commit 00c1b4fac2ab709b0e0c77007d47c85e0bf36095
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-05-21 12:26:25 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-07-28 13:28:42 +0000

    sched_4bsd: Remove RQ_PPQ from ESTCPULIM()'s formula
    
    Substracting RQ_PPQ to the maximum number of allowed priority values
    (the factor to INVERSE_ESTCPU_WEIGHT) has the effect of pessimizing the
    number of processes assigned to the last priority bucket.
    
    MFC after:      1 month
    Event:          Kitchener-Waterloo Hackathon 202506
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D45392
    
    (cherry picked from commit 51a4ae05abe6e170de0ff82641d8fce19043eea9)
---
 sys/kern/sched_4bsd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 4cf5ec054d1c..e9d180fde303 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -79,9 +79,9 @@ dtrace_vtime_switch_func_t	dtrace_vtime_switch_func;
 #define	INVERSE_ESTCPU_WEIGHT	8	/* 1 / (priorities per estcpu level). */
 #endif
 #define	NICE_WEIGHT		1	/* Priorities per nice level. */
-#define	ESTCPULIM(e) \
-    min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \
-    RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1)
+#define	ESTCPULIM(e)							\
+	min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN)) \
+	    + INVERSE_ESTCPU_WEIGHT - 1)
 
 #define	TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX)))
 



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