Received: by 10.213.65.68 with SMTP id h4csp2252218imn; Sun, 8 Apr 2018 23:37:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx49C0Jx/lDQoCstW84dQf9SzQQKuISbvxmRwAslC9/cLCOEjzDrLAHbgk+eD4O1qN+gTeAAb X-Received: by 10.98.178.29 with SMTP id x29mr28502544pfe.44.1523255864825; Sun, 08 Apr 2018 23:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523255864; cv=none; d=google.com; s=arc-20160816; b=fjXY3dTHPIK0ZCU+q0E8mJDKa8jQUxBDG+2tUFrgFPp9T5HnsXbe8J3XaNu50dH3BG RweRB4kXdX7xsJ4zLf64FKvq0qRrPwcbQOzYL+X/oHXH3d24YsmrA6XUDlzCQYCFChDZ qIAzowkQEtZMsG/kfO274d4KZnMU+wfHi6mTZNA7l3yyyGfM1MI/foIqPuQfSpMdijbK qn7++SPbQjimKZMRM5cz7DLLSuolAQ3THzEHl1ZLWg0kqFZcLgxbBWhDmleQIM3xNHMY vMM2xAGq/x25KGv60LhQHeddxb26ailcO1Gg/hcaLpggmZ7z9fjpYz4Gs0ZtfSVZ7OiC HBVw== 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=YVDYJSYmfarKNCtL/AQ8KBGm9IZdTcEEIOg/yfS/03o=; b=dIxJpF726fWWvlNqV63KHdt5RlAsrFu+QFuwyamKy13By+VGMERSImADYH8O4pVGgG +uKtVxxKNLY4wdJYDnvaR8Yl4QCj/2NAiZbC8U+OIH0FkMaQJjdpaTjgeExa/qTj/Fgv eLaRb1JxOIKdF3nq7A4zEmHcpUz7N0xabKYeqmRBs0PlCSbtiKxj5puyK/Vc+1uGWQQk QiFDBiyDtD3WQTm/5lkSGSyR6x52KeKzw4Ea41uWcYD92CSB+6ZxfON/Pf65x/dbBZ9V AZ4p1Lv4UqJ/V2FP3B4Q+peVHgkOq/uutBJxoO45QOv4SW6VqiiEUo6pn7rlSHtjykfx +EEQ== 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 u9-v6si3949562plr.399.2018.04.08.23.37.07; Sun, 08 Apr 2018 23:37:44 -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 S1751799AbeDIGd6 (ORCPT + 99 others); Mon, 9 Apr 2018 02:33:58 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:3704 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751367AbeDIGd5 (ORCPT ); Mon, 9 Apr 2018 02:33:57 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="38704647" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 09 Apr 2018 14:33:49 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 3CB444D0EFE7; Mon, 9 Apr 2018 14:33:45 +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; Mon, 9 Apr 2018 14:33:46 +0800 Subject: Re: [PATCH] genirq: only scan the present CPUs To: Peter Zijlstra CC: Thomas Gleixner , Li RongQing , LKML References: <1522647902-11426-1-git-send-email-lirongqing@baidu.com> <20180403112311.GF4043@hirez.programming.kicks-ass.net> <20180406090228.GI4082@hirez.programming.kicks-ass.net> <20180406090502.GI4129@hirez.programming.kicks-ass.net> From: Dou Liyang Message-ID: <465754fe-8b49-c77c-9425-e077f6faf4df@cn.fujitsu.com> Date: Mon, 9 Apr 2018 14:33:43 +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: <20180406090502.GI4129@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="gbk"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 3CB444D0EFE7.AB25F 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 Peter, At 04/06/2018 05:05 PM, Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 11:02:28AM +0200, Peter Zijlstra wrote: >> On Fri, Apr 06, 2018 at 04:42:14PM +0800, Dou Liyang wrote: >>> Hi Thomas, Peter, >>> >>> At 04/03/2018 07:23 PM, Peter Zijlstra wrote: >>>> On Tue, Apr 03, 2018 at 12:25:56PM +0200, Thomas Gleixner wrote: >>>>> On Mon, 2 Apr 2018, Li RongQing wrote: >>>>> >>>>>> lots of application will read /proc/stat, like ps and vmstat, but we >>>>>> find the reading time are spreading on Purley platform which has lots >>>>>> of possible CPUs and interrupt. >>>>>> >>>>>> To reduce the reading time, only scan the present CPUs, not all possible >>>>>> CPUs, which speeds the reading of /proc/stat 20 times on Purley platform >>>>>> which has 56 present CPUs, and 224 possible CPUs >>>>> >>>>> Why is BIOS/ACPI telling the kernel that there are 224 possible CPUs unless >>>>> it supports physical CPU hotplug. >>>> >>>> BIOS is crap, news at 11. I've got boxes like that too. Use >>>> possible_cpu=$nr if you're bothered by it -- it's what I do. >>>> >>> >>> Yes, I think so. it is a manual way to reset the number. >>> >>> For this situation, I am investigating to restrict the number of >>> possible CPUs automatically, But, due to the limitation of ACPI >>> subsystem, I can do it _before_ setup_percpu_area where the number will >>> be used. > > Ah, did you mean to day "I can _NOT_ do it" ? Still I don't see the ^----------- Oops, yes. > point of frobbing random users if the whole thing is buggered. > If ACPI subsystem can be initialized earlier, we can get the accurate number of possible CPUs from the ACPI namespace. then, we can reset the _cpu_possible_mask_ as the prefill_possible_map() does. So, it can forbid random users. But, It needs the memory to be initialized first, so it can't be called earlier setup_percpu_area() which is evoked earlier than mem_init(). and you are right: "So if you see it enumerates a gazillion empty spots but the system does not in fact support physical hotplug, we should discard those." I will think it more carefully. Thanks, dou > >