Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3343967pxb; Mon, 1 Mar 2021 07:45:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4/xyE2g5tvc9qKNETZ0m6eMo/1gAPC+7Tr1GBuUMVbyX93F3fES+vFE2eJkofLggMYpQP X-Received: by 2002:a50:bf47:: with SMTP id g7mr16687139edk.323.1614613504501; Mon, 01 Mar 2021 07:45:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614613504; cv=none; d=google.com; s=arc-20160816; b=f0UMjXd0I3QJqN+c4OvL+yo0MLItg/PmLVkEDFqX3vZmLLN9HSvnklgIkamzSBce7B +1NRuACfh1N/o/DbLsmkwThMDYRFkpJjK3EXtX5M0YfrRFOa6FKEq/mUimJkCAfTgXpH lFLmpnYlBqv0KmRK3UYLDUYA6h0nRiCfIIRqdTKsAZuM69xaq3zZ99+Kj3xiWdH+Yjhs Ombkqljq2+O+0Sjl+XDrB3jCXAHpqEOc8FuYoypueBMLF84RV0Pa0l039B5hiJY0tFoo +JXwyx9mN/SsYTevETu63w4Woccj1+cxvFxj8dKQKD3dgyIQ2xhCX7JHPdd2csVsFdjs ZGBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6bCu91Y9Ljglob4huEndBp2bwsvB8cz8ka4XeKdQ8WI=; b=0XM1AX+F/dcgjakKZcJV5mwrllhJaNLiy+TBKTHH9QB/GgyCDT7rzJ/npJeMzpGjsT zt3hpc9FNmIdZgrAEz7tFwcwwrhUG65hh5LKneLmJl8UgY8srwDByQvyCjm7c4Mn1p69 m4/VtG/SUjUyMAYn9eogMLDRvzNb2pDCiLYyEce+DL5iLsHwW8pnA1EwvmhlJ4+Xqkc+ 3MfX/UhdS4A+KFjPW6z7McAIg0gV5R9Vonh7p02ECgO2d+9QowfwEOVODLaE5zQlXErv WEJSloKxOfIIwnDZCtsmV1PjlXzsUsQmkkCIyxT9elF++WYcCPaHLobYg91SaBqDsWja WubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=t9CW+70y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si11002737edv.544.2021.03.01.07.44.41; Mon, 01 Mar 2021 07:45:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=t9CW+70y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237350AbhCAPlm (ORCPT + 99 others); Mon, 1 Mar 2021 10:41:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237137AbhCAPlk (ORCPT ); Mon, 1 Mar 2021 10:41:40 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37BD8C061756 for ; Mon, 1 Mar 2021 07:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6bCu91Y9Ljglob4huEndBp2bwsvB8cz8ka4XeKdQ8WI=; b=t9CW+70yCH5q8TdbYhSqTX8bAk 7AXoGWU+vVTccSlMkxbNyxJZAzxkdmNjuWAExsbsKOfGoYCWc2fRAhqpy3D03gWbnPczY5Wa2dWXQ ZC8z69Id2K3+rw5eIn7it/bIwT1cUSy4O4VhKs4BtaUZ8kPn4Aqhb+7Qqe3z7q9+sM383os3+W7F2 F1Xw8oHf+5x+7mdDB685OEyePFL5DKWLK7YdiCnNchs+xGadDfi5hDK9opAeZDMK6l+m4PXYhbYlw 051Za9kop2nyvJ4IOpBxAbgsTPBAuuLO+tXxpONP4vQv/p9DO+VHACWrUb37NWWCUVrbNUOtHcmD/ 0pRR2/tw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1lGkex-00052a-OJ; Mon, 01 Mar 2021 15:40:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8BE8B3003E1; Mon, 1 Mar 2021 16:40:33 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 702A120849103; Mon, 1 Mar 2021 16:40:33 +0100 (CET) Date: Mon, 1 Mar 2021 16:40:33 +0100 From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , LKML , Mel Gorman , Rik van Riel , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Dietmar Eggemann , Michael Ellerman , Michael Neuling , Gautham R Shenoy , Parth Shah Subject: Re: [PATCH] sched/fair: Prefer idle CPU to cache affinity Message-ID: References: <20210226164029.122432-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226164029.122432-1-srikar@linux.vnet.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 10:10:29PM +0530, Srikar Dronamraju wrote: > +static int prefer_idler_llc(int this_cpu, int prev_cpu, int sync) > +{ > + struct sched_domain_shared *tsds, *psds; > + int pnr_busy, pllc_size, tnr_busy, tllc_size, diff; > + > + tsds = rcu_dereference(per_cpu(sd_llc_shared, this_cpu)); > + tnr_busy = atomic_read(&tsds->nr_busy_cpus); > + tllc_size = per_cpu(sd_llc_size, this_cpu); > + > + psds = rcu_dereference(per_cpu(sd_llc_shared, prev_cpu)); > + pnr_busy = atomic_read(&psds->nr_busy_cpus); > + pllc_size = per_cpu(sd_llc_size, prev_cpu); > + nr_busy_cpus is NO_HZ_COMMON So this code that consumes it should be too.