Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757273AbYC1SUG (ORCPT ); Fri, 28 Mar 2008 14:20:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757651AbYC1STw (ORCPT ); Fri, 28 Mar 2008 14:19:52 -0400 Received: from gw.goop.org ([64.81.55.164]:47037 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757650AbYC1STv (ORCPT ); Fri, 28 Mar 2008 14:19:51 -0400 Message-ID: <47ED36AC.9000807@goop.org> Date: Fri, 28 Mar 2008 11:19:24 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: KAMEZAWA Hiroyuki CC: Yasunori Goto , Ingo Molnar , LKML , Rusty Russell , Christoph Lameter , Dave Hansen , Andrew Morton Subject: Re: [PATCH 2 of 4] hotplug-memory: adding non-section-aligned memory is bad References: <20080328102719.3ab9162b.kamezawa.hiroyu@jp.fujitsu.com> <20080328102342.B0BF.E1E9C6FF@jp.fujitsu.com> <20080328105406.5dc61c6c.kamezawa.hiroyu@jp.fujitsu.com> <47EC5440.5020107@goop.org> <20080328113312.65cca8b5.kamezawa.hiroyu@jp.fujitsu.com> <47EC5D2E.8060001@goop.org> <20080328121758.7f355925.kamezawa.hiroyu@jp.fujitsu.com> <47EC7202.3040009@goop.org> <20080328133940.dc3be13d.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20080328133940.dc3be13d.kamezawa.hiroyu@jp.fujitsu.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 25 KAMEZAWA Hiroyuki wrote: >> What would happen if I did online_pages(pfn, 1) on each page as I >> populate it? >> >> > I think (hope) it works well. But it seems no one tries to do that. Well I had immediate problems because I try to use it under spinlock and it calls online_pages -> build_all_zonelists -> stop_machine_run. I can easily rearrange to fix that, but it seems to me that stop_machine_run() is probably too expensive to call thousands of times (one for each page, rather than once per section). I'm just looking at how I can refactor online_pages() into a function which does the general zone setup stuff, and one for actually onlining pages. The function of online_pages() would remain unchanged for existing users, but I could call the pieces separately at the appropriate times. J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/