lkml.org 
[lkml]   [2006]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][respin] mm: swap prefetch fix lowmem reserve calc
Date
On Thursday 18 May 2006 17:18, Nick Piggin wrote:
> Anonymous memory is GFP_HIGHUSER, yeah? Anything wrong with
>
> - ns->lowfree[idx] = z->pages_high * 3 + z->lowmem_reserve[idx];
> + ns->lowfree[idx] = z->pages_high * 3 + z->lowmem_reserve[ZONE_HIGHMEM];

I guess not, thanks!
---

Correct the effect lowmem_reserve has on calculation of free limits
in swap_prefetch.

Signed-off-by: Con Kolivas <kernel@kolivas.org>

---
mm/swap_prefetch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.17-rc4-mm1/mm/swap_prefetch.c
===================================================================
--- linux-2.6.17-rc4-mm1.orig/mm/swap_prefetch.c 2006-05-18 15:48:22.000000000 +1000
+++ linux-2.6.17-rc4-mm1/mm/swap_prefetch.c 2006-05-18 17:24:44.000000000 +1000
@@ -276,7 +276,8 @@ static void examine_free_limits(void)

ns = &sp_stat.node[z->zone_pgdat->node_id];
idx = zone_idx(z);
- ns->lowfree[idx] = z->pages_high * 3 + z->lowmem_reserve[idx];
+ ns->lowfree[idx] = z->pages_high * 3 +
+ z->lowmem_reserve[ZONE_HIGHMEM];
ns->highfree[idx] = ns->lowfree[idx] + z->pages_high;

if (z->free_pages > ns->highfree[idx]) {
--
-ck
-
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: 2006-05-18 09:44    [W:0.031 / U:3.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site