git: 01f165c68103 - main - sched/lapic: remove sched_do_timer_accounting()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Jul 2026 19:40:51 UTC
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=01f165c68103df22cebe26d410c1d4a0e5fae377
commit 01f165c68103df22cebe26d410c1d4a0e5fae377
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2026-07-13 19:15:38 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-07-13 19:40:43 +0000
sched/lapic: remove sched_do_timer_accounting()
The check is always true, especially after the removal of hlt_cpus_mask
from sched_4bsd.
Reviewed by: olce, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58159
---
sys/kern/sched_4bsd.c | 7 -------
sys/kern/sched_shim.c | 1 -
sys/kern/sched_ule.c | 7 -------
sys/sys/sched.h | 3 ---
sys/x86/x86/local_apic.c | 3 ---
5 files changed, 21 deletions(-)
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 043a4d291c9f..53e32026029d 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -1822,12 +1822,6 @@ sched_4bsd_affinity(struct thread *td)
#endif
}
-static bool
-sched_4bsd_do_timer_accounting(void)
-{
- return (true);
-}
-
static int
sched_4bsd_find_l2_neighbor(int cpu)
{
@@ -1876,7 +1870,6 @@ struct sched_instance sched_4bsd_instance = {
SLOT(sizeof_thread),
SLOT(tdname),
SLOT(clear_tdname),
- SLOT(do_timer_accounting),
SLOT(find_l2_neighbor),
SLOT(init),
SLOT(init_ap),
diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c
index 6f0473084704..2ff97a5774e1 100644
--- a/sys/kern/sched_shim.c
+++ b/sys/kern/sched_shim.c
@@ -85,7 +85,6 @@ DEFINE_SHIM0(sizeof_proc, int, sched_sizeof_proc)
DEFINE_SHIM0(sizeof_thread, int, sched_sizeof_thread)
DEFINE_SHIM1(tdname, char *, sched_tdname, struct thread *, td)
DEFINE_SHIM1(clear_tdname, void, sched_clear_tdname, struct thread *, td)
-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)
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index eb00072b5012..cf0baabfda86 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -3321,12 +3321,6 @@ sched_ule_schedcpu(void)
{
}
-static bool
-sched_ule_do_timer_accounting(void)
-{
- return (true);
-}
-
#ifdef SMP
static int
sched_ule_find_child_with_core(int cpu, struct cpu_group *grp)
@@ -3436,7 +3430,6 @@ struct sched_instance sched_ule_instance = {
SLOT(sizeof_thread),
SLOT(tdname),
SLOT(clear_tdname),
- SLOT(do_timer_accounting),
SLOT(find_l2_neighbor),
SLOT(init),
SLOT(init_ap),
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index c7b7b849947c..a7519f988762 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -263,8 +263,6 @@ void schedinit(void);
*/
void schedinit_ap(void);
-bool sched_do_timer_accounting(void);
-
/*
* Find an L2 neighbor of the given CPU or return -1 if none found. This
* does not distinguish among multiple L2 neighbors if the given CPU has
@@ -313,7 +311,6 @@ struct sched_instance {
int (*sizeof_thread)(void);
char *(*tdname)(struct thread *td);
void (*clear_tdname)(struct thread *td);
- bool (*do_timer_accounting)(void);
int (*find_l2_neighbor)(int cpuid);
void (*init)(void);
void (*init_ap)(void);
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index aceb9a229c4f..daac99fad753 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -1478,9 +1478,6 @@ lapic_handle_timer(struct trapframe *frame)
kmsan_mark(frame, sizeof(*frame), KMSAN_STATE_INITED);
trap_check_kstack();
- if (!sched_do_timer_accounting())
- return;
-
/* Look up our local APIC structure for the tick counters. */
la = &lapics[PCPU_GET(apic_id)];
(*la->la_timer_count)++;