From nobody Fri Sep 18 14:14:54 2026 X-Original-To: dev-commits-src-all@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 4hmZQ720dZz6sWrV for ; Fri, 18 Sep 2026 14:14:55 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hmZQ665LGz4jWK for ; Fri, 18 Sep 2026 14:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789740894; 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=EOM8H7j6EwLRiSKX9/JzWGU3UhDKP7OnI4LVNrLnlAc=; b=ZXgiqir0lTKGeq1Kn7llmpsISB5L4SfsSY7Oa6gqv7k4RSpfq9v+EDIR0Wo3riTVaK7Ukt 36fEqVsmh01LB7s65ZT93CJSc7umeXIRzv73xnPrpGNOCRnH/wT6qB+PJt1JlU3b9tLSJS vbB3Gcmaw+Psov8DDQ7MOgxs+tLzjuYLlN9JopC5SbFspdZsmMEmwUtegFT0JnMsOJC0Jh PdCjlISLCp7weZXBiyLIqT//dXmuT1H3GuIwvwpW+2Kf7IrN/CT/EnlMaAeszELskxckHT h9kIr5JuNths9nsIC707hYyMcmHuO0jhwo8EuRB70FSBjQurBevneL48nsK/YQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789740894; b=Nn9TxLkgefeVYryj5cyD/namV/a5atw7zJjB+Uhrwueb8SvuH7VOP3BT26wbtq9/DkWoqn TdSk80uGe7oghfy3RkDy03TMJGEd7MxXo2r3HvLN1o1uf7880U1AvsUtCbrUXGv/ARuru2 Tqqt+fBs7vl+b9XRDCnt7w4qvOXrT1M46Vfd+mi1A6iA3+T5kkGaCLEkkMklVD6ugKn/Uk nfmcDWMqm0DU/RzVFpGlpu+tel2svUKGj+KwPXK55hicz2vc4P+URyiUT9o+Jl4wqT/GKK F/rBKcvOPhSTVfiO+ExReRDyEwV1ITZN6QbSZqOtSq/WifKeuEwfBZToh9ns+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789740894; 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=EOM8H7j6EwLRiSKX9/JzWGU3UhDKP7OnI4LVNrLnlAc=; b=Xd8isISJF7sb2bGyr98UNRhIpTioQhm6G1vne2Y0atg1A1b94+morNuqYE844qsBmmSOXu 4Ct93M2F0nZZMtZcq70oOHrJl8OySRLWm5jOyE7POX28HwI4jIbUSI4xvtADsPbrPGUBsY CuGhdnqd952Qjbe8A3wkDp4/2fgVpb97h9J0x+YhYV21Dig6ggSidWSrYjUmZIgAXEbHMq IgrgoIRl/nC6Uc5rU1sp5q6ehyZRMEz3JdoSS0X6yHEaIvOJO3DBLGgGgz2Z3WcR3yNtfu yWNEv9oyFutTi5ODAdsKGtjSKdY6yuzuxilGuMFdxI1a9JVbgkc3gV5cP9hL3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hmZQ643qLzM27 for ; Fri, 18 Sep 2026 14:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43cd5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 14:14:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Minsoo Choo Subject: git: 039498c2735e - main - sched_4bsd: move comment to correct location List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mchoo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 039498c2735ee0697da24b9c60c9e67680f91f31 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 14:14:54 +0000 Message-Id: <6aad475e.43cd5.6d470fe6@gitrepo.freebsd.org> The branch main has been updated by mchoo: URL: https://cgit.FreeBSD.org/src/commit/?id=039498c2735ee0697da24b9c60c9e67680f91f31 commit 039498c2735ee0697da24b9c60c9e67680f91f31 Author: Minsoo Choo AuthorDate: 2026-08-24 02:25:36 +0000 Commit: Minsoo Choo 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;