The branch stable/14 has been updated by olce:

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

commit 32766dde5bc35b4fd47550fb6cdf2ff745528773
Author:     Olivier Certner <o...@freebsd.org>
AuthorDate: 2024-05-21 11:59:40 +0000
Commit:     Olivier Certner <o...@freebsd.org>
CommitDate: 2025-07-28 13:28:41 +0000

    sched_4bsd: Move ESTCPULIM() after its macro dependencies
    
    No functional change (intended).
    
    Also makes the comment about INVERSE_ESTCPU_WEIGHT() adjacent to its
    definition.
    
    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 a454ff6b0440ec1a8e6b5c8154ad22c32df13c51)
---
 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 c204e4a5676e..4cf5ec054d1c 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -73,15 +73,15 @@ dtrace_vtime_switch_func_t  dtrace_vtime_switch_func;
  * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in
  * the range 100-256 Hz (approximately).
  */
-#define        ESTCPULIM(e) \
-    min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \
-    RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1)
 #ifdef SMP
 #define        INVERSE_ESTCPU_WEIGHT   (8 * smp_cpus)
 #else
 #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        TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + 
sizeof(__XSTRING(UINT_MAX)))
 

Reply via email to