[PATCH] rmap15a incremental diff against 2.4.20-ac1

From: Javier Marcet (jmarcet@pobox.com)
Date: Sun Dec 01 2002 - 22:24:48 EST


I had sent this patch a few hours ago but didn't see it on the list...
Anyway, there was a mistake in the diff I sent so there you go a new
version.
I've merged the incremental diffs of rmap (rmap14c-rmap15 and
rmap15-rmapa) with 2.4.20-ac1
There was no inconsistency but in three spots.
Namely:

    ...from the original rmap...
diff -Nru a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c Mon Nov 18 10:28:28 2002
+++ b/mm/shmem.c Mon Nov 18 10:28:28 2002
@@ -557,7 +557,7 @@
                 unsigned long flags;
 
                 /* Look it up and read it in.. */
- page = find_get_page(&swapper_space, entry->val);
+ page = find_pagecache_page(&swapper_space, entry->val);
                 if (!page) {
                         swp_entry_t swap = *entry;
                         spin_unlock (&info->lock);

    ...to how I left it...
diff -purN linux-2.4.20-ac1/mm/shmem.c linux-2.4.20-ac1-rmap15a/mm/shmem.c
--- linux-2.4.20-ac1/mm/shmem.c 2002-12-01 11:01:04.000000000 +0100
+++ linux-2.4.20-ac1-rmap15a/mm/shmem.c 2002-12-01 10:43:15.000000000 +0100
@@ -593,7 +593,7 @@ repeat:
                 unsigned long flags;
 
                 /* Look it up and read it in.. */
- page = lookup_swap_cache(*entry);
+ page = find_pagecache_page(&swapper_space, entry->val);
                 if (!page) {
                         swp_entry_t swap = *entry;
                         spin_unlock (&info->lock);

I didn't know which version to leave, rmap's or original ac's

Then, this enum was different in -ac than stock, thus I didn't feel too
well when mixing it...
diff -Nru a/include/linux/brlock.h b/include/linux/brlock.h
--- a/include/linux/brlock.h Mon Nov 18 10:28:28 2002
+++ b/include/linux/brlock.h Mon Nov 18 10:28:28 2002
@@ -34,6 +34,7 @@
 enum brlock_indices {
         BR_GLOBALIRQ_LOCK,
         BR_NETPROTO_LOCK,
+ BR_LRU_LOCK,
 
         __BR_END
 };

diff -purN linux-2.4.20-ac1/include/linux/brlock.h linux-2.4.20-ac1-rmap15a/include/linux/brlock.h
--- linux-2.4.20-ac1/include/linux/brlock.h 2002-12-01 11:01:04.000000000 +0100
+++ linux-2.4.20-ac1-rmap15a/include/linux/brlock.h 2002-12-01 10:43:15.000000000 +0100
@@ -37,6 +37,7 @@ enum brlock_indices {
         BR_GLOBALIRQ_LOCK,
         BR_NETPROTO_LOCK,
         BR_LLC_LOCK,
+ BR_LRU_LOCK,
         __BR_END
 };
 

And last, on this one, the wmb() call is not present on -ac. Everything
else was the same.
diff -Nru a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c Mon Nov 18 10:28:28 2002
+++ b/mm/vmscan.c Mon Nov 18 10:28:28 2002
@@ -846,7 +961,7 @@
         /* OK, the VM is very loaded. Sleep instead of using all CPU. */
         kswapd_overloaded = 1;
         set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ / 4);
+ schedule_timeout(HZ / 40);
         kswapd_overloaded = 0;
         wmb();
         return;

Feel free to try it. I'm running it right now and so far no problems.
The vm usage has definitely improved, but there are still slight stalls
when there's a high disk io. Say, in periods of ~2-3s the system stopped
responding for a few cents of a sec, as if it had tachycardia.

--
Javier Marcet <jmarcet@pobox.com>



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:12 EST