--- linux-2.6.3-ck2/mm/vmscan.c 2004-02-23 22:53:06.000000000 +1100 +++ linux-2.6.3-ck3pre/mm/vmscan.c 2004-02-25 19:50:00.964024536 +1100 @@ -40,7 +40,9 @@ /* * From 0 .. 100. Higher means more swappy. */ +#ifdef CONFIG_SWAP int vm_swappiness = 0; +#endif static long total_memory; #ifdef ARCH_HAS_PREFETCH @@ -594,7 +596,9 @@ refill_inactive_zone(struct zone *zone, LIST_HEAD(l_active); /* Pages to go onto the active_list */ struct page *page; struct pagevec pvec; +#ifdef CONFIG_SWAP struct sysinfo i; +#endif int reclaim_mapped = 0; long mapped_ratio; long distress; @@ -663,7 +667,6 @@ refill_inactive_zone(struct zone *zone, vm_swappiness = min(app_centile, swap_centile); } else vm_swappiness = 0; -#endif /* CONFIG_SWAP */ /* * Now decide how much we really want to unmap some pages. The mapped @@ -673,6 +676,9 @@ refill_inactive_zone(struct zone *zone, * The distress ratio is important - we don't want to start going oom. */ swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; +#else + swap_tendency = mapped_ratio / 2 + distress; +#endif /* CONFIG_SWAP */ /* * Now use this metric to decide whether to start moving mapped memory --- linux-2.6.3-ck2/kernel/sysctl.c 2004-02-23 22:53:06.000000000 +1100 +++ linux-2.6.3-ck3pre/kernel/sysctl.c 2004-02-25 19:45:51.904962062 +1100 @@ -673,6 +673,7 @@ static ctl_table vm_table[] = { .mode = 0444 /* read-only*/, .proc_handler = &proc_dointvec, }, +#ifdef CONFIG_SWAP { .ctl_name = VM_SWAPPINESS, .procname = "swappiness", @@ -681,6 +682,7 @@ static ctl_table vm_table[] = { .mode = 0444 /* read-only*/, .proc_handler = &proc_dointvec, }, +#endif /* CONFIG_SWAP */ #ifdef CONFIG_HUGETLB_PAGE { .ctl_name = VM_HUGETLB_PAGES,