Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp415120pxb; Wed, 3 Mar 2021 06:33:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzl2iHmb7DXg1bUHXsnyoay27tRadLeRIPvXx8h+nUBp6bf2cJ6TDOqX8WqudsqNYNkDKwi X-Received: by 2002:a05:6402:1855:: with SMTP id v21mr25619349edy.310.1614782039585; Wed, 03 Mar 2021 06:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614782039; cv=none; d=google.com; s=arc-20160816; b=TZchSsCiii7NlGiM3tBX61vBEONfh7u+Yb2jWiY7WHuF8uEImzpBOD678rc9zhiBlU HuaR18M0eiAKWzyGgPqmedXKhKrA9YDcA7JMJwTeOo/uvx+dK+xqIqqwslDtf4z981yk S2jVwVT4tX9KcXKtpMojST/6zPXGXTc8UeRm6cE+Dm9hh+wxwCeyXCbTok/SjGhUDrCK YUQEzHKiASvKPuay4TPUaaORcTO7dwYOR9BqQukrZnRoZPG8Bob72cNgTYDudcchFU/K 0hgYKSu7JANkT5wr/JwPc/rd2xiIg4AwK/C8CsN/0Y0+D7kCq08SnXpwiZEaWBL1Z4LZ OHxQ== 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=BeoQctyGjDw5v/fyfueGOvkOxrz9/0GKk5LORaN0mXk=; b=ut5dMdod7uR5UzNPD5VkvnQeWgZvLQYJkr/f1zitIJQCh5+YhuHjMo9b4sIlDrUZPb rjSO8yRhR5gu+KSiZzAQU630YJlMxnU5OzTmh92GIplC4yejHCu33Z8z9XeHqmG45Df7 7by+mkfkqHwCKuHP52jtk2ZemeLoveiVWXfEassbNjmNPYEwgQ6pEiygq0BQ/Yugt1gZ pEipPe3rQGNCxFJQyaSJUkxPnzbXYpewS2jmDhIXlAz4ZI+DfpZ7Mn6hDumbHEHbnGZp juiIk4dawo7L4BuRYIxGo8T+9cYYniUkhy84XHqcdKeyhcDVM6kb9jMmGnGxCDJLcc/x 7V/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=vkZGHm7E; 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 p10si8297599edm.261.2021.03.03.06.33.17; Wed, 03 Mar 2021 06:33:59 -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=vkZGHm7E; 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 S244674AbhCAVeS (ORCPT + 99 others); Mon, 1 Mar 2021 16:34:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238004AbhCARV2 (ORCPT ); Mon, 1 Mar 2021 12:21:28 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4972EC0611BC for ; Mon, 1 Mar 2021 09:18:47 -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=BeoQctyGjDw5v/fyfueGOvkOxrz9/0GKk5LORaN0mXk=; b=vkZGHm7EkMSG0iWx1JDZ7eRsmB jCfKViyC/gDD0eeQc52RRX9+rOtpYf79ydZ3vHpXFQETzfxyZrIzjq7+Ve4SgktxSVpXcClwyPTVG jldDrMQ3fEpWxclDLzssofn7WRf0i/0jPHL7nFDCc+gq7jfKoKl1N5q2zJc3vp/ccyy0lMElUZWhO ZHcr2aw6c9ZDH1qmwE2kPFhXlt2g7/afUOVOUk8s+L4284aIc8OeGAEGGneN97d9bjXYMfHq2c5fg Ox13ZGlg/V3O90As249v32D+KfhSvR9YvwrID5wc+6IW+/rGXQ68ouw267oq1Orcm80+p1i3QXpDv TU3Bozew==; 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 1lGmBi-0000QK-3D; Mon, 01 Mar 2021 17:18:30 +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 90A983003E1; Mon, 1 Mar 2021 18:18:28 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 58D522B973BDA; Mon, 1 Mar 2021 18:18:28 +0100 (CET) Date: Mon, 1 Mar 2021 18:18:28 +0100 From: Peter Zijlstra To: Srikar Dronamraju Cc: Rik van Riel , Ingo Molnar , LKML , Mel Gorman , 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> <20210301170601.GJ2028034@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301170601.GJ2028034@linux.vnet.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 10:36:01PM +0530, Srikar Dronamraju wrote: > * Peter Zijlstra [2021-03-01 16:44:42]: > > > On Sat, Feb 27, 2021 at 02:56:07PM -0500, Rik van Riel wrote: > > > On Fri, 2021-02-26 at 22:10 +0530, Srikar Dronamraju wrote: > > > > > > + if (sched_feat(WA_WAKER) && tnr_busy < tllc_size) > > > > + return this_cpu; > > > > > > I wonder if we need to use a slightly lower threshold on > > > very large LLCs, both to account for the fact that the > > > select_idle_cpu code may not find the single idle CPU > > > among a dozen busy ones, or because on a system with > > > hyperthreading we may often be better off picking another > > > LLC for HT contention issues? > > > > > > Maybe we could use "tnr_busy * 4 < > > > tllc_size * 3" or > > > something like that? > > > > How about: > > > > tnr_busy < tllc_size / topology_max_smt_threads() > > > > ? > > Isn't topology_max_smt_threads only for x86 as of today? > Or Am I missing out? Oh, could be, I didn't grep :/ We could have core code keep track of the smt count I suppose.