Preemptive scheduling of woken-up processes

kumon
2000-11-04T05:55:59Z

The current schduler has a problem handling waken up processes.

In the current kernel woken up processes probably try to preempt CPU
from the currently running process.

That is the fundamental reason of the negative scalability of Apache
on a large SMP system, which has been reported already.
The modification of scheduler is introduced between test8 and test9.
So, test9 owes two problems for the Apache performance.
One for flock, another for scheduler.

Detailed Description:

When a process releases the semaphore, it wakes up the slept process
through wake_up_process(). Then, schedule_idle() has the final duty.

In the current scheduler logic, the woken up process may preempt CPU
from the current process if the goodness tells to do so. This is done
even if there are lots of idle CPUs. This severy disables parallel
execution on a MP system. The previously runnning process is runnable
but wating on run queue until the next scheduling timing, which
possibly is few milliseconds later.

# We've not yet proved above senario by experimentation. We'll do in
# next week if it is needed.

I think this scheduling policy is bad for MP systems.
Basically, the waken up process should run on the previous CPU ,
or, should run on an idle CPU.
This policy has been adopted in test8, and that is better, I think.

# Sorry to whom get this mail twice. I mistook LK-ML address.

--
Computer Systems Laboratory, Fujitsu Labs.
kumon@flab.fujitsu.co.jp