And here is the other side of the coin. Remember what we are doing.
We're in the middle of a context switch, trying to figure out where we
should run this process. We would like context switches to be fast.
Any work we do here is at direct odds with our goals. SGI took the
approach that your statements would imply, i.e., approximate the
cache footprint, figure out if it was big or small, and use that to
decide where to land the process. This has two fatal flaws:
a) Because there is no generic hardware interface to say "how many cache
lines are mine", you approximate that by looking at how much of the
process timeslice this process used, if it used a lot, you guess it
filled the cache. This doesn't work at all for I/O bound processes,
who typically run in short bursts. So IRIX would bounce these around
for no good reason, resulting in crappy I/O perf. I got about another
20% in BDS by locking down the processes (BDS delivered 3.2GBytes/sec
of NFS traffic, sustained, in 1996).
b) all of the "thinking" you do to figure out where to land the process
contributes directly to the cost of the context switch. Linux has
nice light context switches, let's keep it that way.
Summary: SGI managed to get optimal usage out of their caches for long
running, CPU bound fortran jobs at the expense of time sharing and
I/O jobs. I'm happy to let SGI win in that space.
----- Larry McVoy lm at bitmover.com http://www.bitmover.com/lm - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/