small patch for do_wp_page

Philip Blundell (Philip.Blundell@pobox.com)
Wed, 25 Aug 1999 23:15:02 +0100


As far as I can tell there is no point flushing the ZERO_PAGE to RAM. Does
this patch seem reasonable? (It's against 2.3.12 if that matters.)

p.

--- linux/mm/memory.c Sun Aug 8 18:54:35 1999
+++ linux/mm/memory.c Tue Aug 10 20:51:23 1999
@@ -60,6 +60,7 @@ static inline void copy_cow_page(unsigne
return;
}
copy_page(to, from);
+ flush_page_to_ram(from);
}

mem_map_t * mem_map = NULL;
@@ -848,7 +849,6 @@ static int do_wp_page(struct task_struct
if (PageReserved(page))
++vma->vm_mm->rss;
copy_cow_page(old_page,new_page);
- flush_page_to_ram(old_page);
flush_page_to_ram(new_page);
flush_cache_page(vma, address);
set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));

-
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/