|author||Nick Piggin <firstname.lastname@example.org>||2007-07-19 01:46:59 -0700|
|committer||Linus Torvalds <email@example.com>||2007-07-19 10:04:41 -0700|
mm: merge populate and nopage into fault (fixes nonlinear)
Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings. ->populate is a layering violation because the filesystem/pagecache code should need to know anything about the virtual memory mapping. The hitch here is that the ->nopage handler didn't pass down enough information (ie. pgoff). But it is more logical to pass pgoff rather than have the ->nopage function calculate it itself anyway (because that's a similar layering violation). Having the populate handler install the pte itself is likewise a nasty thing to be doing. This patch introduces a new fault handler that replaces ->nopage and ->populate and (later) ->nopfn. Most of the old mechanism is still in place so there is a lot of duplication and nice cleanups that can be removed if everyone switches over. The rationale for doing this in the first place is that nonlinear mappings are subject to the pagefault vs invalidate/truncate race too, and it seemed stupid to duplicate the synchronisation logic rather than just consolidate the two. After this patch, MAP_NONBLOCK no longer sets up ptes for pages present in pagecache. Seems like a fringe functionality anyway. NOPAGE_REFAULT is removed. This should be implemented with ->fault, and no users have hit mainline yet. [firstname.lastname@example.org: cleanup] [email@example.com: doc. fixes for readahead] [firstname.lastname@example.org: build fix] Signed-off-by: Nick Piggin <email@example.com> Signed-off-by: Randy Dunlap <firstname.lastname@example.org> Cc: Mark Fasheh <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Diffstat (limited to 'mm/truncate.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index aed85f0b707..5cdfbc1a59f 100644
@@ -82,7 +82,7 @@ EXPORT_SYMBOL(cancel_dirty_page);
* If truncate cannot remove the fs-private metadata from the page, the page
* becomes anonymous. It will be left on the LRU and may even be mapped into
- * user pagetables if we're racing with filemap_nopage().
+ * user pagetables if we're racing with filemap_fault().
* We need to bale out if page->mapping is no longer equal to the original
* mapping. This happens a) when the VM reclaimed the page while we waited on