Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp401812pxb; Wed, 3 Mar 2021 06:16:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4e+/37hRJE1tHHMWySWqPPKTaCjQqJ4scqWN/cDnZcZ4i3uNHzkipqMamofKTM7znzuTQ X-Received: by 2002:a17:906:82c5:: with SMTP id a5mr8988796ejy.232.1614780964558; Wed, 03 Mar 2021 06:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614780964; cv=none; d=google.com; s=arc-20160816; b=L5tNuvHQixb5xWL5RKfhfZYvP1GdoW0vV29Ki8aqd0VDftzJNoHJxitykeLuUHal2X /LJd8Ov8L9VwJaInNk9Po0AgEpMniYL2IY6sPLGam2v/OzbYR/79uxd62AZsAJ6XU63G y/cx1xVzUIHZ1yGskX/RmHvAeeBUQhoQ973G7mZZT3Z+cOHBb6dtPX5UX1DnCuDX+tbo 89epSRaPYsCN/z4fWljQKUHSLUg8jOT/lLJFLtJ6ci4DaNEY4GsuqEacauujZynu/zSh 4U7ZhjETkf1XfTVQ0p51sbicEpAW/X2q6tLYHIf+UzfIBhqYVSxZR+F4bzCc+ynzyEmQ ciVg== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Wdm3eMJllX+CAw+oYxrLR2rUHAOl7IFKsKKtF3ISOsg=; b=FKoPgiM4auGk+Wiw+xyVnrjEagS4vvlBzz88lVnAyAXYzfT1/Jnqk6nop+zjR67hfh wlOu0B7Y4r1EWIHlG2mjae7H4bBoPYwDpR7cqqd6CcqTD6b59+WeFgPgdmgtC/7FPZi4 GcoGsR2julBHz11Z3keDqo6LPjgJTooJ4o3Bj3UCKrUb1t5WR7huYPF2hkS0PXJdYUeU yqOECKEjwdsdqJlxc2riAdUbcB8nFkpLe1WNo8MhWkdu771wZbUCZBbkXPeXoe2PHYYA bY4vsTVCYeKf10v9IN2NsdHanOsWrVJ9MhUyHaPJ49I+56gK0hahqocgXkLk5CyuS4nG mzPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=G4fQngY3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si16013481ejc.210.2021.03.03.06.14.33; Wed, 03 Mar 2021 06:16: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=@ibm.com header.s=pp1 header.b=G4fQngY3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243453AbhCAUdQ (ORCPT + 99 others); Mon, 1 Mar 2021 15:33:16 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45238 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236780AbhCARHf (ORCPT ); Mon, 1 Mar 2021 12:07:35 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 121H5S4e086163; Mon, 1 Mar 2021 12:06:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : reply-to : references : mime-version : content-type : in-reply-to; s=pp1; bh=Wdm3eMJllX+CAw+oYxrLR2rUHAOl7IFKsKKtF3ISOsg=; b=G4fQngY3IqOaaDZClfqJnCK395q5eKyAT2xM8teHmwlr7iG0N3fLp+74QS6nK59OrC+H 0Dmnkcv1+RA5m5+ftnulc5AqH7Ue/47a526ig1ZwugdDcSn2ZntvHrXyKtrsfAJ3ptRA 1naC6upYduOhxzsV6RsilnmsoNn3tIHWrg4BsIRQShOLpkD9JEIu2V5Rwpfn2ZsPheKR qK5BYjQHSzl3Uz/KT/r8ysQB2L1d91SYbBQDt3ez0AtdTMG2iki94kf48mG+8tqZCpux KHZK+6UJjhXCoti5fQUj6fzHxr7vr63jbMsRq1AylPBtf6tE+Ocmz5YSbWjQJJoGaQTs +A== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 370xxaa8a1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 12:06:14 -0500 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 121Gwkac021656; Mon, 1 Mar 2021 17:06:07 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 370c59s4dh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 17:06:06 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 121H64jU19202444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Mar 2021 17:06:04 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1F17A405F; Mon, 1 Mar 2021 17:06:04 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41BBCA405B; Mon, 1 Mar 2021 17:06:02 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 1 Mar 2021 17:06:02 +0000 (GMT) Date: Mon, 1 Mar 2021 22:36:01 +0530 From: Srikar Dronamraju To: Peter Zijlstra 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: <20210301170601.GJ2028034@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20210226164029.122432-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-01_11:2021-03-01,2021-03-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=981 bulkscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103010137 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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? -- Thanks and Regards Srikar Dronamraju