[DragonFlyBSD - Submit #2787] (New) [PATCH] kernel -- Remove unused hogticks global from kern_synch.c

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Thu Feb 12 02:55:25 PST 2015


Issue #2787 has been reported by vsrinivas.

----------------------------------------
Submit #2787: [PATCH] kernel -- Remove unused hogticks global from kern_synch.c
http://bugs.dragonflybsd.org/issues/2787

* Author: vsrinivas
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
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(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. */
@@ -128,7 +127,6 @@ sysctl_kern_quantum(SYSCTL_HANDLER_ARGS)
  	if (new_val < ustick)
  		return (EINVAL);
  	sched_quantum = new_val / ustick;
-	hogticks = 2 * sched_quantum;
  	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



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list