From nobody Tue Nov 10 22:20:39 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 4jPLh761Zjz6xnPd for ; Tue, 10 Nov 2026 22:20:39 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jPLh73c38z4W45 for ; Tue, 10 Nov 2026 22:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794349239; 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=/Jv6OG4St6lZttochGQ57AgTKaG5NxNthAzM8IdeTxQ=; b=TAm67WWuVf9o7kquDzMTmdnSI86UXwdp9JMvJs8TqJ0NZV2FzypAVBSl40NbPpRCLs8njn F5ZutIhG4M5pSWDZQ1MdimtUQ6YfHstjP0hNeWvfqOMuz61NQ3sfwGXWKlWbXes8AivLeo DmaQl8fkxYcQVJIDvtBuUmViaTZ2M/+iJYa6xypJUvVNI9rv4anxg0A0J4eStGQClbacRt YgbXYzHtPBLv946SeiMt8Pgu7nTJDF9RVNTTZCLkrlhyMtewcgtLoTKd1pQKifU9z0mKYS 9xGZ/79uJxthT+/CLdGJnRyHlG8pr3bfk47+9ZYE/2M+3j3wAZWO38Mm2hlTdw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794349239; b=qnTTEEbL/X4h6ykMWENKMp5yk2UwFP0lLXXObGxEsL5EDzbfJo75/iUV8aqgLwRbhco91C m0DHLBW3hD7wDLzPGhW3jau0EgHwy5XgFT+RHlJQEhEg2dUALrjnxXn/Tv7oQy2t+2qZvl aB0s5JkndIdUZl7eV/6E+AqEaZQeIawPq+WT8IC2Rd9F/D5J1hvotgN+At9/8uOWAvSCAt 7itUL4yq6NYxj98r9xaJJiaFMCxjmEz0CWGiKL20ZO5g8y1n+9kPf9R4bYIX15WFC0ZHIi EPQ/MeDOOdGVHHYauNimMLuGZImilY8XsUULTTuOHZlH8quVN7uTpF3kLf2Gug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794349239; 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=/Jv6OG4St6lZttochGQ57AgTKaG5NxNthAzM8IdeTxQ=; b=oafvKq21gqHqga4xLp9VCxw6EheSNd3YvbMz/PoNwG028zjgvSpYp7B11sDLpTHlLPYfJX mCjt7Yipu9NiYiybyBiJmdkB2fyJGfKjvMh+KvlPkrzPoZ+1XoA2mnB7NTstBdkqTGzW// 5pxdMHPNzKVZVQIC9Him+LUhbXw7xN5PNs0Xz3JWMseoXxH4KSuev7RVaXoiOBAFy2YpYg bJ8w5+/oINH4agzmhWJnLkO+x7kRklgopDjS78eOhw2n4NXZN/yl7eu+zN3CPBjqL+IyR2 VMqfahuOws5LCY9Qp11t0qpm1s14g3IzLXk5JK1kRYOsd9UqIbyaTrU86+quew== 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 4jPLh72yrzznJP for ; Tue, 10 Nov 2026 22:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f9ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Nov 2026 22:20:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Minsoo Choo Subject: git: be25f6d75d26 - main - sched_4bsd.4: sync current scheduler sysctls List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: be25f6d75d26e233ae7501a76d79fe4898c48e40 Auto-Submitted: auto-generated Date: Tue, 10 Nov 2026 22:20:39 +0000 Message-Id: <6af398b7.f9ef.1cd83bd0@gitrepo.freebsd.org> The branch main has been updated by mchoo: URL: https://cgit.FreeBSD.org/src/commit/?id=be25f6d75d26e233ae7501a76d79fe4898c48e40 commit be25f6d75d26e233ae7501a76d79fe4898c48e40 Author: Minsoo Choo AuthorDate: 2026-09-25 15:43:57 +0000 Commit: Minsoo Choo CommitDate: 2026-11-10 22:18:49 +0000 sched_4bsd.4: sync current scheduler sysctls Reviewed by: bcr, jhb, olce Approved by: jhb, olce (mentor) MFC after: 2 weeks Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D60002 --- share/man/man4/sched_4bsd.4 | 37 +++++++++++++++++++++---------------- sys/kern/sched_4bsd.c | 1 + 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/share/man/man4/sched_4bsd.4 b/share/man/man4/sched_4bsd.4 index 1f0a637fdb83..5b7d36a75e79 100644 --- a/share/man/man4/sched_4bsd.4 +++ b/share/man/man4/sched_4bsd.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 25, 2026 +.Dd November 10, 2026 .Dt SCHED_4BSD 4 .Os .Sh NAME @@ -43,23 +43,28 @@ Common scheduler sysctls are documented in The following sysctls are relevant to the operation of .Nm : .Bl -tag -width indent -.It Va kern.sched.name -This read-only sysctl reports the name of the active scheduler. -.It Va kern.sched.quantum -This read-write sysctl reports or sets the length of the quantum (in -micro-seconds) granted to a thread. -.It Va kern.sched.ipiwakeup.enabled -This read-write sysctl sets whether or not the scheduler will generate an -inter-processor interrupt (IPI) to an idle CPU when a thread is woken up. -Otherwise, idle CPUs will wait until the next clock tick before looking for -new work. -.It Va kern.sched.preemption -This read-only sysctl reports whether or not the kernel is configured to -support preemption, which reduces the latency to run lower priority threads -on wakeup. +.It Va kern.sched.4bsd.quantum +The length of the timeshare quantum in microseconds. +.It Va kern.sched.4bsd.slice +The length of the timeshare quantum in statclock ticks. .El .Pp -Some sysctls will be available only on systems supporting SMP. +The following sysctls are available only on SMP systems: +.Bl -tag -width indent +.It Va kern.sched.4bsd.runq_fuzz +The number of threads to examine in the highest-priority queue in search for a +thread that last ran on the current CPU. +If no such thread exists, the first thread is chosen. +Negative values and 0 are treated like 1 (the default), i.e., the first thread +in queue is always chosen. +.It Va kern.sched.4bsd.ipiwakeup.enabled +Whether to send an inter-processor interrupt (IPI) to an idle CPU when a +thread is woken up. +.It Va kern.sched.4bsd.ipiwakeup.usemask +Whether to use the mask of idle CPUs when forwarding wakeups. +.It Va kern.sched.4bsd.ipiwakeup.useloop +Whether to search for idle CPUs in a loop when forwarding wakeups. +.El .Sh SEE ALSO .Xr scheduler 4 , .Xr sysctl 8 diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index fc06ad8f5e1b..de676de9e0e4 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -240,6 +240,7 @@ sysctl_kern_slice(SYSCTL_HANDLER_ARGS) return (0); } +/* NOTE: Please keep sched_4bsd.4 in sync with sysctl knobs defined here. */ SYSCTL_NODE(_kern_sched, OID_AUTO, 4bsd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "4BSD Scheduler");