From 916e1a45d2e42d27f761da5c39e1c23d53624f14 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 28 Feb 2015 12:33:07 +0100 Subject: [PATCH] kernel: Remove unused hogticks global from kern_synch.c. 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. Submitted-by: vsrinivas Dragonfly-bug: --- 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 59aa363db3..7305ee894e 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -67,7 +67,6 @@ TAILQ_HEAD(tslpque, thread); static void sched_setup (void *dummy); SYSINIT(sched_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, sched_setup, NULL) -int hogticks; int lbolt; void *lbolt_syncer; int sched_quantum; /* Roundrobin scheduling quantum in ticks. */ @@ -129,7 +128,6 @@ sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) if (new_val < ustick) return (EINVAL); sched_quantum = new_val / ustick; - hogticks = 2 * sched_quantum; return (0); } @@ -327,8 +325,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 fe239b3848..c326be5c0e 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.41.0