Skip to contentSkip to conversation

irqbalance+O(1)-sched

DISCUSSION J.A. Magallon 2 participants 3 messages May 7, 2002

lore
Share & tools
lore
#0 lore raw

Hi all...

I am trying to mix the irqbalance patch on top of the O1-scheduler to use it on a dual P4 box.

Everything mix easy but this piece of code in irqbalance:

int idle_cpu(int cpu)
{
return cpu_curr(cpu) == idle_task(cpu);
}

2.4.18 defines it as

sched.c:#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
...
sched.c:#define idle_task(cpu) (&init_task)

but O1 kills it.

Any syggestion on hwo to implement idle_cpu() on top of O1 ?

Thanks

Signature · 4 lines
J.A. Magallon                           #  Let the source be with you...        
mailto:[email protected]
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre8-jam1 #1 SMP mar may 7 01:51:45 CEST 2002 i686
#1 lore raw
Quoted 11 lines · J.A. Magallon

Everything mix easy but this piece of code in irqbalance:
int idle_cpu(int cpu)

{
   return cpu_curr(cpu) == idle_task(cpu);
}

2.4.18 defines it as
sched.c:#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
...
sched.c:#define idle_task(cpu) (&init_task)
but O1 kills it.
Any syggestion on hwo to implement idle_cpu() on top of O1 ?

int idle_cpu(int cpu)

{
	return cpu_curr(cpu) == cpu_rq(cpu)->idle;
}

Cheers,
Bill

#2 lore raw
In reply to J.A. Magallon
Quoted 7 lines · J.A. Magallon

I am trying to mix the irqbalance patch on top of the O1-scheduler to use it on a dual P4 box.
Everything mix easy but this piece of code in irqbalance:
int idle_cpu(int cpu)

{
   return cpu_curr(cpu) == idle_task(cpu);
}
Quoted 6 lines

2.4.18 defines it as
sched.c:#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
...
sched.c:#define idle_task(cpu) (&init_task)
but O1 kills it.
Any syggestion on hwo to implement idle_cpu() on top of O1 ?

Another quick one might be

#define idle_task(cpu) (cpu_rq(cpu)->idle)

which leaves idle_cpu() unchanged.

Cheers,
Bill