From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12726C433DB for ; Thu, 4 Feb 2021 10:50:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9D3E64F4E for ; Thu, 4 Feb 2021 10:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235469AbhBDKue (ORCPT ); Thu, 4 Feb 2021 05:50:34 -0500 Received: from foss.arm.com ([217.140.110.172]:55768 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235436AbhBDKua (ORCPT ); Thu, 4 Feb 2021 05:50:30 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F226111D4; Thu, 4 Feb 2021 02:49:43 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC3E43F719; Thu, 4 Feb 2021 02:49:41 -0800 (PST) Subject: Re: [PATCH 5/8] sched/fair: Make check_misfit_status() only compare dynamic capacities To: Qais Yousef , Valentin Schneider Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Vincent Guittot , Morten Rasmussen , Quentin Perret , Pavan Kondeti , Rik van Riel References: <20210128183141.28097-1-valentin.schneider@arm.com> <20210128183141.28097-6-valentin.schneider@arm.com> <20210203151546.rwkbdjxc2vgiodvx@e107158-lin> From: Dietmar Eggemann Message-ID: Date: Thu, 4 Feb 2021 11:49:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210203151546.rwkbdjxc2vgiodvx@e107158-lin> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2021 16:15, Qais Yousef wrote: > On 01/28/21 18:31, Valentin Schneider wrote: [...] >> @@ -10238,7 +10236,7 @@ static void nohz_balancer_kick(struct rq *rq) >> * When ASYM_CPUCAPACITY; see if there's a higher capacity CPU >> * to run the misfit task on. >> */ >> - if (check_misfit_status(rq, sd)) { >> + if (check_misfit_status(rq)) { Since check_misfit_status() doesn't need sd anymore it looks like that rcu_dereference(per_cpu(sd_asym_cpucapacity, cpu)) could be replaced by static_branch_unlikely(&sched_asym_cpucapacity)) in nohz_balancer_kick(). But as you mentioned in an earlier conversation we do need to check sd because of asymmetric CPU capacity systems w/ exclusive cpusets which could create symmetric islands (unique capacity_orig among CPUs). Maybe worth putting a comment here (similar to the one in sis()) so people don't try to optimize?