Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757970AbZLPO5H (ORCPT ); Wed, 16 Dec 2009 09:57:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756731AbZLPO5G (ORCPT ); Wed, 16 Dec 2009 09:57:06 -0500 Received: from nlpi129.sbcis.sbc.com ([207.115.36.143]:59207 "EHLO nlpi129.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754298AbZLPO5F (ORCPT ); Wed, 16 Dec 2009 09:57:05 -0500 Date: Wed, 16 Dec 2009 08:55:52 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@router.home To: Tejun Heo 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 In-Reply-To: <4B282F9E.7070902@kernel.org> Message-ID: References: <20091214220320.665065925@quilx.com> <20091214220339.160361197@quilx.com> <4B270841.2000203@kernel.org> <4B282F9E.7070902@kernel.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2097 Lines: 43 On Wed, 16 Dec 2009, Tejun Heo 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. > 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. > Another thing is that there were attempts to simplify memory > initialization stages such that bootmem is removed and page / k* > allocators can be used earlier which kind of puts percpu allocator in > the dependency loop but I don't think it's something we need to worry > about at this point. We already worried about this earlier. The initialization we are talking about does not require the per cpu allocator to be up. It just requires the static per cpu areas to function with a single pcp while the zonelists are being built. The assignment of the final per cpu areas (dynamically allocated) occurs after all the other memory allocators have been bootstrapped. -- 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/