Messages in this thread | | | Date | Thu, 16 Dec 2010 12:45:57 -0800 | From | Frank Rowand <> | Subject | Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2 |
| |
On 12/16/10 11:42, Peter Zijlstra wrote: > On Thu, 2010-12-16 at 11:39 -0800, Frank Rowand wrote: >> select_task_rq() uses the smp_processor_id() of the old task_cpu(p) instead >> of the waking smp_processor_id(). > > So first you bounce the wakeup to the previous task cpu, when you do > select_task_rq() and then you bounce it to the new target?
Yes. (This is the answer when only the first patch is applied.)
The wakeup is bounced to the previous task cpu. The bounce adds extra overhead (including an IRQ on the previous task cpu) in return for a reduction in the number of rq->lock contentions.
Then the try_to_wake_up() on the previous task cpu may wake the task on a different cpu, but the bias should be the cpu that try_to_wake_up() is now running on.
The second patch in my series instead feeds the waking cpu number to select_task_rq(), so the bias will be to wake the task on the waking cpu.
-Frank
| |