Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422791AbWBIDGH (ORCPT ); Wed, 8 Feb 2006 22:06:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422792AbWBIDGH (ORCPT ); Wed, 8 Feb 2006 22:06:07 -0500 Received: from smtp.osdl.org ([65.172.181.4]:50887 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1422791AbWBIDGG (ORCPT ); Wed, 8 Feb 2006 22:06:06 -0500 Date: Wed, 8 Feb 2006 19:05:12 -0800 From: Andrew Morton To: Rik van Riel Cc: linux-kernel@vger.kernel.org, dada1@cosmosbay.com, Linus Torvalds , Ingo Molnar , Andi Kleen , Chuck Ebbert <76306.1226@compuserve.com>, Eric Dumazet , William Lee Irwin III , Heiko Carstens Subject: Re: [PATCH] percpu data: only iterate over possible CPUs Message-Id: <20060208190512.5ebcdfbe.akpm@osdl.org> In-Reply-To: References: <200602051959.k15JxoHK001630@hera.kernel.org> X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-redhat-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 Content-Length: 1367 Lines: 38 Rik van Riel wrote: > > On Sun, 5 Feb 2006, Linux Kernel Mailing List wrote: > > > [PATCH] percpu data: only iterate over possible CPUs > > This sched.c bit breaks Xen, and probably also other architectures > that have CPU hotplug. I suspect the reason is that during early > bootup only the boot CPU is online, so nothing initialises the > runqueues for CPUs that are brought up afterwards. > > I suspect we can get rid of this problem quite easily by moving > runqueue initialisation to init_idle()... We've hit this snag with a few architectures. They're setting up cpu_possible_map too late. It's never been clearly defined. sched_init() is called here: asmlinkage void __init start_kernel(void) { ... printk(linux_banner); setup_arch(&command_line); setup_per_cpu_areas(); smp_prepare_boot_cpu(); sched_init(); Users of __GENERIC_PER_CPU definitely need cpu_possible_map to be initialised by the time setup_per_cpu_areas() is called, so I think it makes sense to say "thou shalt initialise cpu_possible_map in setup_arch()". I guess Xen isn't doing that. Can it be made to? - 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/