2.6.19-rc1: vm stuff
Subsystems (7)
The first 3 patches are some minor fixes and rearrangements for the page allocator and are probably fit to go into -mm.
The next set of 3 patches is another attempt at solving the invalidate vs pagefault race (this got reintroduced after invalidate_complete_page2 was added, and has always been present for nonlinear mappings). These are booted and have had some stress testing, but are still at the RFC stage. Comments?
Nick
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/3 mm: arch_free_page fix
After the PG_reserved check was added, arch_free_page was being called in the wrong place (it could be called for a page we don't actually want to free). Fix that.
mm/page_alloc.c +3 -3
@@ -443,7 +443,6 @@ static void __free_pages_ok(struct pageint i;int reserved =0 ; -arch_free_page (page, order);if (!PageHighMem (page))debug_check_no_locks_freed (page_address (page),PAGE_SIZE <<order);
@@ -453,7 +452,9 @@ static void __free_pages_ok(struct pageif (reserved)return ; +arch_free_page (page, order);kernel_map_pages (page,1 << order,0 ); +local_irq_save (flags);__count_vm_events (PGFREE ,1 << order);free_one_page (page_zone (page), page, order);
@@ -717,13 +718,12 @@ static void fastcall free_hot_cold_page(struct per_cpu_pages *pcp;unsigned long flags; -arch_free_page (page,0 ); -if (PageAnon (page)) page->mapping =NULL ;if (free_pages_check (page))return ; +arch_free_page (page,0 );kernel_map_pages (page,1 ,0 ); pcp = &zone_pcp (zone,get_cpu ())->pcp[cold];
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/3 mm: fault vs invalidate/truncate check
In reply to Nick PigginAdd a bugcheck for Andrea's pagefault vs invalidate race. This is triggerable for both linear and nonlinear pages with a userspace test harness (using direct IO and truncate, respectively).
mm/filemap.c +2 -0
@@ -120,6 +120,8 @@ void __remove_from_page_cache(struct pag page->mapping =NULL ; mapping->nrpages--;__dec_zone_page_state (page,NR_FILE_PAGES ); + +BUG_ON (page_mapped (page)); }void remove_from_page_cache (struct page *page)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 2/3 mm: locks_freed fix
In reply to Nick PigginMove the lock debug checks below the page reserved checks. Also, having debug_check_no_locks_freed in kernel_map_pages is wrong.
include/linux/mm.h +1 -6
@@ -1038,12 +1038,7 @@ static inline void vm_stat_account(struc#ifndef CONFIG_DEBUG_PAGEALLOC static inline void -kernel_map_pages (struct page *page,int numpages,int enable) -{ -if (!PageHighMem (page) && !enable) -debug_check_no_locks_freed (page_address (page), - numpages *PAGE_SIZE ); -} +kernel_map_pages (struct page *page,int numpages,int enable) {}#endif extern struct vm_area_struct *get_gate_vma (struct task_struct *tsk);
mm/page_alloc.c +4 -4
@@ -443,15 +443,13 @@ static void __free_pages_ok(struct pageint i;int reserved =0 ; -if (!PageHighMem (page)) -debug_check_no_locks_freed (page_address (page), -PAGE_SIZE <<order); -for (i =0 ; i < (1 << order) ; ++i) reserved +=free_pages_check (page + i);if (reserved)return ; +if (!PageHighMem (page)) +debug_check_no_locks_freed (page_address (page),PAGE_SIZE <<order);arch_free_page (page, order);kernel_map_pages (page,1 << order,0 );
@@ -723,6 +721,8 @@ static void fastcall free_hot_cold_page(if (free_pages_check (page))return ; +if (!PageHighMem (page)) +debug_check_no_locks_freed (page_address (page),PAGE_SIZE );arch_free_page (page,0 );kernel_map_pages (page,1 ,0 );
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 2/3 mm: fault vs invalidate/truncate race fix
In reply to Nick PigginFix the race between invalidate_inode_pages and do_no_page.
Andrea Arcangeli identified a subtle race between invalidation of pages from pagecache with userspace mappings, and do_no_page.
The issue is that invalidation has to shoot down all mappings to the page, before it can be discarded from the pagecache. Between shooting down ptes to a particular page, and actually dropping the struct page from the pagecache, do_no_page from any process might fault on that page and establish a new mapping to the page just before it gets discarded from the pagecache.
The most common case where such invalidation is used is in file truncation. This case was catered for by doing a sort of open-coded seqlock between the file's i_size, and its truncate_count.
Truncation will decrease i_size, then increment truncate_count before unmapping userspace pages; do_no_page will read truncate_count, then find the page if it is within i_size, and then check truncate_count under the page table lock and back out and retry if it had subsequently been changed (ptl will serialise against unmapping, and ensure a potentially updated truncate_count is actually visible).
Complexity and documentation issues aside, the locking protocol fails in the case where we would like to invalidate pagecache inside i_size. do_no_page can come in anytime and filemap_nopage is not aware of the invalidation in progress (as it is when it is outside i_size). The end result is that dangling (->mapping == NULL) pages that appear to be from a particular file may be mapped into userspace with nonsense data. Valid mappings to the same place will see a different page.
Andrea implemented two working fixes, one using a real seqlock, another using a page->flags bit. He also proposed using the page lock in do_no_page, but that was initially considered too heavyweight. However, it is not a global or per-file lock, and the page cacheline is modified in do_no_page to increment _count and _mapcount anyway, so a further modification should not be a large performance hit. Scalability is not an issue.
This patch implements this latter approach. ->nopage implementations return with the page locked if it is possible for their underlying file to be invalidated (in that case, they must set a special vm_flags bit to indicate so). do_no_page only unlocks the page after setting up the mapping completely. invalidation is excluded because it holds the page lock during invalidation of each page (and ensures that the page is not mapped while holding the lock).
This allows significant simplifications in do_no_page.
include/linux/mm.h +5 -0
@@ -166,6 +166,11 @@ extern unsigned int kobjsize(const void#define VM_NONLINEAR 0x00800000/* Is non-linear (remap_file_pages) */ #define VM_MAPPED_COPY 0x01000000/* T if mapped copy of data (nommu mmap) */ #define VM_INSERTPAGE 0x02000000/* The vma has had "vm_insert_page()" done on it */ +#define VM_CAN_INVALIDATE 0x04000000/* The mapping may be invalidated, +* eg. truncate or invalidate_inode_*. +* In this case, do_no_page must +* return with the page locked. +*/ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
mm/filemap.c +20 -57
133 lines not on this page · raw message
mm/memory.c +60 -77
221 lines not on this page · raw message
mm/shmem.c +9 -2
@@ -81,6 +81,7 @@ enum sgp_type {SGP_READ ,/* don't exceed i_size, don't allocate page */ SGP_CACHE ,/* don't exceed i_size, may allocate page */ SGP_WRITE ,/* may exceed i_size, may allocate page */ + SGP_NOPAGE, /* same as SGP_CACHE, return with page locked */ }; static int shmem_getpage(struct inode *inode, unsigned long idx,
@@ -1209,8 +1210,10 @@ repeat: } done:if (*pagep != filepage) { -unlock_page (filepage); *pagep = filepage; +if (sgp !=SGP_NOPAGE ) +unlock_page (filepage); + }return 0 ;
@@ -1229,13 +1232,15 @@ struct page *shmem_nopage(struct vm_areaunsigned long idx;int error; +BUG_ON (!(vma->vm_flags &VM_CAN_INVALIDATE )); + idx = (address - vma->vm_start) >>PAGE_SHIFT ; idx += vma->vm_pgoff; idx >>=PAGE_CACHE_SHIFT -PAGE_SHIFT ;if (((loff_t ) idx <<PAGE_CACHE_SHIFT ) >=i_size_read (inode))return NOPAGE_SIGBUS ; - error =shmem_getpage (inode, idx, &page,SGP_CACHE , type); + error =shmem_getpage (inode, idx, &page,SGP_NOPAGE , type);if (error)return (error == -ENOMEM )?NOPAGE_OOM :NOPAGE_SIGBUS ;
@@ -1333,6 +1338,7 @@ int shmem_mmap(struct file *file, struct {file_accessed (file); vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |=VM_CAN_INVALIDATE ;return 0 ; }
@@ -2445,5 +2451,6 @@ int shmem_zero_setup(struct vm_area_strufput (vma->vm_file); vma->vm_file = file; vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |=VM_CAN_INVALIDATE ;return 0 ; }
fs/ncpfs/mmap.c +1 -0
@@ -123,6 +123,7 @@ int ncp_mmap(struct file *file, struct vreturn -EFBIG ; vma->vm_ops = &ncp_file_mmap; + vma->vm_flags |=VM_CAN_INVALIDATE ;file_accessed (file);return 0 ; }
fs/ocfs2/mmap.c +1 -0
@@ -93,6 +93,7 @@ int ocfs2_mmap(struct file *file, structfile_accessed (file); vma->vm_ops = &ocfs2_file_vm_ops; + vma->vm_flags |=VM_CAN_INVALIDATE ;return 0 ; }
fs/xfs/linux-2.6/xfs_file.c +1 -0
@@ -343,6 +343,7 @@ xfs_file_mmap( struct vm_area_struct *vma) { vma->vm_ops = &xfs_file_vm_ops; + vma->vm_flags |=VM_CAN_INVALIDATE ;#ifdef CONFIG_XFS_DMAPI if (vn_from_inode (filp->f_dentry->d_inode)->v_vfsp->vfs_flag &VFS_DMI )
ipc/shm.c +1 -0
@@ -230,6 +230,7 @@ static int shm_mmap(struct file * file, ret =shmem_mmap (file, vma);if (ret ==0 ) { vma->vm_ops = &shm_vm_ops; + vma->vm_flags |=VM_CAN_INVALIDATE ;if (!(vma->vm_flags &VM_WRITE )) vma->vm_flags &= ~VM_MAYWRITE ;shm_inc (shm_file_ns (file), file->f_dentry->d_inode->i_ino);
fs/ocfs2/dlmglue.c +0 -1
@@ -2656,7 +2656,6 @@ static int ocfs2_data_convert_worker(strsync_mapping_buffers (mapping);if (blocking ==LKM_EXMODE ) {truncate_inode_pages (mapping,0 ); -unmap_mapping_range (mapping,0 ,0 ,0 ); }else {/* We only need to wait on the I/O if we're not also * truncating pages because truncate_inode_pages waits
mm/truncate.c +10 -0
@@ -163,6 +163,11 @@ void truncate_inode_pages_range(struct aunlock_page (page);continue ; } +while (page_mapped (page)) { +unmap_mapping_range (mapping, + (loff_t )page_index<<PAGE_CACHE_SHIFT , +PAGE_CACHE_SIZE ,0 ); + }truncate_complete_page (mapping, page);unlock_page (page); }
@@ -200,6 +205,11 @@ void truncate_inode_pages_range(struct abreak ;lock_page (page);wait_on_page_writeback (page); +while (page_mapped (page)) { +unmap_mapping_range (mapping, + (loff_t )page_index<<PAGE_CACHE_SHIFT , +PAGE_CACHE_SIZE ,0 ); + }if (page->index > next) next = page->index; next++;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 2/3] mm: fault vs invalidate/truncate race fix
Quoted 1 line · On Sat, 7 Oct 2006 15:06:21 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Fix the race between
invalidate_inode_pagesanddo_no_page.
Changes have occurred in ocfs2. The fixup is pretty obvious, but this is one which Mark will need to have a think about please.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 2/3] mm: fault vs invalidate/truncate race fix
In reply to Nick PigginQuoted 1 line · On Sat, 7 Oct 2006 15:06:21 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Fix the race between
invalidate_inode_pagesanddo_no_page.
- In do_no_page() there's a `goto retry' where we appear to have forgotten to (conditionally) unlock the page.
- In do_no_page() the COW-break code seem to have forgotten to (conditionally) unlock the page which it just COWed?
- In do_no_page(), the unlock_page() which _is_ there doesn't test VM_CAN_INVALIDATE before deciding to unlock the page.
I have a bad feeling that I'm not getting the point here...
<looks>
Ah, it appears you've fixed at least some of these things in the next patch. Tricky.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 2/3] mm: fault vs invalidate/truncate race fix
Quoted 10 lines · Andrew Morton
Quoted 2 lines · On Sat, 7 Oct 2006 15:06:21 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Fix the race between
invalidate_inode_pagesanddo_no_page.- In
do_no_page()there's a `goto retry' where we appear to have forgotten to (conditionally) unlock the page.
Hmm, the retry should be gone - it was only there for the seqlock-ish truncate race code.
Quoted 3 lines
- In
do_no_page()the COW-break code seem to have forgotten to (conditionally) unlock the page which it just COWed?
It keeps the 'nopage_page' around and unlocks it at the end. Last time I looked, this is required because truncate wants to unmap 'even_cows', so we must hold the pagecache page locked while instantiating the mapping on the cow page.
Quoted 3 lines
- In
do_no_page(), theunlock_page()which _is_ there doesn't testVM_CAN_INVALIDATEbefore deciding to unlock the page.
It does a conditional lock if !VM_CAN_INVALIDATE based on a suggestion from Hugh. I don't disagree with that, but it can go away in the next patch as we won't be calling into ->page_mkwrite (if that callback can be implemented with ->fault).
--
Send instant messages to your online friends http://au.messenger.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 3/3 mm: add arch_alloc_page
In reply to Nick PigginAdd an arch_alloc_page to match arch_free_page.
include/linux/gfp.h +3 -0
@@ -101,6 +101,9 @@ static inline int gfp_zone(gfp_t gfp)#ifndef HAVE_ARCH_FREE_PAGE static inline void arch_free_page (struct page *page,int order) { }#endif +#ifndef HAVE_ARCH_ALLOC_PAGE +static inline void arch_alloc_page (struct page *page,int order) { } +#endif extern struct page *FASTCALL (__alloc_pages (gfp_t ,unsigned int ,struct zonelist *));
mm/page_alloc.c +2 -0
@@ -552,6 +552,8 @@ static int prep_new_page(struct page *pa 1 << PG_checked | 1 << PG_mappedtodisk);set_page_private (page,0 );set_page_refcounted (page); + +arch_alloc_page (page, order);kernel_map_pages (page,1 << order,1 );if (gfp_flags & __GFP_ZERO)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: add arch_alloc_page
Quoted 1 line · On Sat, 7 Oct 2006 15:06:04 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Add an
arch_alloc_pageto matcharch_free_page.
umm.. why?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: add arch_alloc_page
Quoted 9 lines · Andrew Morton
Quoted 2 lines · On Sat, 7 Oct 2006 15:06:04 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Add an
arch_alloc_pageto matcharch_free_page.umm.. why?
I had a future patch to more kernel_map_pages into it, but couldn't decide if that's a generic kernel feature that is only implemented in 2 architectures, or an architecture speicifc feature. So I left it out.
But at least Martin wanted a hook here for his volatile pages patches, so I thought I'd submit this patch anyway.
--
Send instant messages to your online friends http://au.messenger.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: add arch_alloc_page
Quoted 10 lines · Nick Piggin
Quoted 9 lines
Quoted 2 lines · On Sat, 7 Oct 2006 15:06:04 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Add an
arch_alloc_pageto matcharch_free_page.umm.. why?
Quoted 6 lines
I had a future patch to more
kernel_map_pagesinto it, but couldn't decide if that's a generic kernel feature that is only implemented in 2 architectures, or an architecture speicifc feature. So I left it out.But at least Martin wanted a hook here for his volatile pages patches, so I thought I'd submit this patch anyway.
With Nicks patch I can use arch_alloc_page instead of page_set_stable, but I can still not use arch_free_page instead of page_set_unused because it is done before the check for reserved pages. If reserved pages go away or the arch_free_page call would get moved after the check I could replace page_set_unused as well. So with Nicks patch we are only halfway there..
Signature · 8 lines
blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin.
Re: [patch 3/3] mm: add arch_alloc_page
Quoted 18 lines · Martin Schwidefsky
Quoted 10 lines · Nick Piggin
Quoted 9 lines
Quoted 2 lines · On Sat, 7 Oct 2006 15:06:04 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Add an
arch_alloc_pageto matcharch_free_page.umm.. why?
Quoted 6 lines
I had a future patch to more
kernel_map_pagesinto it, but couldn't decide if that's a generic kernel feature that is only implemented in 2 architectures, or an architecture speicifc feature. So I left it out.But at least Martin wanted a hook here for his volatile pages patches, so I thought I'd submit this patch anyway.
Quoted 6 lines
With Nicks patch I can use
arch_alloc_pageinstead ofpage_set_stable, but I can still not usearch_free_pageinstead ofpage_set_unusedbecause it is done before the check for reserved pages. If reserved pages go away or thearch_free_pagecall would get moved after the check I could replacepage_set_unusedas well. So with Nicks patch we are only halfway there..
Ahh, but with my patchSET I think we are all the way there ;)
Nick
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: add arch_alloc_page
Quoted 8 lines · Nick Piggin
Quoted 6 lines
With Nicks patch I can use
arch_alloc_pageinstead ofpage_set_stable, but I can still not usearch_free_pageinstead ofpage_set_unusedbecause it is done before the check for reserved pages. If reserved pages go away or thearch_free_pagecall would get moved after the check I could replacepage_set_unusedas well. So with Nicks patch we are only halfway there..Ahh, but with my patchSET I think we are all the way there ;)
Oh, good. Then I only have to add two more state change functions, namely page_make_stable and page_make_volatile.
Signature · 8 lines
blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin.
PATCH 3/3 mm: fault handler to replace nopage and populate
In reply to Nick PigginNonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings.
I can't see why the filesystem/pagecache code should need to know anything about it, except for the fact that the ->nopage handler didn't quite pass down enough information (ie. pgoff). But it is more logical to pass pgoff rather than have the ->nopage function calculate it itself anyway. And having the nopage handler install the pte itself is sort of nasty.
This patch introduces a new fault handler that replaces ->nopage and ->populate and (hopefully) ->page_mkwrite. 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.
Comments?
include/linux/mm.h +21 -4
@@ -166,11 +166,12 @@ extern unsigned int kobjsize(const void#define VM_NONLINEAR 0x00800000/* Is non-linear (remap_file_pages) */ #define VM_MAPPED_COPY 0x01000000/* T if mapped copy of data (nommu mmap) */ #define VM_INSERTPAGE 0x02000000/* The vma has had "vm_insert_page()" done on it */ -#define VM_CAN_INVALIDATE 0x04000000/* The mapping may be invalidated, +#define VM_CAN_INVALIDATE 0x04000000/* The mapping may be invalidated, * eg. truncate or invalidate_inode_*. * In this case, do_no_page must * return with the page locked. */ +#define VM_CAN_NONLINEAR 0x08000000/* Has ->fault & does nonlinear pages */ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
@@ -194,6 +195,23 @@ extern unsigned int kobjsize(const void*/ extern pgprot_t protection_map[16 ]; +#define FAULT_FLAG_WRITE 0x01 +#define FAULT_FLAG_NONLINEAR 0x02 + +/* +* fault_data is filled in the the pagefault handler and passed to the +* vma's ->fault function. That function is responsible for filling in +* 'type', which is the type of fault if a page is returned, or the type +* of error if NULL is returned. +*/ +struct fault_data { +struct vm_area_struct *vma; +unsigned long address; +pgoff_t pgoff; +unsigned int flags; + +int type; +};/* * These are the virtual MM functions - opening of an area, closing and
@@ -203,6 +221,7 @@ extern pgprot_t protection_map[16];struct vm_operations_struct {void (*open)(struct vm_area_struct * area);void (*close)(struct vm_area_struct * area); +struct page * (*fault)(struct fault_data * data);struct page * (*nopage)(struct vm_area_struct * area,unsigned long address,int *type);unsigned long (*nopfn)(struct vm_area_struct * area,unsigned long address);int (*populate)(struct vm_area_struct * area,unsigned long address,unsigned long len,pgprot_t prot,unsigned long pgoff,int nonblock);
@@ -1028,9 +1047,7 @@ extern void truncate_inode_pages_range(s loff_t lstart, loff_t lend);/* generic vm_area_ops exported for stackable file systems */ -extern struct page *filemap_nopage (struct vm_area_struct *,unsigned long ,int *); -extern int filemap_populate (struct vm_area_struct *,unsigned long , -unsigned long ,pgprot_t ,unsigned long ,int ); +extern struct page *filemap_fault (struct fault_data *data);/* mm/page-writeback.c */ int write_one_page (struct page *page,int wait);
mm/memory.c +141 -3
166 lines not on this page · raw message
mm/filemap.c +35 -209
348 lines not on this page · raw message
mm/fremap.c +67 -32
120 lines not on this page · raw message
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 15 lines · Nick Piggin
Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings.
I can't see why the filesystem/pagecache code should need to know anything about it, except for the fact that the ->nopage handler didn't quite pass down enough information (ie. pgoff). But it is more logical to pass pgoff rather than have the ->nopage function calculate it itself anyway. And having the nopage handler install the pte itself is sort of nasty.
This patch introduces a new fault handler that replaces ->nopage and ->populate and (hopefully) ->page_mkwrite. 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.
Quoted 6 lines
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.
Comments?
That's pretty nice.
Back when I was writing [the now slated for death] sound/oss/via82xxx_audio.c driver, Linus suggested that I implement ->nopage() for accessing the mmap'able DMA'd audio buffers, rather than using remap_pfn_range(). It worked out very nicely, because it allowed the sound driver to retrieve $N pages for the mmap'able buffer (passed as an s/g list to the hardware) rather than requiring a single humongous buffer returned by pci_alloc_consistent().
And although probably not your primary motivation, your change does IMO improve this area of the kernel.
Jeff
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 7 lines · Jeff Garzik
That's pretty nice.
Back when I was writing [the now slated for death]
sound/oss/via82xxx_audio.cdriver, Linus suggested that I implement
->nopage() for accessing the mmap'able DMA'd audio buffers, rather
than usingremap_pfn_range(). It worked out very nicely, because it allowed the sound driver to retrieve $N pages for the mmap'able buffer (passed as an s/g list to the hardware) rather than requiring a single humongous buffer returned bypci_alloc_consistent().And although probably not your primary motivation, your change does IMO improve this area of the kernel.
Thanks. Yeah hopefully this provides a little more flexibility (I think it can already replace 3 individual vm_ops callbacks!). And I'd like to see what other things it can be used for... :)
However, what we don't want is a bloating of struct fault_data IMO. So I'd like to try to nail down the fields that it needs quite quickly then really keep a lid on it.
--
Send instant messages to your online friends http://au.messenger.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Nick PigginQuoted 15 lines · On Sat, 7 Oct 2006 15:06:32 +0200 (CEST) Nick Piggin <[email protected]> wrote:
Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings.
I can't see why the filesystem/pagecache code should need to know anything about it, except for the fact that the ->nopage handler didn't quite pass down enough information (ie. pgoff). But it is more logical to pass pgoff rather than have the ->nopage function calculate it itself anyway. And having the nopage handler install the pte itself is sort of nasty.
This patch introduces a new fault handler that replaces ->nopage and ->populate and (hopefully) ->page_mkwrite. 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.
Quoted 4 lines
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.
- You may find that gcc generates crap code for the initialisation of the `struct fault_data'. If so, filling the fields in by hand one-at-a-time will improve things.
- So is the plan here to migrate all code over to using vm_operations.fault() and to finally remove vm_operations.nopage and .nopfn? If so, that'd be nice.
- As you know, there is a case for constructing that `struct fault_data' all the way up in do_no_page(): so we can pass data back, asking do_no_page() to rerun the fault if we dropped mmap_sem.
- No useful opinion on the substance of this patch, sorry. It's Saturday ;)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 4 lines · Andrew Morton
- You may find that gcc generates crap code for the initialisation of the `struct
fault_data'. If so, filling the fields in by hand one-at-a-time will improve things.
OK.
Quoted 4 lines
- So is the plan here to migrate all code over to using
vm_operations.fault()and to finally remove vm_operations.nopage and .nopfn? If so, that'd be nice.
Definitely remove .nopage, .populate, and hopefully .page_mkwrite.
.nopfn is a little harder because it doesn't quite follow the same pattern as the others (eg. has no struct page).
Quoted 4 lines
- As you know, there is a case for constructing that `struct
fault_data' all the way up indo_no_page(): so we can pass data back, askingdo_no_page()to rerun the fault if we droppedmmap_sem.
That is what it is doing - do_no_page should go away (it is basically duplicated in __do_fault -- I left it there because I don't know if people are happy to have a flag day or slowly migrate over).
But I have converted regular pagecache (mm/filemap.c) to use .fault rather than .nopage and .populate, so you should be able to do the mmap_sem thing right now. That's something maybe you could look at if you get time? Ie. whether this .fault handler thing will be sufficient for you.
Quoted 2 lines
- No useful opinion on the substance of this patch, sorry. It's Saturday ;)
No hurry. Thanks for the quick initial comments.
--
Send instant messages to your online friends http://au.messenger.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Andrew MortonQuoted 3 lines
- So is the plan here to migrate all code over to using
vm_operations.fault()and to finally remove vm_operations.nopage and .nopfn? If so, that'd be nice.
Agreed. That would also allow to pass down knowledge of wether we can be interruptible or not (coming from userland or not). Useful in a few case when dealing with strange hw mappings.
Now, fault() still returns a struct page and thus doesn't quite fix the problem I'm exposing in my "User switchable HW mappings & cie" mail I posted today in which case we need to either duplicate the truncate logic in no_pfn() or get rid of no_pfn() and set the PTE from the fault handler . I tend to prefer the later provided that it's strictly limited for mappings that do not have a struct page though.
Quoted 11 lines
- As you know, there is a case for constructing that `struct
fault_data' all the way up indo_no_page(): so we can pass data back, askingdo_no_page()to rerun the fault if we droppedmmap_sem.- No useful opinion on the substance of this patch, sorry. It's Saturday ;)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 4 lines
- So is the plan here to migrate all code over to using
vm_operations.fault()and to finally remove vm_operations.nopage and .nopfn? If so, that'd be nice.Agreed. That would also allow to pass down knowledge of wether we can be interruptible or not (coming from userland or not). Useful in a few case when dealing with strange hw mappings.
Quoted 6 lines
Now,
fault()still returns a struct page and thus doesn't quite fix the problem I'm exposing in my "User switchable HW mappings & cie" mail I posted today in which case we need to either duplicate the truncate logic inno_pfn()or get rid ofno_pfn()and set the PTE from the fault handler . I tend to prefer the later provided that it's strictly limited for mappings that do not have a struct page though.
The truncate logic can't be duplicated because it works on struct pages.
What sounds best, if you use nopfn, is to do your own internal synchronisation against your unmap call. Obviously you can't because you have no ->nopfn_done call with which to drop locks ;)
So, hmm yes I have a good idea for how fault() could take over ->nopfn as
well: just return NULL, set the fault type to VM_FAULT_MINOR, and have the ->fault handler install the pte. It will require a new helper along the lines of vm_insert_page.
I'll code that up in my next patchset.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 6 lines
The truncate logic can't be duplicated because it works on struct pages.
What sounds best, if you use nopfn, is to do your own internal synchronisation against your unmap call. Obviously you can't because you have no ->nopfn_done call with which to drop locks ;)
Quoted 6 lines
So, hmm yes I have a good idea for how
fault()could take over ->nopfn as
well: just return NULL, set the fault type toVM_FAULT_MINOR, and have the ->fault handler install the pte. It will require a new helper along the lines ofvm_insert_page.I'll code that up in my next patchset.
Which is exactly what I was proposing in my other mail :)
Read it, you'll understnad my point about the truncate logic... I sometimes want to return struct page (when the mapping is pointing to backup memory) or map it directly to hardware.
In the later case, with an appropriate helper, I can definitely do my own locking. In the former case, I return struct page's and need the truncate logic.
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 16 lines · Benjamin Herrenschmidt
Quoted 7 lines
The truncate logic can't be duplicated because it works on struct pages.
What sounds best, if you use nopfn, is to do your own internal synchronisation against your unmap call. Obviously you can't because you have no ->nopfn_done call with which to drop locks ;)
Quoted 6 lines
So, hmm yes I have a good idea for how
fault()could take over ->nopfn as
well: just return NULL, set the fault type toVM_FAULT_MINOR, and have the ->fault handler install the pte. It will require a new helper along the lines ofvm_insert_page.I'll code that up in my next patchset.
Which is exactly what I was proposing in my other mail :)
Quoted 7 lines
Read it, you'll understnad my point about the truncate logic... I sometimes want to return struct page (when the mapping is pointing to backup memory) or map it directly to hardware.
In the later case, with an appropriate helper, I can definitely do my own locking. In the former case, I return struct page's and need the truncate logic.
Yep, I see. You just need to be careful about the PFNMAP logic, so the VM knows whether the pte is backed by a struct page or not. And going the pageless route means that you must disallow MAP_PRIVATE PROT_WRITE mappings, I trust that isn't a problem for you?
I guess the helper looks something like the following...
--
include/linux/mm.h +1 -0
@@ -1105,6 +1105,7 @@ unsigned long vmalloc_to_pfn(void *addr)int remap_pfn_range (struct vm_area_struct *,unsigned long addr,unsigned long pfn,unsigned long size,pgprot_t );int vm_insert_page (struct vm_area_struct *,unsigned long addr,struct page *); +int vm_insert_pfn (struct vm_area_struct *,unsigned long addr,unsigned long pfn);struct page *follow_page (struct vm_area_struct *,unsigned long address,unsigned int foll_flags);
mm/memory.c +38 -0
@@ -1267,6 +1267,44 @@ int vm_insert_page(struct vm_area_struct }EXPORT_SYMBOL (vm_insert_page); +/** +* vm_insert_pfn - insert single pfn into user vma +* @vma: user vma to map to +* @addr: target user address of this page +* @pfn: source kernel pfn +* +* Similar to vm_inert_page, this allows drivers to insert individual pages +* they've allocated into a user vma. Same comments apply +*/ +int vm_insert_pfn (struct vm_area_struct *vma,unsigned long addr,unsigned long pfn) +{ +struct mm_struct *mm = vma->vm_mm; +int retval; +pte_t *pte; +spinlock_t *ptl; + +BUG_ON (is_cow_mapping (vma->vm_flags)); + + retval = -ENOMEM ; + pte =get_locked_pte (mm, addr, &ptl); +if (!pte) + goto out; + retval = -EBUSY ; +if (!pte_none (*pte)) + goto out_unlock; + +/* Ok, finally just insert the thing.. */ +set_pte_at (mm, addr, pte,pfn_pte (pfn, vma->vm_page_prot)); + + vma->vm_flags |=VM_PFNMAP ; + retval =0 ; +out_unlock: +pte_unmap_unlock (pte, ptl); +out: +return retval; +} +EXPORT_SYMBOL (vm_insert_pfn); +/* * maps a range of physical memory into the requested pages. the old * mappings are removed. any references to nonexistent pages results
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 2 lines
Yep, I see. You just need to be careful about the PFNMAP logic, so the VM knows whether the pte is backed by a struct page or not.
I still need to properly get my head around that one. I can't easily change the VMA during the "switch" but I can tweak the flags on the first nopage after one...
Quoted 2 lines
And going the pageless route means that you must disallow
MAP_PRIVATEPROT_WRITEmappings, I trust that isn't a problem for you?
Should not but I need to look more closely.
Quoted 51 lines
I guess the helper looks something like the following...
--
Index:
linux-2.6/include/linux/mm.h
===================================================================include/linux/mm.h +1
-0@@ -1105,6 +1105,7 @@ unsigned long vmalloc_to_pfn(void *addr)int remap_pfn_range (struct vm_area_struct *,unsigned long addr,unsigned long pfn,unsigned long size,pgprot_t );int vm_insert_page (struct vm_area_struct *,unsigned long addr,struct page *); +int vm_insert_pfn (struct vm_area_struct *,unsigned long addr,unsigned long pfn);struct page *follow_page (struct vm_area_struct *,unsigned long address,unsigned int foll_flags);Index:
linux-2.6/mm/memory.c
===================================================================mm/memory.c +27
-0@@ -1267,6 +1267,44 @@ int vm_insert_page(struct vm_area_struct }EXPORT_SYMBOL (vm_insert_page); +/** +* vm_insert_pfn - insert single pfn into user vma +* @vma: user vma to map to +* @addr: target user address of this page +* @pfn: source kernel pfn +* +* Similar to vm_inert_page, this allows drivers to insert individual pages +* they've allocated into a user vma. Same comments apply +*/ +int vm_insert_pfn (struct vm_area_struct *vma,unsigned long addr,unsigned long pfn) +{ +struct mm_struct *mm = vma->vm_mm; +int retval; +pte_t *pte; +spinlock_t *ptl; + +BUG_ON (is_cow_mapping (vma->vm_flags)); + + retval = -ENOMEM ; + pte =get_locked_pte (mm, addr, &ptl); +if (!pte) + goto out; + retval = -EBUSY ; +if (!pte_none (*pte)) + goto out_unlock; + +/* Ok, finally just insert the thing.. */
mm/memory.c int vm_insert_page(struct vm_area_struct · line 1306
Quoted 10 lines
mm/memory.c +10
-0+set_pte_at (mm, addr, pte,pfn_pte (pfn, vma->vm_page_prot)); + + vma->vm_flags |=VM_PFNMAP ; + retval =0 ; +out_unlock: +pte_unmap_unlock (pte, ptl); +out: +return retval; +} +EXPORT_SYMBOL (vm_insert_pfn);
It also needs update_mmu_cache() I suppose.
mm/memory.c int vm_insert_page(struct vm_area_struct · line 1310
Quoted 3 lines
mm/memory.c +0
-0/* * maps a range of physical memory into the requested pages. the old * mappings are removed. any references to nonexistent pages results
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines
Yep, I see. You just need to be careful about the PFNMAP logic, so the VM knows whether the pte is backed by a struct page or not.
I still need to properly get my head around that one. I can't easily change the VMA during the "switch" but I can tweak the flags on the first nopage after one...
You'll want to clear VM_PFNMAP after unmapping all pages from it, before switching to struct page backing.
Quoted 5 lines
Quoted 3 lines
And going the pageless route means that you must disallow
MAP_PRIVATEPROT_WRITEmappings, I trust that isn't a problem for you?Should not but I need to look more closely.
If you do need to, then if your pfns are contiguous in virtual memory, and you can spare vm_pgoff, then you can use remap_pfn_range's method of setting vm_pgoff to the first pfn.
I can add a bit of sanity checking for that as well.
Quoted 5 lines
Quoted 5 lines
mm/memory.c +5
-0+/* Ok, finally just insert the thing.. */ +set_pte_at (mm, addr, pte,pfn_pte (pfn, vma->vm_page_prot)); + + vma->vm_flags |=VM_PFNMAP ; + retval =0 ;
Quoted 8 lines
mm/memory.c int vm_insert_page(struct vm_area_struct · line 1306
Quoted 6 lines
mm/memory.c +6
-0+out_unlock: +pte_unmap_unlock (pte, ptl); +out: +return retval; +} +EXPORT_SYMBOL (vm_insert_pfn);It also needs
update_mmu_cache()I suppose.
Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 11 lines · Nick Piggin
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines
Yep, I see. You just need to be careful about the PFNMAP logic, so the VM knows whether the pte is backed by a struct page or not.
I still need to properly get my head around that one. I can't easily change the VMA during the "switch" but I can tweak the flags on the first nopage after one...
You'll want to clear
VM_PFNMAPafter unmapping all pages from it, before switching to struct page backing.
Which means having a list of all vma's ... I suppose I can look at the truncate code to do that race free but I was hoping I could avoid it (that's the whole point of using unmap_mapping_range() in fact).
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
And going the pageless route means that you must disallow
MAP_PRIVATEPROT_WRITEmappings, I trust that isn't a problem for you?Should not but I need to look more closely.
If you do need to, then if your pfns are contiguous in virtual memory, and you can spare
vm_pgoff, then you can use remap_pfn_range's method of settingvm_pgoffto the first pfn.
Yup. I got that bit.
Quoted 16 lines
I can add a bit of sanity checking for that as well.
Quoted 5 lines
Quoted 5 lines
mm/memory.c +5
-0+/* Ok, finally just insert the thing.. */ +set_pte_at (mm, addr, pte,pfn_pte (pfn, vma->vm_page_prot)); + + vma->vm_flags |=VM_PFNMAP ; + retval =0 ;Quoted 8 lines
mm/memory.c int vm_insert_page(struct vm_area_struct · line 1306
Quoted 6 lines
mm/memory.c +6
-0+out_unlock: +pte_unmap_unlock (pte, ptl); +out: +return retval; +} +EXPORT_SYMBOL (vm_insert_pfn);It also needs
update_mmu_cache()I suppose.
Quoted 2 lines
Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines
You'll want to clear
VM_PFNMAPafter unmapping all pages from it, before switching to struct page backing.Which means having a list of all vma's ... I suppose I can look at the truncate code to do that race free but I was hoping I could avoid it (that's the whole point of using
unmap_mapping_range()in fact).
Yeah I don't think there is any other way to do it.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It also needs
update_mmu_cache()I suppose.Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
But would any get upset if it is called from !pagefault path?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 10 lines · Nick Piggin
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines
You'll want to clear
VM_PFNMAPafter unmapping all pages from it, before switching to struct page backing.Which means having a list of all vma's ... I suppose I can look at the truncate code to do that race free but I was hoping I could avoid it (that's the whole point of using
unmap_mapping_range()in fact).Yeah I don't think there is any other way to do it.
What is the problem if I always keep VM_PFNMAP set ?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It also needs
update_mmu_cache()I suppose.Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
But would any get upset if it is called from !pagefault path?
Probably not... the PTE has been filled so it should be safe, but then, I don't know the details of what non-ppc archs do with that callback.
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 5 lines · Nick Piggin
Quoted 4 lines · Benjamin Herrenschmidt
Quoted 3 lines
You'll want to clear
VM_PFNMAPafter unmapping all pages from it, before switching to struct page backing.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Which means having a list of all vma's ... I suppose I can look at the truncate code to do that race free but I was hoping I could avoid it (that's the whole point of using
unmap_mapping_range()in fact).Yeah I don't think there is any other way to do it.
What is the problem if I always keep
VM_PFNMAPset ?
The VM won't see that you have struct pages backing the ptes, and won't do the right refcounting or rmap stuff... But for file backed mappings, all the critical rmap stuff should be set up at mmap time, so you might have another option to simply always do the nopfn thing, as far as the VM is concerned (ie. even when you do have a struct page)
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It also needs
update_mmu_cache()I suppose.Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
But would any get upset if it is called from !pagefault path?
Probably not... the PTE has been filled so it should be safe, but then, I don't know the details of what non-ppc archs do with that callback.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 13 lines · Nick Piggin
Quoted 12 lines · Benjamin Herrenschmidt
Quoted 10 lines · Nick Piggin
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines
You'll want to clear
VM_PFNMAPafter unmapping all pages from it, before switching to struct page backing.Which means having a list of all vma's ... I suppose I can look at the truncate code to do that race free but I was hoping I could avoid it (that's the whole point of using
unmap_mapping_range()in fact).Yeah I don't think there is any other way to do it.
Quoted 7 lines
Quoted 1 line
What is the problem if I always keep
VM_PFNMAPset ?The VM won't see that you have struct pages backing the ptes, and won't do the right refcounting or rmap stuff... But for file backed mappings, all the critical rmap stuff should be set up at mmap time, so you might have another option to simply always do the nopfn thing, as far as the VM is concerned (ie. even when you do have a struct page)
Any reason why it wouldn't work to flip that bit on the first no_page() after a migration ? A migration always involves destroying all PTEs and is done with a per-object mutex held that no_page() takes too, so we can be pretty sure that the first nopage can set that bit before any PTE is actually inserted in the mapping after all the previous ones have been invalidated... That would avoid having to walk the vma's.
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 6 lines · Nick Piggin
The VM won't see that you have struct pages backing the ptes, and won't do the right refcounting or rmap stuff... But for file backed mappings, all the critical rmap stuff should be set up at mmap time, so you might have another option to simply always do the nopfn thing, as far as the VM is concerned (ie. even when you do have a struct page)
Quoted 6 lines
Any reason why it wouldn't work to flip that bit on the first
no_page()after a migration ? A migration always involves destroying all PTEs and is done with a per-object mutex held thatno_page()takes too, so we can be pretty sure that the first nopage can set that bit before any PTE is actually inserted in the mapping after all the previous ones have been invalidated... That would avoid having to walk the vma's.
Ok I guess that would work. I was kind of thinking that one needs to hold the mmap_sem for writing when changing the flags, but so long as everyone *else* does, then I guess you can get exclusion from just the read lock. And your per-object mutex would prevent concurrent nopages from modifying it.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 18 lines · Nick Piggin
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 5 lines · Nick Piggin
The VM won't see that you have struct pages backing the ptes, and won't do the right refcounting or rmap stuff... But for file backed mappings, all the critical rmap stuff should be set up at mmap time, so you might have another option to simply always do the nopfn thing, as far as the VM is concerned (ie. even when you do have a struct page)
Quoted 6 lines
Any reason why it wouldn't work to flip that bit on the first
no_page()after a migration ? A migration always involves destroying all PTEs and is done with a per-object mutex held thatno_page()takes too, so we can be pretty sure that the first nopage can set that bit before any PTE is actually inserted in the mapping after all the previous ones have been invalidated... That would avoid having to walk the vma's.
Quoted 5 lines
Ok I guess that would work. I was kind of thinking that one needs to hold the
mmap_semfor writing when changing the flags, but so long as everyone *else* does, then I guess you can get exclusion from just the read lock. And your per-object mutex would prevent concurrent nopages from modifying it.
Wouldn't that confuse concurrent readers?
Could it be an option to make it safe for the fault handler to temporarily drop the mmap_sem read lock given that some conditions TBD are met?
In that case it can retake the mmap_sem write lock, do the VMA flags modifications, downgrade and do the pte modifications using a helper, or even use remap_pfn_range() during the time the write lock is held?
/Thomas
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 10 lines · Thomas Hellstrom
Quoted 7 lines · Nick Piggin
On Mon, Oct 09, 2006 at 10:07:50PM +1000, Benjamin Herrenschmidt wrote:
Ok I guess that would work. I was kind of thinking that one needs to hold the
mmap_semfor writing when changing the flags, but so long as everyone *else* does, then I guess you can get exclusion from just the read lock. And your per-object mutex would prevent concurrent nopages from modifying it.Wouldn't that confuse concurrent readers?
I think it should be safe so long as the entire mapping has been unmapped. After that, there is no read path that should care about that flag bit. So long as it is well commented (and maybe done via a helper in mm/memory.c), I can't yet see a problem with it.
Quoted 6 lines
Could it be an option to make it safe for the fault handler to temporarily drop the
mmap_semread lock given that some conditions TBD are met?
In that case it can retake themmap_semwrite lock, do the VMA flags modifications, downgrade and do the pte modifications using a helper, or even useremap_pfn_range()during the time the write lock is held?
When you drop and retake the mmap_sem, you need to start again from find_vma. At which point you technically probably want to start again from the architecture specfic fault code. It sounds difficult but I won't say it can't be done.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 10 lines · Nick Piggin
Quoted 9 lines · Thomas Hellstrom
Quoted 7 lines · Nick Piggin
On Mon, Oct 09, 2006 at 10:07:50PM +1000, Benjamin Herrenschmidt wrote:
Ok I guess that would work. I was kind of thinking that one needs to hold the
mmap_semfor writing when changing the flags, but so long as everyone *else* does, then I guess you can get exclusion from just the read lock. And your per-object mutex would prevent concurrent nopages from modifying it.
Quoted 6 lines
Quoted 1 line
Wouldn't that confuse concurrent readers?
I think it should be safe so long as the entire mapping has been unmapped. After that, there is no read path that should care about that flag bit. So long as it is well commented (and maybe done via a helper in
mm/memory.c), I can't yet see a problem with it.
Should be fine then. Migration does
- take object mutex
- unmap_mapping_range() -> remove all PTEs for all mappings to that object
- do whatever is needed for actual migration (copy data etc...)
- release object mutex
And nopage() does
- take object mutex
- check object flags consistency, possibly update VMA (also possibly updaet VMA pgprot too while at it for cacheable vs. non cacheable, though it's not strictly necessary if we use the helper)
- if object is in ram
- get struct page
- drop mutex
- return struct page
- else
- get pfn
- use helper to install PTE
- drop mutex
- return NOPAGE_REFAULT
We don't strictly have to return struct page when the object is in ram but I feel like it's better for accounting.
Now there is still the question of where that RAM comes from, how it gets accounted, and wether there is any way we can make it swappable (which complicates things but would be nice as objects can be fairly big and we may end up using a significant amount of physical memory with the graphic objects).
Quoted 11 lines
Quoted 6 lines
Could it be an option to make it safe for the fault handler to temporarily drop the
mmap_semread lock given that some conditions TBD are met?
In that case it can retake themmap_semwrite lock, do the VMA flags modifications, downgrade and do the pte modifications using a helper, or even useremap_pfn_range()during the time the write lock is held?When you drop and retake the
mmap_sem, you need to start again fromfind_vma. At which point you technically probably want to start again from the architecture specfic fault code. It sounds difficult but I won't say it can't be done.
I can be done with returning NOPAGE_REFAULT but as you said, I don't think it's necessary.
Cheers,
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 12 lines · Benjamin Herrenschmidt
Quoted 11 lines
Quoted 5 lines
Could it be an option to make it safe for the fault handler to temporarily drop the
mmap_semread lock given that some conditions TBD are met?
In that case it can retake themmap_semwrite lock, do the VMA flags modifications, downgrade and do the pte modifications using a helper, or even useremap_pfn_range()during the time the write lock is held?When you drop and retake the
mmap_sem, you need to start again fromfind_vma. At which point you technically probably want to start again from the architecture specfic fault code. It sounds difficult but I won't say it can't be done.
Quoted 4 lines
I can be done with returning
NOPAGE_REFAULTbut as you said, I don't think it's necessary.
Still, even with NOPAGE_REFAULT or the equivalent with the new fault() code,
in the case we need to take this route, (and it looks like we won't have to),
I guess we still need to restart from find_vma() in the fault()/nopage() handler to make sure the VMA is still present. The object mutex need to be dropped as well to avoid deadlocks. Sounds complicated.
Quoted 6 lines
Cheers,
Ben.
/Thomas
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 6 lines
Still, even with
NOPAGE_REFAULTor the equivalent with the newfault()code, in the case we need to take this route, (and it looks like we won't have to),
I guess we still need to restart fromfind_vma()in the fault()/nopage() handler to make sure the VMA is still present. The object mutex need to be dropped as well to avoid deadlocks. Sounds complicated.
But as we said, it should be enough to do the flag change with the object mutex held as long as it's after unmap_mapped_ranges()
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 3 lines
Still, even with
NOPAGE_REFAULTor the equivalent with the newfault()code,
in the case we need to take this route, (and it looks like we won't have to),
I guess we still need to restart fromfind_vma()in the fault()/nopage() handler to make sure the VMA is still present. The object mutex need to be dropped as well to avoid deadlocks. Sounds complicated.But as we said, it should be enough to do the flag change with the object mutex held as long as it's after
unmap_mapped_ranges()Ben.
Agreed.
/Thomas
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Thomas HellstromQuoted 8 lines
Wouldn't that confuse concurrent readers?
Could it be an option to make it safe for the fault handler to temporarily drop the
mmap_semread lock given that some conditions TBD are met?
In that case it can retake themmap_semwrite lock, do the VMA flags modifications, downgrade and do the pte modifications using a helper, or even useremap_pfn_range()during the time the write lock is held?
If we return NOPAGE_REFAULT, then yes, we can drop the mmap sem, though I 'm not sure we need that...
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Nick PigginQuoted 11 lines · Nick Piggin
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It also needs
update_mmu_cache()I suppose.Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
But would any get upset if it is called from !pagefault path?
Probably not... the PTE has been filled so it should be safe, but then, I don't know the details of what non-ppc archs do with that callback.
I guess we can make the rule that it only be called from the ->fault handler anyway. If they want that functionality from ->mmap, then they can use remap_pfn_range, because it isn't so performance critical.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 8 lines · Nick Piggin
Quoted 7 lines · Nick Piggin
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It also needs
update_mmu_cache()I suppose.Hmm, but it might not be called from a pagefault. Can we get away with not calling it? Or is it required by some architectures?
I think some architectures might be upset if it's not called...
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
But would any get upset if it is called from !pagefault path?
Probably not... the PTE has been filled so it should be safe, but then, I don't know the details of what non-ppc archs do with that callback.
I guess we can make the rule that it only be called from the ->fault handler anyway. If they want that functionality from ->mmap, then they can use
remap_pfn_range, because it isn't so performance critical.
Yup. The whole point of the discussion is for cases where we can't just setup a static mapping at mmap time.
Ben.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Nick PigginQuoted 18 lines · Nick Piggin
include/linux/mm.h +14
-0+/* +* fault_data is filled in the the pagefault handler and passed to the +* vma's ->fault function. That function is responsible for filling in +* 'type', which is the type of fault if a page is returned, or the type +* of error if NULL is returned. +*/ +struct fault_data { +struct vm_area_struct *vma; +unsigned long address; +pgoff_t pgoff; +unsigned int flags; + +int type; +};/* * These are the virtual MM functions - opening of an area, closing and
include/linux/mm.h extern pgprot_t protection_map[16]; · line 224
Quoted 4 lines
include/linux/mm.h +1
-0@@ -203,6 +221,7 @@ extern pgprot_t protection_map[16];struct vm_operations_struct {void (*open)(struct vm_area_struct * area);void (*close)(struct vm_area_struct * area); +struct page * (*fault)(struct fault_data * data);
Please pass the vma as an explicit first argument so that all vm_operations operate on a vma. It's also much cleaner to have the separate between the the object operated on (the vma) and all the fault details (struct fault_data).
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 16 lines · Christoph Hellwig
Quoted 15 lines · Nick Piggin
include/linux/mm.h +14
-0+/* +* fault_data is filled in the the pagefault handler and passed to the +* vma's ->fault function. That function is responsible for filling in +* 'type', which is the type of fault if a page is returned, or the type +* of error if NULL is returned. +*/ +struct fault_data { +struct vm_area_struct *vma; +unsigned long address; +pgoff_t pgoff; +unsigned int flags; + +int type; +};
Quoted 11 lines
include/linux/mm.h extern pgprot_t protection_map[16]; · line 224
Quoted 7 lines
/*
* These are the virtual MM functions - opening of an area, closing andinclude/linux/mm.h +1
-0@@ -203,6 +221,7 @@ extern pgprot_t protection_map[16];struct vm_operations_struct {void (*open)(struct vm_area_struct * area);void (*close)(struct vm_area_struct * area); +struct page * (*fault)(struct fault_data * data);Please pass the vma as an explicit first argument so that all
vm_operationsoperate on a vma. It's also much cleaner to have the separate between the the object operated on (the vma) and all the fault details (structfault_data).
Hmm... I agree it is more consistent, but OTOH if we're passing a structure I thought it may as well just go in there. But I will change unless anyone comes up with an objection.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 29 lines · On Tue, 10 Oct 2006 14:13:27 +0200 Nick Piggin <[email protected]> wrote:
Quoted 16 lines · Christoph Hellwig
Quoted 15 lines · Nick Piggin
include/linux/mm.h +14
-0+/* +* fault_data is filled in the the pagefault handler and passed to the +* vma's ->fault function. That function is responsible for filling in +* 'type', which is the type of fault if a page is returned, or the type +* of error if NULL is returned. +*/ +struct fault_data { +struct vm_area_struct *vma; +unsigned long address; +pgoff_t pgoff; +unsigned int flags; + +int type; +};Quoted 11 lines
include/linux/mm.h extern pgprot_t protection_map[16]; · line 224
Quoted 7 lines
/*
* These are the virtual MM functions - opening of an area, closing andinclude/linux/mm.h +1
-0@@ -203,6 +221,7 @@ extern pgprot_t protection_map[16];struct vm_operations_struct {void (*open)(struct vm_area_struct * area);void (*close)(struct vm_area_struct * area); +struct page * (*fault)(struct fault_data * data);Please pass the vma as an explicit first argument so that all
vm_operationsoperate on a vma. It's also much cleaner to have the separate between the the object operated on (the vma) and all the fault details (structfault_data).
Quoted 3 lines
Hmm... I agree it is more consistent, but OTOH if we're passing a structure I thought it may as well just go in there. But I will change unless anyone comes up with an objection.
I'd agree that it's more attractive to have the vma* in the argument list, but it presumably adds runtime cost: cycles and stack depth. I don't how much though.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: SPAM: Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 10 lines · Andrew Morton
Quoted 4 lines · On Tue, 10 Oct 2006 14:13:27 +0200 Nick Piggin <[email protected]> wrote:
Hmm... I agree it is more consistent, but OTOH if we're passing a structure I thought it may as well just go in there. But I will change unless anyone comes up with an objection.
I'd agree that it's more attractive to have the vma* in the argument list, but it presumably adds runtime cost: cycles and stack depth. I don't how much though.
Possibly, though I considered it might end up in a register, and considering that the vma is used both before and after the call, and in filemap_nopage, it's quite possible that it saves a load and does not harm stack depth. Maybe?
I don't know, I guess we can tweak it while it is in -mm?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 2 lines · Carsten Otte
As for the
filemap_xipchanges, looks nice as far as I can tell. I will test that change for xip.
Actually, filemap_xip needs some attention I think... if xip files can be truncated or invalidated (I assume they can), then we need to lock the page, validate that it is the correct one and not truncated, and return with it locked.
That should be as simple as just locking the page and rechecking i_size, but maybe the zero page can be handled better... I don't know?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Hi Nick,
Quoted 4 lines · Nick Piggin
Actually,
filemap_xipneeds some attention I think... if xip files can be truncated or invalidated (I assume they can), then we need to lock the page, validate that it is the correct one and not truncated, and return with it locked.
???
Isn't XIP for "eXecuting In Place" from ROM or FLASH? How to truncate these? I thought the whole idea of XIP was a pure RO mapping?
They should be valid from mount to umount.
Regards
Ingo Oeser, a bit puzzled about that...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Hi Ingo,
Quoted 10 lines · Ingo Oeser
Hi Nick,
Quoted 4 lines · Nick Piggin
Actually,
filemap_xipneeds some attention I think... if xip files can be truncated or invalidated (I assume they can), then we need to lock the page, validate that it is the correct one and not truncated, and return with it locked.
Quoted 3 lines
???
Isn't XIP for "eXecuting In Place" from ROM or FLASH?
Yes, I assume so. It seems that it isn't restricted to executing, but is basically a terminology to mean that it bypasses the pagecache.
Quoted 2 lines
How to truncate these? I thought the whole idea of XIP was a pure RO mapping?
Well, not filemap_xip.
Quoted 6 lines
They should be valid from mount to umount.
Regards
Ingo Oeser, a bit puzzled about that...
See mm/filemap_xip.c:xip_file_write, xip_truncate_page.
Thanks,
Nick
Signature · 8 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
In reply to Nick PigginQuoted 4 lines · Nick Piggin
Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings.
Hi Nick,
what is the status of this patch? I'm just trying to line up a kernel tree for the new DRM memory management code, which really would like this...
Dave.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch 3/3] mm: fault handler to replace nopage and populate
Quoted 7 lines · Dave Airlie
Quoted 4 lines · Nick Piggin
Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes the virtual address -> file offset differently from linear mappings.
Quoted 7 lines
Hi Nick,
what is the status of this patch? I'm just trying to line up a kernel tree for the new DRM memory management code, which really would like this...
Dave.
Hi Dave,
Blocked by another kernel bug at the moment. I hope both fixes can make it into 2.6.20, but if that doesn't look like it will happen, then I might try reworking the patchset to break the ->fault change out by itself because there are several others who would like to use it as well.
Signature · 8 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>