Messages in this thread | | | Date | Fri, 6 Aug 1999 15:47:10 +0200 | From | Jamie Lokier <> | Subject | Re: clustering page-ins |
| |
Chuck Lever wrote: > On Mon, 2 Aug 1999, Benjamin LaHaise wrote: > > Note that the issue of page cache lookups can be intelligently > > solved by increasing the size of a 'page' as stored in the page cache, > > and filling in page tables preemptively to avoid the faults. > > what do folks think about teaching do_no_page to fill in a cluster's > worth of pte's at a time?
It's been mentioned before under the name "pre-faulting", and I don't think anyone's tried it yet. It should only be done for file mappings that would do clustered readaround and so on -- some device drivers rely on a single page fault causing just a single page to map at a time (e.g. windowed x86 framebuffer).
The only problem with pre-faulting is you don't get real faults to tell you what the process is up to... but with your ultra-refined readahead strategy, pre-faulting a cluster would be the final stroke of genius, no? :-)
On some architectures flush_page_to_ram() might imply some overhead.
Intuitively I'd go for clearing the "accessed" bits on all ptes you fill in except the one that really faulted.
Conclusion: I don't think you should put it in do_no_page. Rather, write a new function preload_page in memory.c, and have filemap_nopage call that for each page in a cluster that is a cache hit during the read-ahead scan.
preload_page() should duplicate some of the code in do_no_page(): it should fill in a pte, but only if the pte is "not present" already, and the new pte should be marked "old" not "young". If any memory allocation is required (for pgds and pmds) it should simply return without doing the allocation.
Chuck, if your read-ahead code is working could you send me the patch?
thanks, -- Jamie
- 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/
| |