From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18C83C2D0DB for ; Fri, 24 Jan 2020 13:32:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA3AD2075D for ; Fri, 24 Jan 2020 13:32:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388490AbgAXNcX (ORCPT ); Fri, 24 Jan 2020 08:32:23 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55374 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388310AbgAXNcW (ORCPT ); Fri, 24 Jan 2020 08:32:22 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00ODTqVR082549 for ; Fri, 24 Jan 2020 08:32:21 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xqaxwwvw5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Jan 2020 08:32:20 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 24 Jan 2020 13:32:19 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 24 Jan 2020 13:32:16 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00ODWFYv56688816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jan 2020 13:32:15 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97CF852050; Fri, 24 Jan 2020 13:32:15 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by d06av21.portsmouth.uk.ibm.com (Postfix) with SMTP id 0FB745204F; Fri, 24 Jan 2020 13:32:13 +0000 (GMT) Date: Fri, 24 Jan 2020 19:02:13 +0530 From: Srikar Dronamraju To: Ingo Molnar , Peter Zijlstra Cc: LKML , Mel Gorman , Rik van Riel , Thomas Gleixner , Valentin Schneider , Vincent Guittot Subject: Re: [PATCH v2] sched/fair: Optimize select_idle_core Reply-To: Srikar Dronamraju References: <20191206172422.6578-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20191206172422.6578-1-srikar@linux.vnet.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 20012413-0016-0000-0000-000002E04FA8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20012413-0017-0000-0000-0000334304C5 Message-Id: <20200124133213.GA28610@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-24_04:2020-01-24,2020-01-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 suspectscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001240112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Peter, Ingo, * Srikar Dronamraju [2019-12-06 22:54:22]: > Currently we loop through all threads of a core to evaluate if the core is > idle or not. This is unnecessary. If a thread of a core is not idle, skip > evaluating other threads of a core. Also while clearing the cpumask, bits > of all CPUs of a core can be cleared in one-shot. > > Collecting ticks on a Power 9 SMT 8 system around select_idle_core > while running schbench shows us > > (units are in ticks, hence lesser is better) > Without patch > N Min Max Median Avg Stddev > x 130 151 1083 284 322.72308 144.41494 > > > With patch > N Min Max Median Avg Stddev Improvement > x 164 88 610 201 225.79268 106.78943 30.03% > > > Reviewed-by: Valentin Schneider > Reviewed-by: Vincent Guittot > Signed-off-by: Srikar Dronamraju > --- > Changelog v1->v2: > Updated patch description with measurements made from a debug patch. > > kernel/sched/fair.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Do you have any comments or improvements to be done for this patch? -- Thanks and Regards Srikar Dronamraju