From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965117AbcHaQPz convert rfc822-to-8bit (ORCPT ); Wed, 31 Aug 2016 12:15:55 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48506 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935056AbcHaQPr (ORCPT ); Wed, 31 Aug 2016 12:15:47 -0400 Date: Wed, 31 Aug 2016 18:15:06 +0200 From: Sebastian Andrzej Siewior To: Boris Ostrovsky Cc: david.vrabel@citrix.com, jgross@suse.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] xen/x86: Convert to hotplug state machine Message-ID: <20160831161506.e4ahwmcctqzoibci@linutronix.de> References: <1471272407-4292-1-git-send-email-boris.ostrovsky@oracle.com> <1471272407-4292-2-git-send-email-boris.ostrovsky@oracle.com> <20160817083309.fmkksdchqexaxncz@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: NeoMutt/ (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-08-26 15:37:38 [-0400], Boris Ostrovsky wrote: > > If you do find the time, you might manage to rework the code to avoid > > using the _nocalls() function. If see this right, you use > > xen_setup_vcpu_info_placement() for the init in the first place. This > > uses for_each_possible_cpu macro. The cpuhp_setup_state() function would > > perform the init for all CPUs before they come up. > > I am not sure I see what this would buy us. > > Besides, cpuhp_setup_state() uses for_each_present_cpu(). Correct. So you would avoid running the init code on CPUs which are within the for_each_possible_cpu() set but not in for_each_present_cpu(). Assuming a NUMA box with two CPUs, 8 cores each gives you 32 CPUs in Linux with hyper threading. BIOS may report 240 CPUs as the upper limit (possible CPUs) but if you never deploy them you don't need to initialize them… Should they be plugged physically then the for_each_present_cpu() loop will cover them once they come up. Sebastian