From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759735Ab0KRQel (ORCPT ); Thu, 18 Nov 2010 11:34:41 -0500 Received: from gir.skynet.ie ([193.1.99.77]:41473 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759457Ab0KRQej (ORCPT ); Thu, 18 Nov 2010 11:34:39 -0500 Date: Thu, 18 Nov 2010 16:34:24 +0000 From: Mel Gorman To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , 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 Subject: Re: [PATCH 62 of 66] disable transparent hugepages by default on small systems Message-ID: <20101118163424.GH8135@csn.ul.ie> References: <5791385d8111de4b5143.1288798117@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <5791385d8111de4b5143.1288798117@v2.random> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 03, 2010 at 04:28:37PM +0100, Andrea Arcangeli wrote: > From: Rik van Riel > > On small systems, the extra memory used by the anti-fragmentation > memory reserve and simply because huge pages are smaller than large > pages can easily outweigh the benefits of less TLB misses. > A less obvious concern is if run on a NUMA machine with asymmetric node sizes and one of them is very small. The reserve could make the node unusable. I've only seen it happen once in practice (via hugeadm) but it was also a <1G machine with 4 nodes (don't ask me why). > In case of the crashdump kernel, OOMs have been observed due to > the anti-fragmentation memory reserve taking up a large fraction > of the crashdump image. > > This patch disables transparent hugepages on systems with less > than 1GB of RAM, but the hugepage subsystem is fully initialized > so administrators can enable THP through /sys if desired. > > v2: reduce the limit to 512MB > > Signed-off-by: Rik van Riel > Acked-by: Avi Kiviti > Signed-off-by: Andrea Arcangeli Acked-by: Mel Gorman -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with ESMTP id E66026B008A for ; Thu, 18 Nov 2010 11:34:46 -0500 (EST) Date: Thu, 18 Nov 2010 16:34:24 +0000 From: Mel Gorman Subject: Re: [PATCH 62 of 66] disable transparent hugepages by default on small systems Message-ID: <20101118163424.GH8135@csn.ul.ie> References: <5791385d8111de4b5143.1288798117@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <5791385d8111de4b5143.1288798117@v2.random> Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , 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: On Wed, Nov 03, 2010 at 04:28:37PM +0100, Andrea Arcangeli wrote: > From: Rik van Riel > > On small systems, the extra memory used by the anti-fragmentation > memory reserve and simply because huge pages are smaller than large > pages can easily outweigh the benefits of less TLB misses. > A less obvious concern is if run on a NUMA machine with asymmetric node sizes and one of them is very small. The reserve could make the node unusable. I've only seen it happen once in practice (via hugeadm) but it was also a <1G machine with 4 nodes (don't ask me why). > In case of the crashdump kernel, OOMs have been observed due to > the anti-fragmentation memory reserve taking up a large fraction > of the crashdump image. > > This patch disables transparent hugepages on systems with less > than 1GB of RAM, but the hugepage subsystem is fully initialized > so administrators can enable THP through /sys if desired. > > v2: reduce the limit to 512MB > > Signed-off-by: Rik van Riel > Acked-by: Avi Kiviti > Signed-off-by: Andrea Arcangeli Acked-by: Mel Gorman -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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