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
This commit is contained in:
parent
7f792cd758
commit
02f0ff6d92
@ -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 thread *td)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user