Date: Wed, 11 Feb 2026 05:17:34 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 916cc3877e30 - stable/15 - kern/sched: move duplicate preemption stat vars into sched_shim.c Message-ID: <698c10ee.264c5.54b343fb@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=916cc3877e30a9828d98621ca38732e43d09c251 commit 916cc3877e30a9828d98621ca38732e43d09c251 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-01-24 06:01:48 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-02-11 05:12:37 +0000 kern/sched: move duplicate preemption stat vars into sched_shim.c (cherry picked from commit a84a39dfe5d1fd98afdf29a74017fce29441b730) --- sys/kern/sched_4bsd.c | 4 ---- sys/kern/sched_shim.c | 5 +++++ sys/kern/sched_ule.c | 4 ---- sys/sys/sched.h | 3 +++ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 4c24d98173f3..55a70885ee28 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -706,10 +706,6 @@ sched_4bsd_rr_interval(void) return (imax(1, (sched_slice * hz + realstathz / 2) / realstathz)); } -SCHED_STAT_DEFINE(ithread_demotions, "Interrupt thread priority demotions"); -SCHED_STAT_DEFINE(ithread_preemptions, - "Interrupt thread preemptions due to time-sharing"); - /* * We adjust the priority of the current process. The priority of a * process gets worse as it accumulates CPU time. The cpu usage diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c index f6b1285830fd..9d96c1a2d550 100644 --- a/sys/kern/sched_shim.c +++ b/sys/kern/sched_shim.c @@ -97,6 +97,11 @@ DEFINE_SHIM0(do_timer_accounting, bool, sched_do_timer_accounting) DEFINE_SHIM1(find_l2_neighbor, int, sched_find_l2_neighbor, int, cpu) DEFINE_SHIM0(init_ap, void, schedinit_ap) + +SCHED_STAT_DEFINE(ithread_demotions, "Interrupt thread priority demotions"); +SCHED_STAT_DEFINE(ithread_preemptions, + "Interrupt thread preemptions due to time-sharing"); + static char sched_name[32] = "ULE"; SET_DECLARE(sched_instance_set, struct sched_selection); diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 334b3c0f1de3..201d9c33dda7 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2693,10 +2693,6 @@ sched_ule_userret_slowpath(struct thread *td) thread_unlock(td); } -SCHED_STAT_DEFINE(ithread_demotions, "Interrupt thread priority demotions"); -SCHED_STAT_DEFINE(ithread_preemptions, - "Interrupt thread preemptions due to time-sharing"); - /* * Return time slice for a given thread. For ithreads this is * sched_slice. For other threads it is tdq_slice(tdq). diff --git a/sys/sys/sched.h b/sys/sys/sched.h index 3ba40fb191d3..bc8022084de3 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -231,6 +231,9 @@ SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## _add_proc, NULL); #define SCHED_STAT_INC(var) (void)0 #endif +SCHED_STAT_DECLARE(ithread_demotions); +SCHED_STAT_DECLARE(ithread_preemptions); + /* * Fixup scheduler state for proc0 and thread0 */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698c10ee.264c5.54b343fb>
