lkml.org 
[lkml]   [2004]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: PROBLEM: Doesn't compile without CONFIG_SWAP
On Tue, 13 Apr 2004, haael wrote:
> I was compiling Linux 2.6.5 with -mjb1 patch, trying to get as small
> kernel as possible. I got an error:
> <code>
> CC mm/vmscan.o
> mm/vmscan.c: In function `refill_inactive_zone':
> mm/vmscan.c:650: `swapper_space' undeclared (first use in this function)

Thanks, below should be the right fix (total_swapcache_pages is defined
to swapper_space.nrpages when CONFIG_SWAP=y, to 0 when CONFIG_SWAP=n).

--- 2.6.5-mjb1/mm/vmscan.c 2004-04-10 10:43:46.000000000 +0100
+++ linux/mm/vmscan.c 2004-04-13 16:58:35.009183744 +0100
@@ -647,7 +647,7 @@ refill_inactive_zone(struct zone *zone,
*/
si_meminfo(&i);
app_centile = 100 - ((i.freeram + get_page_cache_size() -
- swapper_space.nrpages) / (i.totalram / 100));
+ total_swapcache_pages) / (i.totalram / 100));

/*
* swap_centile is the percentage of the last (sizeof physical
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.021 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site