From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755874Ab2KUTbw (ORCPT ); Wed, 21 Nov 2012 14:31:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51014 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755768Ab2KUTbv (ORCPT ); Wed, 21 Nov 2012 14:31:51 -0500 Date: Wed, 21 Nov 2012 11:31:49 -0800 From: Andrew Morton To: Jiang Liu Cc: Wen Congyang , David Rientjes , Jiang Liu , Maciej Rutecki , Chris Clayton , "Rafael J . Wysocki" , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , Jianguo Wu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFT PATCH v1 1/5] mm: introduce new field "managed_pages" to struct zone Message-Id: <20121121113149.92e1bcd8.akpm@linux-foundation.org> In-Reply-To: <50ACE708.5050009@gmail.com> References: <20121115112454.e582a033.akpm@linux-foundation.org> <1353254850-27336-1-git-send-email-jiang.liu@huawei.com> <1353254850-27336-2-git-send-email-jiang.liu@huawei.com> <20121119153832.437c7e59.akpm@linux-foundation.org> <50AB9A0B.9090105@gmail.com> <20121120113119.38d2a635.akpm@linux-foundation.org> <50ACE708.5050009@gmail.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2012 22:36:56 +0800 Jiang Liu wrote: > > void mod_zone_managed_pages(struct zone *zone, signed long delta) > > { > > WARN_ON(system_state != SYSTEM_BOOTING && > > !is_locked_memory_hotplug()); > > zone->managed_pages += delta; > > } > This seems a little overhead because __free_pages_bootmem() is on the hot path > and will be called many times at boot time. Maybe, maybe not. These things are measurable so let's not just guess. But I'm not really recommending that we do this - there are all sorts of things we *could* check and warn about, but we don't. Potential errors in this area don't seem terribly important. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx121.postini.com [74.125.245.121]) by kanga.kvack.org (Postfix) with SMTP id 7D22B6B0078 for ; Wed, 21 Nov 2012 14:31:51 -0500 (EST) Date: Wed, 21 Nov 2012 11:31:49 -0800 From: Andrew Morton Subject: Re: [RFT PATCH v1 1/5] mm: introduce new field "managed_pages" to struct zone Message-Id: <20121121113149.92e1bcd8.akpm@linux-foundation.org> In-Reply-To: <50ACE708.5050009@gmail.com> References: <20121115112454.e582a033.akpm@linux-foundation.org> <1353254850-27336-1-git-send-email-jiang.liu@huawei.com> <1353254850-27336-2-git-send-email-jiang.liu@huawei.com> <20121119153832.437c7e59.akpm@linux-foundation.org> <50AB9A0B.9090105@gmail.com> <20121120113119.38d2a635.akpm@linux-foundation.org> <50ACE708.5050009@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Jiang Liu Cc: Wen Congyang , David Rientjes , Jiang Liu , Maciej Rutecki , Chris Clayton , "Rafael J . Wysocki" , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , Jianguo Wu , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Wed, 21 Nov 2012 22:36:56 +0800 Jiang Liu wrote: > > void mod_zone_managed_pages(struct zone *zone, signed long delta) > > { > > WARN_ON(system_state != SYSTEM_BOOTING && > > !is_locked_memory_hotplug()); > > zone->managed_pages += delta; > > } > This seems a little overhead because __free_pages_bootmem() is on the hot path > and will be called many times at boot time. Maybe, maybe not. These things are measurable so let's not just guess. But I'm not really recommending that we do this - there are all sorts of things we *could* check and warn about, but we don't. Potential errors in this area don't seem terribly important. -- 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/ . Don't email: email@kvack.org