The patch titled optimize follow_pages() has been removed from the -mm tree. Its filename is optimize-follow_pages.patch This patch was probably dropped from -mm because it has now been merged into a subsystem tree or into Linus's tree, or because it was folded into its parent patch in the -mm tree. ------------------------------------------------------ Subject: optimize follow_pages() From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Christoph Lameter suggested I pull set_page_dirty() out from under the pte lock. I reviewed the current calls and found the one in follow_page() a candidate for the same treatment. Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Cc: Christoph Lameter <clameter@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/mm.h | 1 + mm/memory.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff -puN include/linux/mm.h~optimize-follow_pages include/linux/mm.h --- devel/include/linux/mm.h~optimize-follow_pages 2006-05-22 13:11:29.000000000 -0700 +++ devel-akpm/include/linux/mm.h 2006-05-22 13:11:29.000000000 -0700 @@ -1025,6 +1025,7 @@ struct page *follow_page(struct vm_area_ #define FOLL_TOUCH 0x02 /* mark page accessed */ #define FOLL_GET 0x04 /* do get_page on page */ #define FOLL_ANON 0x08 /* give ZERO_PAGE if no pgtable */ +#define FOLL_DIRTY 0x10 /* the page was dirtied */ #ifdef CONFIG_PROC_FS void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); diff -puN mm/memory.c~optimize-follow_pages mm/memory.c --- devel/mm/memory.c~optimize-follow_pages 2006-05-22 13:11:29.000000000 -0700 +++ devel-akpm/mm/memory.c 2006-05-22 13:11:29.000000000 -0700 @@ -948,18 +948,28 @@ struct page *follow_page(struct vm_area_ if (unlikely(!page)) goto unlock; - if (flags & FOLL_GET) + if (flags & (FOLL_GET | FOLL_TOUCH)) get_page(page); if (flags & FOLL_TOUCH) { if ((flags & FOLL_WRITE) && !pte_dirty(pte) && !PageDirty(page)) + flags |= FOLL_DIRTY; + } + + pte_unmap_unlock(ptep, ptl); + + if (flags & FOLL_TOUCH) { + if (flags & FOLL_DIRTY) set_page_dirty(page); mark_page_accessed(page); } + if (!(flags & FOLL_GET)) + put_page(page); + goto out; + unlock: pte_unmap_unlock(ptep, ptl); -out: - return page; + goto out; no_page_table: /* @@ -972,6 +982,7 @@ no_page_table: get_page(page); BUG_ON(flags & FOLL_WRITE); } +out: return page; } _ Patches currently in -mm which might be from a.p.zijlstra@xxxxxxxxx are buglet-in-radix_tree_tag_set.patch optimize-follow_pages.patch swap-prefetch-fix-lru_cache_add_tail.patch swap-prefetch-fix-lru_cache_add_tail-tidy.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html