Skip to content

Commit

Permalink
kernel: Remove unused hogticks global from kern_synch.c.
Browse files Browse the repository at this point in the history
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: <https://bugs.dragonflybsd.org/issues/2787>
  • Loading branch information
Sascha Wildner committed Feb 28, 2015
1 parent 5205d08 commit 916e1a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions sys/kern/kern_synch.c
Expand Up @@ -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. */
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion sys/sys/proc.h
Expand Up @@ -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 */
Expand Down

0 comments on commit 916e1a4

Please sign in to comment.