This looks very nice. It will boost performance for sequential - like access
patterns.
(BTW: The minor and major page faults reported by /usr/bin/time are the
number of times the kernel had to map a page or to read it, resp., right?)
The problem described is that binaries/libraries are mmaped for execution.
The normal pattern in binaries is far from sequential, as we use a lot of
functions/procedures. (On RISCs it's a little bit more sequential, but still
bad).
Here, your readahead strategy would consume too much memory and I/O time.
Now, the question is how the kernel could identify those both cases. Maybe
just from the fact whether the pages are executable or not? Maybe madvise() ?
[If DaveM is against it, he has certainly reasons for that. I don't see a
reason too not tell it, however.] Maybe something like a page fault history?
I think the executable or not would be a good enough heuristics, but I don't
know if the VM layer in question has this info. The page fault history is
the most general approach, as it adapts to the pattern actually used, but
it's not that easy to do ...
-- Kurt Garloff <K.Garloff@ping.de> (Dortmund, FRG) PGP key on http://student.physik.uni-dortmund.de/homepages/garloffThere is something frustrating about the quality and speed of Linux development. I.e. the quality is too high and the speed is too high, in other words, I can implement this XXXX feature, but I bet someone else has already done it and is just about to release his patch to Linus soon... [From a posting of Tigran Aivazian to linux-kernel, XXXX = disk stat]
- 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/