Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2008 05:41:34 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185047 - head/sys/kern
Message-ID:  <200811180541.mAI5fYw1068797@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Nov 18 05:41:34 2008
New Revision: 185047
URL: http://svn.freebsd.org/changeset/base/185047

Log:
  When checking to see if another CPU is running its idle thread, examine
  the thread running on the other CPU instead of the thread being placed on
  the run queue.
  
  Reported by:	Ravi Murty @ Intel
  Reviewed by:	jeff

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c	Tue Nov 18 04:04:01 2008	(r185046)
+++ head/sys/kern/sched_ule.c	Tue Nov 18 05:41:34 2008	(r185047)
@@ -946,7 +946,7 @@ tdq_idled(struct tdq *tdq)
 static void
 tdq_notify(struct tdq *tdq, struct thread *td)
 {
-	int cpri;
+	struct thread *ctd;
 	int pri;
 	int cpu;
 
@@ -954,10 +954,10 @@ tdq_notify(struct tdq *tdq, struct threa
 		return;
 	cpu = td->td_sched->ts_cpu;
 	pri = td->td_priority;
-	cpri = pcpu_find(cpu)->pc_curthread->td_priority;
-	if (!sched_shouldpreempt(pri, cpri, 1))
+	ctd = pcpu_find(cpu)->pc_curthread;
+	if (!sched_shouldpreempt(pri, ctd->td_priority, 1))
 		return;
-	if (TD_IS_IDLETHREAD(td)) {
+	if (TD_IS_IDLETHREAD(ctd)) {
 		/*
 		 * If the idle thread is still 'running' it's probably
 		 * waiting on us to release the tdq spinlock already.  No



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811180541.mAI5fYw1068797>