Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762923AbZLQAWY (ORCPT ); Wed, 16 Dec 2009 19:22:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762845AbZLQAWV (ORCPT ); Wed, 16 Dec 2009 19:22:21 -0500 Received: from hera.kernel.org ([140.211.167.34]:49683 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761766AbZLQAWV (ORCPT ); Wed, 16 Dec 2009 19:22:21 -0500 Message-ID: <4B297A0C.4060009@kernel.org> Date: Thu, 17 Dec 2009 09:23:40 +0900 From: Tejun Heo User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0 MIME-Version: 1.0 To: Christoph Lameter CC: linux-kernel@vger.kernel.org, Mel Gorman , Pekka Enberg , Mathieu Desnoyers Subject: Re: [this_cpu_xx V7 1/8] this_cpu_ops: page allocator conversion References: <20091214220320.665065925@quilx.com> <20091214220339.160361197@quilx.com> <4B270841.2000203@kernel.org> <4B282F9E.7070902@kernel.org> In-Reply-To: X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1928 Lines: 45 Hello, On 12/16/2009 11:55 PM, Christoph Lameter wrote: >>> The boot pageset initialization was moved into __build_all_zonelists(). We >>> could move the zone->pageset initialization there too? >> >> Maybe that is a bit less scary. (at least for me :-) The reason why > > Wel sorry moving the ->pageset assign to __build_all_zonelists does not > work since __build_all_zonelists does not scan through > zones. zone_pcp_init is called reliable first for all zones. I think just > leave it at is. Ah, well, alright. >> I'm a bit worried is that different architectures handle percpu >> pointers differently before setup_per_cpu_areas(). x86 sets up the >> offsets and stuff such that cpu0 can access the original percpu >> section in the kernel image. ia64 sets up everything properly way >> before setup_per_cpu_areas() and in some archs percpu pointers are >> completely invalid before setup_per_cpu_areas(). So, percpu pointer >> being handled in generic code which is being called before percpu >> setup is a bit worrying. > > True but we are not dereferencing a per cpu pointer here. It is simply the > assignment of the unreferenced native per cpu address generated by the > linker. This address is unaffected by allocator bootstrap. Yeap, the code is fine. Probably I'm just being a bit paranoid. If you don't mind, can you please add a comment pointing out that the percpu pointer isn't dereferenced before later initialization is done which happens after percpu initialization? > The assignment of the final per cpu areas (dynamically allocated) occurs > after all the other memory allocators have been bootstrapped. Great, thanks for the explanation. -- tejun -- 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/