Messages in this thread | | | Date | Sat, 19 Dec 1998 21:37:19 +0100 | From | Marc Lehmann <> | Subject | Re: mmap() is slower than read() on SCSI/IDE on 2.0 and 2.1 |
| |
On Sat, Dec 19, 1998 at 04:37:34PM +0100, Rogier Wolff wrote: > Marc Lehmann wrote: > > On Thu, Dec 17, 1998 at 06:52:50AM +0000, Linus Torvalds wrote: > > > Umm, the easiest hint is probably to just look at the faulting address. > > > We have it available, after all. > > > > > > I suspect that such a simple heuristic would be fairly accurate, and it > > > can be coupled with other heuristics to further increase the accuracy. > > > > file copy, yes. But grep (and probably lots of others) don't access memory > > sequentially (as faster search algorithms exist) > > A fast search algorithm, touches memory every n bytes where n is the > size of the largest constant string that you're searching for.
A a small threshold might catch fgrep, but it will also increase the possibility for false "hits".
Other (important) types of searches (for example a linear search in a database table) might not offer such behaviour.
In any case, that makes an excellent heuristic if combined with watching page access ordering.
And it might well give a good heuristic when used alone (but I'd benchmark it ;)
-- Happy New Year, I'll be away from 21. Dec to 7. Jan
-----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ --+ The choice of a GNU generation | |
- 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/
| |