Submit #2787
closed[PATCH] kernel -- Remove unused hogticks global from kern_synch.c
0%
Description
hogticks was a global definition used in kern_synch.c:should_yield().
A thread that had remained running for more than hogticks would
return true for should_yield(). DragonFly has not used this global
for a long time.
---
sys/kern/kern_synch.c | 4 ----
sys/sys/proc.h | 1 )
2 files changed, 5 deletions(
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 9285e2a..6fd5434 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c@ -66,7 +66,6
@ TAILQ_HEAD(tslpque, thread);
static void sched_setup (void *dummy);
SYSINIT
int hogticks; hogticks = 2 * sched_quantum;
int lbolt;
void lbolt_syncer;
int sched_quantum; / Roundrobin scheduling quantum in ticks. */@ -128,7 +127,6
@ sysctl_kern_quantum(SYSCTL_HANDLER_ARGS)
if (new_val < ustick)
return (EINVAL);
sched_quantum = new_val / ustick;
return (0);
}
@ -326,8 +324,6
@ sleep_gdinit(globaldata_t gd)
if (gd->gd_cpuid == 0) {
sched_quantum = (hz + 24) / 25;
- hogticks = 2 * sched_quantum;
gd>gd_tsleep_hash = slpque_cpu0;
} else {
gd->gd_tsleep_hash = kmalloc(sizeof(slpque_cpu0),
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index fe239b3..c326be5 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@ -498,7 +498,6
@ extern void stopevent(struct proc*, unsigned int, unsigned int);
extern struct proc proc0; /* Process slot for swapper. /
extern struct lwp lwp0; / LWP slot for swapper. /
extern struct thread thread0; / Thread slot for swapper. /
extern int hogticks; / Limit on kernel cpu hogs. /
extern int nprocs, maxproc; / Current and max number of procs. /
extern int maxprocperuid; / Max procs per uid. /
extern int sched_quantum; / Scheduling quantum in ticks */
-
2.1.0
Updated by swildner over 9 years ago
- Status changed from New to Closed
Thanks, pushed (916e1a45d2e42d27f761da5c39e1c23d53624f14)