--- linux-2.2.10/mm/filemap.c Tue Jul 13 00:33:10 1999 +++ linux-2.2.10-no_swapout/mm/filemap.c Tue Jul 13 01:04:23 1999 @@ -140,7 +140,7 @@ struct page * page; int count; - count = limit >> priority; + count = limit / priority; page = mem_map + clock; do { --- linux-2.2.10/mm/vmscan.c Tue Jul 13 00:33:04 1999 +++ linux-2.2.10-no_swapout/mm/vmscan.c Tue Jul 13 01:12:14 1999 @@ -324,7 +324,7 @@ * Think of swap_cnt as a "shadow rss" - it tells us which process * we want to page out (always try largest first). */ - counter = nr_tasks / (priority+1); + counter = nr_tasks / priority; if (counter < 1) counter = 1; if (counter > nr_tasks) @@ -385,7 +385,7 @@ /* Always trim SLAB caches when memory gets low. */ kmem_cache_reap(gfp_mask); - priority = 6; + priority = 5; do { while (shrink_mmap(priority, gfp_mask)) { if (!--count) @@ -407,11 +407,11 @@ } shrink_dcache_memory(priority, gfp_mask); - } while (--priority >= 0); + } while (--priority > 0); done: unlock_kernel(); - return priority >= 0; + return priority > 0; } /* --- linux-2.2.10/fs/dcache.c Tue Jul 13 00:33:04 1999 +++ linux-2.2.10-no_swapout/fs/dcache.c Tue Jul 13 01:05:31 1999 @@ -473,7 +473,7 @@ { if (gfp_mask & __GFP_IO) { int count = 0; - if (priority) + if (priority > 1) count = dentry_stat.nr_unused / priority; prune_dcache(count); } --- linux-2.2.10/ipc/shm.c Tue Jul 13 00:33:10 1999 +++ linux-2.2.10-no_swapout/ipc/shm.c Tue Jul 13 01:05:02 1999 @@ -667,7 +667,7 @@ } /* - * Goes through counter = (shm_rss >> prio) present shm pages. + * Goes through counter = (shm_rss / prio) present shm pages. */ static unsigned long swap_id = 0; /* currently being swapped */ static unsigned long swap_idx = 0; /* next to swap */ @@ -681,7 +681,7 @@ int loop = 0; int counter; - counter = shm_rss >> prio; + counter = shm_rss / prio; if (!counter || !(swap_nr = get_swap_page())) return 0;