Received: by 10.192.165.148 with SMTP id m20csp354103imm; Wed, 2 May 2018 01:11:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpzeusrXKzOQVVs0BxD3fn9V3mdnvCzEjyCq3bLHnbjrwYGoUZbKmNGS2RcVl1tZG+hrpwH X-Received: by 2002:a17:902:ba87:: with SMTP id k7-v6mr11039759pls.193.1525248713395; Wed, 02 May 2018 01:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525248713; cv=none; d=google.com; s=arc-20160816; b=dyzMqyf6ZRv2bjCmJ+Qm44LCTbOmfbYDIRiQ76FyvlYj9RFPUFgnTGbPWivx2QS+Jx q0b4YXILI85n+xVrdXPphij8LzvZqlCpTYilPYHM1eP3xYVfr55S+pFkxIe2J3XBt1BS Cynffh5xZc/JY9IXQ8jRGR1MMzhRJl1zah0uR8v0v2b7Aun3KFV6H2KvEebtu0elNI9X rs2GcgvzwSJrfUwAQMLgVdasUANYjWQBYBDLULS3JtCRK9r7Kv/fFNxrSPHX1r2jJg25 nj6CbLqimpdSRQD8klpi+r5I6hjthQS5nJR4ipsnD7zcIQWgKz4td8rezV6akj0340js qRkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=A8PRrnGb1sX9fORfLYeb6irPObRnSEHfUmGDlXCG+2Q=; b=GDLtj2bzKf6+XJdMajkzkWM6aPFWl8fsg+OKhgW9O2GCKPkR2QxVuNeTboIsXv7KML fclkqyHvlVFMGkDroLh5P3HATfqLOHSSMWl/lqT5NSCTMDaoV7wup9tOun3VAgFz3c0O HFru0op4+feSJ3eYmHGSKDF8oQu8xg6m5/NVCBsupVBFK6SwzwxGLQS2lXPMrc5tuIVX PuKFSDHHmjqRUd6Cb4Ce+7yzGlUXYHXVEaj1KplmQiwkLR+35GNopP5KdoDh9MMnipd2 CssMw5MazSWuxm4Wu7H4UHzts7MlREIq7IY+byHgKotCfx3WzdLnFo0tU1bUo6Juqk/U VOoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26-v6si9264444pgc.677.2018.05.02.01.11.39; Wed, 02 May 2018 01:11:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbeEBILK (ORCPT + 99 others); Wed, 2 May 2018 04:11:10 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:26703 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751317AbeEBILI (ORCPT ); Wed, 2 May 2018 04:11:08 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="39483815" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 02 May 2018 16:11:04 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 500414D0EFD1; Wed, 2 May 2018 16:11:01 +0800 (CST) Received: from localhost.localdomain (10.167.226.106) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 2 May 2018 16:10:59 +0800 Subject: Re: recent patch "x86/acpi: Prevent X2APIC id 0xffffffff from being accounted" To: Jan Beulich CC: , References: <5AE2CF8802000078001BF017@prv1-mh.provo.novell.com> <12fd36d0-1678-ed57-fec3-c94b430bd23f@cn.fujitsu.com> <5AE3130702000078001BF180@prv1-mh.provo.novell.com> <769e14c9-298d-3049-4001-2a8fe903d21e@cn.fujitsu.com> <5AE95D2002000078001BFEC4@prv1-mh.provo.novell.com> From: Dou Liyang Message-ID: <8310e1db-b874-fef1-2068-c8f049c38135@cn.fujitsu.com> Date: Wed, 2 May 2018 16:10:58 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5AE95D2002000078001BFEC4@prv1-mh.provo.novell.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 500414D0EFD1.A88F4 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jan, At 05/02/2018 02:39 PM, Jan Beulich wrote: >>>> On 02.05.18 at 03:56, wrote: >> At 04/27/2018 08:09 PM, Jan Beulich wrote: >>> I'm afraid I don't understand: Limiting the number of disabled CPUs is >>> certainly desirable when those can never be used, but why would you >>> want to do this when they might later get hotplugged? I'm not aware >> >> Let's see the workflow of CPU hotplug: >> >> 1) get the CPU device info from ACPI namespace >> - it contains logical processor id >> >> 2) through the logical processor id, get the LACPI entry in MADT. >> >> 3) generate the CPU for kernel(will create a CPU id, can see by lscpu) >> >> Normally, there are no valid CPU devices in 1) which are mapped to >> the LACPI entries(0xff or 0xffffffff). >> >> The actually number of hotplugged CPUs depends on CPU devices/processors >> in ACPI namespace. The number calculated from MADT is the maximum >> situation which can be cut and doesn't affect CPU hotplug. Don't worry >> about it. >> >> Now, in ACPI-based system, Linux gets the number of possible CPUs by >> MADT, We are going to use the ACPI namespace to make the number >> accurate. But it is so hard, because it's so late to initialize the ACPI >> namespace. > > So are you envisioning a model when the number of disabled CPUs can be > increased once the ACPI interpreter has been enabled? Otherwise the Yes, good idea, but, As Thomas said:   It needs to run _before_ setup_percpu() is invoked to scale everything correctly. > maximum recorded during early boot may be too low with the changes in > question. (And FTR, I agree this number may also be way too large without > them, but it being too large is a resource efficiency problem, while it being > too low is a functionality one.) Too large number will waste vectors, and even cause bugs. IMO, the number will just be more accurate by excluding 0xffffffff, it only equal to, even be larger than the real number of possible CPUs. > > Also, for background, besides wanting to clarify the correctness of these > two changes, I'm also trying to understand whether we want to mirror > them into the Xen hypervisor, which relies on the Dom0 kernel's ACPI > interpreter (i.e. it can and does parse MADT, but can't and doesn't parse > the ACPI name space). Hence late adjustment of the number of > hotpluggable CPUs would be even more problematic in that environment. > I am not familiar with Xen, I will consider that. Thanks, dou > Jan > > > > >