A different metric for scheduler optimisation
Jamie Lokier
lkd en tantalophile.demon.co.uk
Dom Ene 30 10:50:26 CST 2000
Davide Libenzi wrote:
> Anyway consider the faster switching app that I know ( this can be an FTP
> server for example ):
>
> char buffer[N];
> for(;;)
> {
> read(infd, buffer, N);
> write(outfd, buffer, N);
> }
>
> for N = 1 this app "can switch very fast" and touch very few bytes, and this
> seems to confirm my hypothesise.
Well, well... this one only switches when it blocks waiting for data or
waiting for the output queue to flush.
And when it does that, it _isn't_ on the run queue!
In other words, run several of these in parallel and you will still get
a very low run queue length.
The cache thing is simply an argument for using mmap/write instead...
enjoy,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda