]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - mm/ksm.c
Fix corrupted OSF partition table parsing
[mv-sheeva.git] / mm / ksm.c
index 33781de0b6bf2420540c14525f7278a03944e519..c2b2a94f9d6773d1be1aece2387d6a6a52b1ae33 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1296,6 +1296,18 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page)
 
        slot = ksm_scan.mm_slot;
        if (slot == &ksm_mm_head) {
+               /*
+                * A number of pages can hang around indefinitely on per-cpu
+                * pagevecs, raised page count preventing write_protect_page
+                * from merging them.  Though it doesn't really matter much,
+                * it is puzzling to see some stuck in pages_volatile until
+                * other activity jostles them out, and they also prevented
+                * LTP's KSM test from succeeding deterministically; so drain
+                * them here (here rather than on entry to ksm_do_scan(),
+                * so we don't IPI too often when pages_to_scan is set low).
+                */
+               lru_add_drain_all();
+
                root_unstable_tree = RB_ROOT;
 
                spin_lock(&ksm_mmlist_lock);