Put up the work-in-progress version of the aib-B1 patch. The patch is by Con Kolivas and me. I supplied the percpu variables and list handling, and Con hooked it into the relevant points in the scheduler.
The purpose is to make the scheduler smarter when choosing which idle CPU to put a new task on, by keeping track of which CPU has been idle longest. This is a work in progress, Con is benchmarking it now, and we are thinking about a bit-field version that should be faster (although I’m concerned about possible contention).
Cool
Yay SMP.
Comment by moshez — December 11, 2003 @ 4:54 AM |
Couldn’t all_cpus_busy be MAXINT instead of NRCPU+1? I’m not sure it matters, but it looks to be a value which is just as good 🙂
Also, what is that #if 1 there? Just to enable easy debugging? Was it supposed to be #if DEBUG or something?
Your code is confusing me!
Comment by moshez — December 11, 2003 @ 10:20 AM |
actually, MAX_INT is not a good value, because it’s an unsigned long. I would go with ~0UL.
That #if 1 is indeed for debugging. That bit of code causes the boot sequence to get stuck on two machines. By turning the #if 1 to #if 0 and vice versa, I verifed that it’s this bit of code that is the culprit.
Sorry if you got confused, it’s work in progress 😉
Comment by mulix — December 11, 2003 @ 11:23 AM |
It’s OK!
I just decided that once in my life, I should actually try reading and understanding a kernel patch 🙂
Comment by moshez — December 11, 2003 @ 12:27 PM