Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3251674pxb; Mon, 1 Mar 2021 05:40:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLZo/8bsQi8pgT0VY7D4eL0+BiZYD6iaDECLMhEXgMYzigBcWVvIU/L07JNBJXnoibNPNm X-Received: by 2002:a17:906:6558:: with SMTP id u24mr16218064ejn.185.1614606012113; Mon, 01 Mar 2021 05:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614606012; cv=none; d=google.com; s=arc-20160816; b=Hh6FCvWaAS1TaKI8hhTETu430Q+aecJNNc2UJLQmJPfvWzN6PIUztl7xji8tLLeX6K Rk9oaIxqQAyy9YgAStHGPE7RdZTNidEsZmQsVAfKnVdLkNf9cf6q1mkLbLOmk2XcnXO8 iwkcFtFeO3Sa+ZMUx/HnGr0QdosUs8GYbW03wV9eMGWt5Ozrq4otUOVZU04fIbJBTmce BQvx07cpsSl7e7RJbBTUa78gYnTxYn6ss/4LV4zs9NlPeNE/NTqxlo1bKXi1z7YnZh9q dKyYF6DcNyxkVO99hI44iEOjrB4UvEX85P0DP4Gv2w4oWFs7bDv+WjN9HJ2OYk7Fv2EN Z3ow== 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=Hp7lJ1n0zWGSbHrNoQ8FxBZVbyeKMOkZBpIQglBzsGc=; b=BRW/A26gm/6Q3BmILx9Jnc4tMPS9ZFZY9/5uCZNYyFJLrQWDWLArAxS1q4sZ23aQOG IK17NhpxSYtNdTMRnjvN/RcoHNaODcAKDwFrNotd0TaFlRv0Vf/KLuaz4uNAuiJytN+2 j/dz8FqwY30HelhRAERZYO3Zap1/6wudAmEbj/t1gCcyN1D1hZ5UB0IWGLvZ/LR1Z+J/ ckijJCPw/GD8yGu437swIyrH7+ZHp88Ddv8IT/tXR4xsqPd33HNgt19OZaH4mON1fmmP KMfLNLlxlS9+a2uIS5WsJoNjx6yxHU9TiDAPBbK6ny0CkK6oub+0FCb1pzjlBHNcJhIB G1gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DYdCfCRj; 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 a12si9216917ejy.363.2021.03.01.05.39.48; Mon, 01 Mar 2021 05:40:12 -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=DYdCfCRj; 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 S235873AbhCANi7 (ORCPT + 99 others); Mon, 1 Mar 2021 08:38:59 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:12974 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235814AbhCANi6 (ORCPT ); Mon, 1 Mar 2021 08:38:58 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 121DXoNa152652; Mon, 1 Mar 2021 08:37:29 -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=Hp7lJ1n0zWGSbHrNoQ8FxBZVbyeKMOkZBpIQglBzsGc=; b=DYdCfCRjTwlc3pbMxiU30n/Odm5ETyLjKmhY/ZQWQuOh/JbYuCRbqwLHt96IBiQ/4gca I2vn1tqecN0FYYDwA5VAySTckT9GjRyRzC6WJvLiYEqFMk/91Lcj4kU+9cwjh4+ftxHE JafCvSUZjkmrR/PoEgvLsh5OOTlKfYEucywAoVBIvE8kE2KsCdW5cqr8mKfpPiPFWkt0 +MiH6ehBn0N+K0ZVXeY44Xln8/sM3uKLgOx/iI4xDg75D4OTGViR5p/odV54jyUFWxG2 +zTKjQDnCOPEiTyug3Day7Ifj9T0tmoNf37JLOz4H/FKOdPC7F85SQz4TA/6m4JG5tmV LA== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3710tk14ju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 08:37:28 -0500 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 121DXE8M004548; Mon, 1 Mar 2021 13:37:26 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma02fra.de.ibm.com with ESMTP id 36yj530wdg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 13:37:26 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 121DbOYw33096190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Mar 2021 13:37:24 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29998AE053; Mon, 1 Mar 2021 13:37:24 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E6AAAE057; Mon, 1 Mar 2021 13:37:21 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by d06av26.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 1 Mar 2021 13:37:21 +0000 (GMT) Date: Mon, 1 Mar 2021 19:07:20 +0530 From: Srikar Dronamraju To: Rik van Riel Cc: Ingo Molnar , Peter Zijlstra , 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: <20210301133720.GI2028034@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_08:2021-03-01,2021-03-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103010113 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Rik van Riel [2021-02-27 14:56:07]: > > In the current situation where waker and previous CPUs are busy, but > > only one of its LLC has an idle CPU, Scheduler may end up picking a > > LLC > > with no idle CPUs. To mitigate this, add a new step between 1 and 2 > > where Scheduler compares idle CPUs in waker and previous LLCs and > > picks > > the appropriate one. > > I like that idea a lot. That could also solve some of the Thanks. > issues sometimes observed on multi-node x86 systems, and > probably on the newer AMD chips with several LLCs on chip. > Okay. > > + 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? > > That way we will only try to find the last 5 idle > CPUs > in a 22 CPU LLC if the other LLC also has fewer than 6 > idle cores. > > That might increase our chances of finding an idle CPU > with SIS_PROP enabled, and might allow WA_WAKER to be > true by default. Agree we need to be conservative esp if we want to make WA_WAKER on by default. I would still like to hear from other people if they think its ok to enable it by default. I wonder if enabling it by default can cause some load imbalances leading to more active load balance down the line. I haven't benchmarked with WA_WAKER enabled. Thanks Rik for your inputs. -- Thanks and Regards Srikar Dronamraju