From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUll-0001IJ-QE for qemu-devel@nongnu.org; Fri, 22 Jul 2016 03:21:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQUlg-0007nn-Pt for qemu-devel@nongnu.org; Fri, 22 Jul 2016 03:21:12 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56411 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQUlg-0007ni-KB for qemu-devel@nongnu.org; Fri, 22 Jul 2016 03:21:08 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6M7JEO4071186 for ; Fri, 22 Jul 2016 03:21:08 -0400 Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [125.16.236.7]) by mx0b-001b2d01.pphosted.com with ESMTP id 24aj3ydvgp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 22 Jul 2016 03:21:07 -0400 Received: from localhost by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jul 2016 12:51:04 +0530 Date: Fri, 22 Jul 2016 12:50:49 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1469116479-233280-1-git-send-email-imammedo@redhat.com> <1469116479-233280-7-git-send-email-imammedo@redhat.com> <20160722032301.GG15941@voom.fritz.box> <20160722061003.GD7036@in.ibm.com> <20160722071433.GX15941@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160722071433.GX15941@voom.fritz.box> Message-Id: <20160722072049.GE7036@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH 6/8] spapr: init CPUState->cpu_index with index relative to core-id List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Igor Mammedov , qemu-devel@nongnu.org, Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Alexander Graf , Riku Voipio , qemu-ppc@nongnu.org On Fri, Jul 22, 2016 at 05:14:33PM +1000, David Gibson wrote: > On Fri, Jul 22, 2016 at 11:40:03AM +0530, Bharata B Rao wrote: > > On Fri, Jul 22, 2016 at 01:23:01PM +1000, David Gibson wrote: > > > On Thu, Jul 21, 2016 at 05:54:37PM +0200, Igor Mammedov wrote: > > > > It will enshure that cpu_index for a given cpu stays the same > > > > regardless of the order cpus has been created/deleted and so > > > > it would be possible to migrate QEMU instance with out of order > > > > created CPU. > > > > > > > > Signed-off-by: Igor Mammedov > > > > > > So, this isn't quite right (it wasn't right in my version either). > > > > > > The problem occurs when smp_threads < kvmppc_smt_threads(). That is, > > > when the requested threads-per-core is less than the hardware's > > > maximum number of threads-per-core. > > > > > > The core-id values are assigned essentially as i * > > > kvmppc_smt_threads(), meaning the patch below will leave gaps in the > > > cpu_index values and the last ones will exceed max_cpus, causing other > > > problems. > > > > This would lead to hotplug failures as cpu_dt_id is still being > > derived from non-contiguous cpu_index resulting in wrong enumeration > > of CPU nodes in DT. > > Which "This" are you referring to? :) Gaps in cpu_index values due to which cpu_dt_id gets calculated wrongly. Regards, Bharata.