Messages in this thread | | | Date | Tue, 22 Sep 1998 16:39:07 +1000 | From | Richard Gooch <> | Subject | Re: Interesting scheduling times - NOT |
| |
Gabriel Paubert writes: > > > On Sat, 19 Sep 1998, Richard Gooch wrote: > > > Another datapoint: I get 2.1 us on a Pentium/MMX 200 (SDRAM) with no > > extra processes. I get 8.1 us (best case) with 12 extra processes. So > > on this system we're down to 0.5 us per process. > > On a PPro 180 (EDO) I go from 4.5 us to 9.8 us, a cost of 0.44 us per > > process. > > > > Now, I don't know for sure what is the cause of the variability, but I > > suspect cache problems, and given that, the run queue costs don't seem > > unreasonable. > > Aren't most of the variables referenced at the same addess modulo 4k since > they are in the task_state+stack structure ? In this case you repeatedly > access the same cache set, meaning that your code is a cache thrashing > benchmark every time you scan a queue with more elements than the L1 cache > associativity. (And maybe some variables are modified, causing copybacks > of dirty cache lines, I can't tell, not having access to the source > right now.)
Yes, you're right. I've reordered some members of struct task_struct and I've been able to take the cost of extra processes on the run queue from 0.2 us per process to 0.15 us on a PPro 180. If a cache line is 32 bytes (IIRC), I've managed to take the accesses from 4 cache lines to 2 cache lines per process.
Regards,
Richard....
- 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/
| |