Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3015954imm; Sun, 1 Jul 2018 10:21:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ36voUO2I7LdksKXH4BGmr6uCfaeQfPgfEXfbNrwQ8BKQ3JuajlcRFxczclPfg+PE85xnX X-Received: by 2002:a65:4a04:: with SMTP id s4-v6mr18961654pgq.376.1530465663334; Sun, 01 Jul 2018 10:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530465663; cv=none; d=google.com; s=arc-20160816; b=HsPZhNlU2yGPdrXCd+BM75i4zP4jLb76q9U2SBUjtYaxvrHVPo55IkZ4a/ZGRjoldi xMYQKdnGMvjKZSnm6BNo4eMk1Hf4hS13zCREml8dcrg7Yh1maudLJqifct67ZV7ILMvi RfXHb6O8NoKSUErkNP4UuEPdIfg1k+8RXUqyxPL3P4DhMKjuVURtplryJqlvy9scwSao 4B0ghR7skjInI49jkJacSl301LLE1pjAYC0krEhZgt6V1BI/QJ3b+J4DKK/aPvOWz/Zx 1yE2/Fe/CVzHj0HORged4byXznG2utgZli/cTJFdC03F54smWBkU3YfpgHPHhTCY7ZfY 42xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=CmdEaVZ8G2gpv0zg2PQylB0sTXFTUiqMJEv4z+go3Vs=; b=OxabGwLoZd8iti+68MnJYrmGjcwF7GnmjByWiawojN1qDbyINZdLmhLeqWIgKu+BsS /K1HqaOaiaCpEY5sruo5ETfWSVMQYhKodaASqU1fg/8PBw1jkWZedYKsSYuhIcm8zgXS jJNKtPdRWdusd4sORl7aQUFOrUtPPlbzjgZqwbUs0zPAL2xrNy1NemzrS2YvZYWBjGWl 5cQIZoZ7W6QwHky/bVeo5Putz/kLYFjfwMLR01KDP8Ql3aiHUgYqvEePDr9uK72iBPo6 UwZPdBaPxRMMipwgW1Gxu0ueAa71NU/I2IMCLaVBqIa0pF0JdSCzuSAp3tvmiIIbmCR7 TegQ== 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 m2-v6si12720525pge.466.2018.07.01.10.20.49; Sun, 01 Jul 2018 10:21:03 -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 S934181AbeGARTk (ORCPT + 99 others); Sun, 1 Jul 2018 13:19:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36774 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030981AbeGAQip (ORCPT ); Sun, 1 Jul 2018 12:38:45 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C592A92B; Sun, 1 Jul 2018 16:38:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Akshay Adiga , Michael Ellerman Subject: [PATCH 4.17 051/220] powerpc/powernv/cpuidle: Init all present cpus for deep states Date: Sun, 1 Jul 2018 18:21:15 +0200 Message-Id: <20180701160910.457887906@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Akshay Adiga commit ac9816dcbab53c57bcf1d7b15370b08f1e284318 upstream. Init all present cpus for deep states instead of "all possible" cpus. Init fails if a possible cpu is guarded. Resulting in making only non-deep states available for cpuidle/hotplug. Stewart says, this means that for single threaded workloads, if you guard out a CPU core you'll not get WoF (Workload Optimised Frequency), which means that performance goes down when you wouldn't expect it to. Fixes: 77b54e9f213f ("powernv/powerpc: Add winkle support for offline cpus") Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: Akshay Adiga Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/powernv/idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -79,7 +79,7 @@ static int pnv_save_sprs_for_deep_states uint64_t msr_val = MSR_IDLE; uint64_t psscr_val = pnv_deepest_stop_psscr_val; - for_each_possible_cpu(cpu) { + for_each_present_cpu(cpu) { uint64_t pir = get_hard_smp_processor_id(cpu); uint64_t hsprg0_val = (uint64_t)paca_ptrs[cpu]; @@ -814,7 +814,7 @@ static int __init pnv_init_idle_states(v int cpu; pr_info("powernv: idle: Saving PACA pointers of all CPUs in their thread sibling PACA\n"); - for_each_possible_cpu(cpu) { + for_each_present_cpu(cpu) { int base_cpu = cpu_first_thread_sibling(cpu); int idx = cpu_thread_in_core(cpu); int i;