From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932606Ab0KCPbm (ORCPT ); Wed, 3 Nov 2010 11:31:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11092 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932485Ab0KCPbR (ORCPT ); Wed, 3 Nov 2010 11:31:17 -0400 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 01 of 66] disable lumpy when compaction is enabled X-Mercurial-Node: ca2fea6527833aad8adcff30cd662dc9b5ebc2ce Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.4.1 Date: Wed, 03 Nov 2010 16:27:36 +0100 From: Andrea Arcangeli To: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Cc: Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Mel Gorman , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrea Arcangeli Compaction is more reliable than lumpy, and lumpy makes the system unusable when it runs. Signed-off-by: Andrea Arcangeli --- 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; } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with SMTP id 4D36E8D0003 for ; Wed, 3 Nov 2010 11:31:11 -0400 (EDT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 01 of 66] disable lumpy when compaction is enabled Message-Id: In-Reply-To: References: Date: Wed, 03 Nov 2010 16:27:36 +0100 From: Andrea Arcangeli Sender: owner-linux-mm@kvack.org To: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Cc: Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Mel Gorman , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: From: Andrea Arcangeli Compaction is more reliable than lumpy, and lumpy makes the system unusable when it runs. Signed-off-by: Andrea Arcangeli --- 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; } -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org