lkml.org 
[lkml]   [2010]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 01 of 66] disable lumpy when compaction is enabled
Date
From
From: Andrea Arcangeli <aarcange@redhat.com>

Compaction is more reliable than lumpy, and lumpy makes the system unusable
when it runs.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -274,6 +274,7 @@ unsigned long shrink_slab(unsigned long
static void set_lumpy_reclaim_mode(int priority, struct scan_control *sc,
bool sync)
{
+#ifndef CONFIG_COMPACTION
enum lumpy_mode mode = sync ? LUMPY_MODE_SYNC : LUMPY_MODE_ASYNC;

/*
@@ -294,11 +295,14 @@ static void set_lumpy_reclaim_mode(int p
sc->lumpy_reclaim_mode = mode;
else
sc->lumpy_reclaim_mode = LUMPY_MODE_NONE;
+#endif
}

static void disable_lumpy_reclaim_mode(struct scan_control *sc)
{
+#ifndef CONFIG_COMPACTION
sc->lumpy_reclaim_mode = LUMPY_MODE_NONE;
+#endif
}

static inline int is_page_cache_freeable(struct page *page)
@@ -321,9 +325,11 @@ static int may_write_to_queue(struct bac
if (bdi == current->backing_dev_info)
return 1;

+#ifndef CONFIG_COMPACTION
/* lumpy reclaim for hugepage often need a lot of write */
if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
return 1;
+#endif
return 0;
}


\
 
 \ /
  Last update: 2010-11-03 16:53    [W:1.108 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site