Messages in this thread | | | Date | Fri, 16 Mar 2007 00:09:08 -0400 | From | Rik van Riel <> | Subject | Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed |
| |
Valdis.Kletnieks@vt.edu wrote:
> On the other hand, Andreas suggested only marking it once every 32 calls, > but that required a helper variable. Statistically, jiffies%32 should > end up about the same as a helper variable %32. > > This of course, if just calling mark_page_accessed() is actually expensive > enough that we don't want to do it unconditionally.
Not caching a needed page and having to wait for a disk seek to complete will be *way* more expensive than any call to mark_page_accessed().
A modern CPU can do somewhere on the order of 50 million instructions in the time it takes to bring one page in from disk.
However, this does not mean we should unconditionally call mark_page_accessed(), since that could cause use to push wanted data out of the cache because of one program that does its streaming accesses in a strange way...
This is a situation where getting it right almost certainly matters.
-- Politics is the struggle between those who want to make their country the best in the world, and those who believe it already is. Each group calls the other unpatriotic. - 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/
| |