Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3630508ybd; Fri, 28 Jun 2019 12:03:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPLmAFPx4/y0ok562J5pn4NjY9kD+SuDxSIbClMCOqBIKu2E+1lxfBBgI6tN9ImkAB/0Ee X-Received: by 2002:a17:90a:338b:: with SMTP id n11mr14821133pjb.21.1561748613892; Fri, 28 Jun 2019 12:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561748613; cv=none; d=google.com; s=arc-20160816; b=FM22XPyiE9Q8J9x8km+UzNBX0JPA4RFpu+hJDz0VP79tPLi3z00s7IHcR9y8qSw05U YkwN9VUQ5KNjh07sdnOAFQJsq+nYdK7K3vQ+icj9fIEY2xD2anSVRrVjvy4Kk8lbAb+7 rHPp8cekbgSdJ3szXH9xqvVle7Muag3mH2pYBDDUtgRqAr/JfAwzi5tsLchbaQ+CqJqI H/tFpGlKXN/jzzY90XOqYo4XE0Jw4+BGkfCsy7zMr1FAxxs3E5iycMkyBuYb8Cj46WMq QR3sm7CwOmtk0dBGmLTf7xOwl2WcBG6KDjgk9dH8UupSRWXqfHuhDFFUtW0NbXAgZzWc dnZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=TEwgNRtqrVPrjqJinWS0HxCfd2uTBaOUDSqJbtw8RJE=; b=YQdVitYR7klRfHjNN9uFNeEyclHHReocKbc1c97IRG+jrQGT40ZoYaFJeggyeVkGSe NLtDfQDYkeCCg1mZ666hHmD/M7rz866K8maw7FFY+sSMfOrXF4LPU8ycR0WsCK6iiUiJ HyF1qU+s4WE/gnCguQyd69s6BpCelV72GF/IduuitsiaSbNIuPmV0VOhpeYG4ExVDiCi DBFay/EPpcWe+NZKN1tQfXSwqA4HLaBgzBJsQa/Rnttsmc4WgTvkfaYCzCarCHUwOSFp 3rVjwdTlvNj3f1MlSOv8frSDks1pOpKxKXaahPF4EZvGdXJP9I+bgvap2ADcUPz2Aq/D 2fYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a36si2928578pje.14.2019.06.28.12.03.17; Fri, 28 Jun 2019 12:03:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726930AbfF1TCt (ORCPT + 99 others); Fri, 28 Jun 2019 15:02:49 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34368 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726565AbfF1TCs (ORCPT ); Fri, 28 Jun 2019 15:02:48 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5SJ2c1P171187 for ; Fri, 28 Jun 2019 15:02:45 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tdnvsx713-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 28 Jun 2019 15:02:42 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Jun 2019 20:01:57 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 28 Jun 2019 20:01:52 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5SJ1prF45088940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jun 2019 19:01:52 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1DABA4057; Fri, 28 Jun 2019 19:01:51 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 15248A404D; Fri, 28 Jun 2019 19:01:38 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.62.39]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 28 Jun 2019 19:01:37 +0000 (GMT) Subject: Re: [PATCH v3 5/7] sched: SIS_CORE to disable idle core search To: subhra mazumdar , linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@redhat.com, tglx@linutronix.de, steven.sistare@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, tim.c.chen@linux.intel.com, mgorman@techsingularity.net References: <20190627012919.4341-1-subhra.mazumdar@oracle.com> <20190627012919.4341-6-subhra.mazumdar@oracle.com> From: Parth Shah Date: Sat, 29 Jun 2019 00:31:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20190627012919.4341-6-subhra.mazumdar@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19062819-0020-0000-0000-0000034E755E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062819-0021-0000-0000-000021A1F79B Message-Id: <0e0f3347-c262-2917-76d7-88dddf4e9122@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-28_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/27/19 6:59 AM, subhra mazumdar wrote: > Use SIS_CORE to disable idle core search. For some workloads > select_idle_core becomes a scalability bottleneck, removing it improves > throughput. Also there are workloads where disabling it can hurt latency, > so need to have an option. > > Signed-off-by: subhra mazumdar > --- > kernel/sched/fair.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index c1ca88e..6a74808 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6280,9 +6280,11 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) > if (!sd) > return target; > > - i = select_idle_core(p, sd, target); > - if ((unsigned)i < nr_cpumask_bits) > - return i; > + if (sched_feat(SIS_CORE)) { > + i = select_idle_core(p, sd, target); > + if ((unsigned)i < nr_cpumask_bits) > + return i; > + } This can have significant performance loss if disabled. The select_idle_core spreads workloads quickly across the cores, hence disabling this leaves much of the work to be offloaded to load balancer to move task across the cores. Latency sensitive and long running multi-threaded workload should see the regression under this conditions. Also, systems like POWER9 has sd_llc as a pair of core only. So it won't benefit from the limits and hence also hiding your code in select_idle_cpu behind static keys will be much preferred. > > i = select_idle_cpu(p, sd, target); > if ((unsigned)i < nr_cpumask_bits) > Best, Parth