Now that alpha no longer sets schedhz, schedhz is a dead variable.
Remove it.
For now, leave the schedclock() call in place in statclock(). It
still runs at its default rate of (stathz / 4).
Part of mpi@'s WIP scheduler patch. Suggested by mpi@.
Thread: https://marc.info/?l=openbsd-tech&m=
169419781317781&w=2
ok mpi@
-/* $OpenBSD: kern_clock.c,v 1.115 2023/08/23 01:55:45 cheloha Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.116 2023/09/09 18:19:03 cheloha Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
*/
int stathz;
-int schedhz;
int profhz;
int profprocs;
int ticks = INT_MAX - (15 * 60 * HZ);
if (p != NULL) {
p->p_cpticks++;
/*
- * If no schedclock is provided, call it here at ~~12-25 Hz;
- * ~~16 Hz is best
+ * schedclock() runs every fourth statclock().
*/
- if (schedhz == 0) {
- if ((++spc->spc_schedticks & 3) == 0)
- schedclock(p);
- }
+ if ((++spc->spc_schedticks & 3) == 0)
+ schedclock(p);
}
}
-/* $OpenBSD: sched.h,v 1.61 2023/08/11 22:02:50 cheloha Exp $ */
+/* $OpenBSD: sched.h,v 1.62 2023/09/09 18:19:03 cheloha Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
#define ESTCPULIM(e) min((e), NICE_WEIGHT * PRIO_MAX - SCHED_PPQ)
extern uint32_t roundrobin_period;
-extern int schedhz; /* ideally: 16 */
struct proc;
void schedclock(struct proc *);