Messages in this thread | | | Date | Tue, 30 Nov 1999 14:09:34 +0100 (CET) | From | Ingo Molnar <> | Subject | Re: lowlatency patch for 2.2.13 optimized for SMP ? |
| |
On Mon, 29 Nov 1999, Benno Senoner wrote:
> Hi, I noticed that Ingo released a low-latency patch for the 2.2.13 > kernel. > > 2.2.10-lowlatency was not optimized for SMP low-latency ( latencytest on > /proc stress gives high latencies). > > Does anyone (Ingo in particular) know if the 2.2.13 is SMP optimized ? > (spinlock changes)
no, and i dont think it will ever be. The only and worst offender is the 'big kernel lock', which is much less of a problem in 2.3. We cannot generally reschedule at points that do a lock_kernel(). Maybe we could add a new lock_kernel_reschedule() function, but possibly you'll have to add this to gazillion places.
there is a workaround: in reschedule_idle() whenever we wake up a RT process we could mark all running processes as 'reschedule ASAP' (set the need_resched flag). This guarantees that _someone_ will notice and reschedule eventually. (an SMP kernel is never worse than a UP kernel, latency-wise) This is only for RT tasks though. Do something like this at the beginning of reschedule_idle():
if (policy != SCHED_OTHER) for (i = 0; i < smp_num_cpus; i++) { cpu = cpu_logical_map(i); tsk = cpu_curr(cpu); tsk->need_resched = 1; } /* continue doing the normal idle reschedule part */
(this is of course an ugly hack, but if it makes a difference we can see how this could be done cleanly. It only affects RT tasks.)
-- mingo
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |