From daebe5ee58fa9985c257a1ce5df29fcb258f06d3 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 14 Jan 2003 00:20:32 -0800 Subject: [PATCH] factor free memory into max_sane_readahead() max_sane_readahead() permits the user to readahead up to half-the-inactive-list's worth of pages. Which is totally wrong if most of memory is free. So make the limit be (nr_inactive + nr_free) / 2 --- include/linux/mmzone.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 14ce2049de71..bcb57ed21a8d 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -193,7 +193,8 @@ typedef struct pglist_data { extern int numnodes; extern struct pglist_data *pgdat_list; -void get_zone_counts(unsigned long *active, unsigned long *inactive); +void get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free); void build_all_zonelists(void); void wakeup_kswapd(struct zone *zone); -- cgit v1.2.3