From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750967AbXCRT2j (ORCPT ); Sun, 18 Mar 2007 15:28:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750888AbXCRT2j (ORCPT ); Sun, 18 Mar 2007 15:28:39 -0400 Received: from smtp.osdl.org ([65.172.181.24]:50503 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbXCRT2i (ORCPT ); Sun, 18 Mar 2007 15:28:38 -0400 Date: Sun, 18 Mar 2007 11:28:20 -0800 From: Andrew Morton To: Mel Gorman Cc: Mariusz Kozlowski , Andy Whitcroft , Linux Kernel Mailing List Subject: Re: [PATCH] Bias the location of pages freed for min_free_kbytes in the same MAX_ORDER_NR_PAGES blocks Message-Id: <20070318112820.90be0449.akpm@linux-foundation.org> In-Reply-To: References: <20070307201839.6f45735b.akpm@linux-foundation.org> <200703142006.04547.m.kozlowski@tuxland.pl> <20070314170738.d5d35c06.akpm@linux-foundation.org> <20070317182641.GA19447@skynet.ie> <20070318002244.606cfe08.akpm@linux-foundation.org> <20070318101259.f6e524f2.akpm@linux-foundation.org> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 Mar 2007 19:05:41 +0000 (GMT) Mel Gorman wrote: > > How much additional memory consumption are we expecting here? > > > > Short answer, about 1.5KB on a 1GB system of which 1.3KB is statically > defined in the 3 struct zones on a 1 node x86 system. > > Longer answer that I hopefully have not made any mistakes in - There is > the zone overhead which is statically sized and a runtime overhead which > depends on the amount of memory in the system. The additional zone > overhead is the overhead for additional freelists (larger struct > free_area) and is as follows; > > (MIGRATE_TYPES-1) * sizeof(list_head) * (MAX_ORDER-1) > > so, on 32 bit in general, thats > > 4 * 8 * 10 = 320 bytes per zone (would be 240 bytes if MIGRATE_RESERVE is > sufficient for higher order allocations > instead of MIGRATE_HIGHALLOC) > > on x86 with DMA, Normal and HighMem, thats 1280 bytes. On a NUMA system, > it's 1280 bytes per node. On 64 bit, it would be double because of the > larger pointer size. At worst, I guess you are looking at 3KB per node. That a very modest overhead - not worth the config option, IMO. The runtime overhead might be a concern - is it possible to quantify it?