git: 51a4ae05abe6 - main - sched_4bsd: Remove RQ_PPQ from ESTCPULIM()'s formula
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Jun 2025 02:13:38 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=51a4ae05abe6e170de0ff82641d8fce19043eea9
commit 51a4ae05abe6e170de0ff82641d8fce19043eea9
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-05-21 12:26:25 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-06-18 02:09:38 +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
---
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 c7b55e6ca07a..e7f61eb6ed63 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)))