Received: by 10.213.65.68 with SMTP id h4csp732136imn; Tue, 13 Mar 2018 20:30:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELs90ppwESCAMGk902IUpWc5QRXYl2y1p+TXKzkMYw31+fh/6QECqRnqDIuNTvxU/DmPRYpp X-Received: by 10.101.82.203 with SMTP id z11mr2383678pgp.245.1520998251241; Tue, 13 Mar 2018 20:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520998251; cv=none; d=google.com; s=arc-20160816; b=neAGL8jE4VXxrudxH1fCZTMhBTqCwpREHkCv3dcCf1pVUHbl722UOm/i0g2wRbRC9b qASmQBemu+j0eNVn1+akIn4EDGCfKjD+kCWmfiGkKBWt87rZKwCE9jHa1mZM4qNBEX2B XMjLULwnOlk6X082vFY82wlQ02ro6qNDD+f3Yh5uOztnXdyYtPHYceI6HOvxlHd9Zv4i irOFTczm8THRMAxAwEfHCq4bCbfn9rQKGNQ7Ul749X8iCiGfv2tVwomv9WTIOjZURTt2 2k/YSBWE8ipUM9FfWkD08/6HpD1ZqqHy0w1IuMrnp3/hq8UYgVQkKx4MW2PJcmnVb+vd td7Q== 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=NRs7uN9Yqah8SoTTGpYX1mXfKE976YS1uiFuPvoNPKE=; b=TVbSJEHN16/ZkEkSNvjLV6qywjMJaLf8dnkMvzhS96EEqtXJMX/SWJF1fmM0jeISWy 1I0fmzFlHdY9/pF+f1qaUXxH8pGUDAUBMLVreOcUgC17RvjxfSm3wAV6MtFEBydoDnZw 3kD6FhRnDzR9yPQ2XvoORUOjBPoQl8K8BxQDvEVohBf0gaFUc9KaGFm85iJNoFYz2fpr dJiss+mqgeQk7uVbZ1khak7IMJDALTAY/dVuU7NTsCvN4u+fPfDim/e/bqez9irTc8LJ A1bk/iPlS0fabb03ob7OlhQyv+4rvYVPa7ghjfjCja7bYy/KuAwArBkd7UGZWo3UbkbC miFw== 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 j14si1254333pfh.405.2018.03.13.20.30.35; Tue, 13 Mar 2018 20:30:51 -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 S933220AbeCND3l (ORCPT + 99 others); Tue, 13 Mar 2018 23:29:41 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:4224 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750902AbeCND3j (ORCPT ); Tue, 13 Mar 2018 23:29:39 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37805735" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Mar 2018 11:29:37 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 78A9A4D0EFF7; Wed, 14 Mar 2018 11:29:33 +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, 14 Mar 2018 11:29:32 +0800 Subject: Re: [PATCH V3 0/4] genirq/affinity: irq vector spread among online CPUs as far as possible To: "Rafael J. Wysocki" , Artem Bityutskiy CC: Ming Lei , Thomas Gleixner , Jens Axboe , Christoph Hellwig , Linux Kernel Mailing List , , Laurence Oberman References: <20180308105358.1506-1-ming.lei@redhat.com> <1520515113.20980.31.camel@gmail.com> <20180308133440.GA2713@ming.t460p> <20180309012458.GD5228@ming.t460p> <20180309120833.GB30257@ming.t460p> <5e5f3852-5314-c479-245e-d0a575e533a5@cn.fujitsu.com> <1520926721.20980.210.camel@gmail.com> <20180313083535.GA21612@ming.t460p> <1520930375.20980.213.camel@gmail.com> From: Dou Liyang Message-ID: Date: Wed, 14 Mar 2018 11:29:27 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 78A9A4D0EFF7.AEF7E 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 All, At 03/13/2018 05:35 PM, Rafael J. Wysocki wrote: > On Tue, Mar 13, 2018 at 9:39 AM, Artem Bityutskiy wrote: >> On Tue, 2018-03-13 at 16:35 +0800, Ming Lei wrote: >>> Then looks this issue need to fix by making possible CPU count >>> accurate >>> because there are other resources allocated according to >>> num_possible_cpus(), >>> such as percpu variables. >> >> Short term the regression should be fixed. It is already v4.16-rc6, we >> have little time left. > > Right. > >> Longer term, yeah, I agree. Kernel's notion of possible CPU count >> should be realistic. > I did a patch for that, Artem, could you help me to test it. ----------------------->8------------------------- diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 449d86d39965..878abfa0ce30 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -671,6 +671,18 @@ static acpi_status __init acpi_processor_ids_walk(acpi_handle handle, } +static void __init acpi_refill_possible_map(void) +{ + int i; + + reset_cpu_possible_mask(); + + for (i = 0; i < nr_unique_ids; i++) + set_cpu_possible(i, true); + + pr_info("Allowing %d possible CPUs\n", nr_unique_ids); +} + static void __init acpi_processor_check_duplicates(void) { /* check the correctness for all processors in ACPI namespace */ @@ -680,6 +692,9 @@ static void __init acpi_processor_check_duplicates(void) NULL, NULL, NULL); acpi_get_devices(ACPI_PROCESSOR_DEVICE_HID, acpi_processor_ids_walk, NULL, NULL); + + /* make possible CPU count more realistic */ + acpi_refill_possible_map(); } bool acpi_duplicate_processor_id(int proc_id) ------------------------------------------------------------------ > I agree. > > Moreover, there are not too many systems where physical CPU hotplug > actually works in practice AFAICS, so IMO we should default to "no > physical CPU hotplug" and only change that default in special cases > (which may be hard to figure out, but that's a different matter). > Yes, I think so. > What platform firmware tells us may be completely off. > Rafeal, Sorry, I am not sure what you mean :-) . Did you mean no platform firmware can tell us whether physcial CPU hotplug is supported or not? My colleagues also told to me that there is no way in OS to know whether it is supported or not. Thanks dou > >