When IPC semaphores are used in a bulk post and wait system, we
can end up waking a very large number of processes per semtimedop call.
At least one major database will use a single process to kick hundreds
of other processes at a time.
This patch tries to reduce the runqueue lock contention by ordering the
wakeups based on the CPU the waiting process was on when it went to
sleep.
A later patch could add some code in the scheduler to help
wake these up in bulk and take the various runqueue locks less often.
Signed-off-by: Chris Mason <chris.mason@oracle.com>