The branch main has been updated by mchoo: URL: https://cgit.FreeBSD.org/src/commit/?id=039498c2735ee0697da24b9c60c9e67680f91f31
commit 039498c2735ee0697da24b9c60c9e67680f91f31 Author: Minsoo Choo <[email protected]> AuthorDate: 2026-08-24 02:25:36 +0000 Commit: Minsoo Choo <[email protected]> CommitDate: 2026-09-18 14:14:13 +0000 sched_4bsd: move comment to correct location Reviewed by: olce Approved by: olce (mentor) MFC after: 2 weeks Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59403 --- sys/kern/sched_4bsd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index a77099296463..2f6719f4a58e 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -503,11 +503,6 @@ schedcpu(void) * ts_pctcpu is only for ps and ttyinfo(). */ ts->ts_pctcpu = (ts->ts_pctcpu * ccpu) >> FSHIFT; - /* - * If the td_sched has been idle the entire second, - * stop recalculating its priority until - * it wakes up. - */ if (ts->ts_cpticks != 0) { #if (FSHIFT >= CCPU_SHIFT) ts->ts_pctcpu += (realstathz == 100) @@ -543,6 +538,12 @@ schedcpu(void) ts->ts_slptime = 0; } else ts->ts_slptime++; + + /* + * If the td_sched has been idle the entire second, + * stop recalculating its priority until + * it wakes up. + */ if (ts->ts_slptime > 1) { thread_unlock(td); continue;
