Re: oopsen with rc3-aa3

Andrea Arcangeli (andrea@suse.de)
Tue, 30 Jul 2002 01:44:33 +0200


On Tue, Jul 30, 2002 at 01:12:03AM +0200, J.A. Magallon wrote:
> But -rc3-jam3 bombed on the dual-p4xeon box, but works on a PIII laptop.

I decored the oops and in short rq_target->idle is NULL, so then
resched_task bugs out while reading p->need_resched.

it's the hyperthreading support that bugs out infact.

I had a look and this should fix it (the first one is just a theorical
bug, since it's under an ifdef i386 cpu_number_map is an identity, the
++ thing was the reason I think). Can you test it?

--- 2.4.19rc3aa3/kernel/sched.c.~1~ Sun Jul 28 18:12:19 2002
+++ 2.4.19rc3aa3/kernel/sched.c Tue Jul 30 01:42:08 2002
@@ -490,7 +490,7 @@ static inline void pull_task(runqueue_t
*/
static inline int find_idle_package(int this_cpu)
{
- int i = this_cpu + 1;
+ int i = cpu_number_map(this_cpu) + 1;

if (i == smp_num_cpus)
i = 0;
@@ -500,7 +500,7 @@ static inline int find_idle_package(int
physical = cpu_logical_map(i);
sibling = cpu_sibling_map[physical];

- if (i++ == smp_num_cpus)
+ if (++i == smp_num_cpus)
i = 0;
if (idle_cpu(physical) && idle_cpu(sibling))
return physical;

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/