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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 59488C43334 for ; Tue, 4 Sep 2018 08:24:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CAD520661 for ; Tue, 4 Sep 2018 08:24:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CAD520661 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727079AbeIDMsg (ORCPT ); Tue, 4 Sep 2018 08:48:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41304 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbeIDMsg (ORCPT ); Tue, 4 Sep 2018 08:48:36 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w848MepL142149 for ; Tue, 4 Sep 2018 04:24:32 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m9nxk1ex6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Sep 2018 04:24:32 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Sep 2018 09:24:29 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 4 Sep 2018 09:24:26 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w848OPL036896968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Sep 2018 08:24:25 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 06823A4055; Tue, 4 Sep 2018 11:24:19 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20DB5A4057; Tue, 4 Sep 2018 11:24:18 +0100 (BST) Received: from linux.vnet.ibm.com (unknown [9.40.192.68]) by d06av23.portsmouth.uk.ibm.com (Postfix) with SMTP; Tue, 4 Sep 2018 11:24:17 +0100 (BST) Date: Tue, 4 Sep 2018 01:24:24 -0700 From: Srikar Dronamraju To: Vincent Guittot Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 3/4] sched/topology: remove smt_gain Reply-To: Srikar Dronamraju References: <1535548752-4434-1-git-send-email-vincent.guittot@linaro.org> <1535548752-4434-4-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1535548752-4434-4-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18090408-4275-0000-0000-000002B4E1D3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090408-4276-0000-0000-000037BDF432 Message-Id: <20180904082424.GA2090@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-04_05:,, 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=917 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809040088 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: linux-kernel@vger.kernel.org (open list) > Signed-off-by: Vincent Guittot > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > index 4a2e8ca..b1715b8 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -1758,9 +1758,6 @@ unsigned long arch_scale_freq_capacity(int cpu) > static __always_inline > unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) > { > - if (sd && (sd->flags & SD_SHARE_CPUCAPACITY) && (sd->span_weight > 1)) > - return sd->smt_gain / sd->span_weight; > - > return SCHED_CAPACITY_SCALE; Without this change, the capacity_orig of an SMT would have been based on the number of threads. For example on SMT2, capacity_orig would have been 589 and for SMT 8, capacity_orig would have been 148. However after this change, capacity_orig of each SMT thread would be 1024. For example SMT 8 core capacity_orig would now be 8192. smt_gain was suppose to make a multi threaded core was slightly more powerful than a single threaded core. I suspect if that sometimes hurt us when doing load balance between 2 cores i.e at MC or DIE sched domain. Even with 2 threads running on a core, the core might look lightly loaded 2048/8192. Hence might dissuade movement to a idle core. I always wonder why arch_scale_cpu_capacity() is called with NULL sched_domain, in scale_rt_capacity(). This way capacity might actually be more than the capacity_orig. I am always under an impression that capacity_orig > capacity. Or am I misunderstanding that? -- Thanks and Regards Srikar Dronamraju