Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2279071imm; Tue, 4 Sep 2018 01:26:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbyLatBhHHjaWVOfOdDxMTPdsdQsHpprlCfKE0unNg7iQ8DqqzitV65M3OtMK/LRgC4P2go X-Received: by 2002:a17:902:4d45:: with SMTP id o5-v6mr32431283plh.78.1536049570483; Tue, 04 Sep 2018 01:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536049570; cv=none; d=google.com; s=arc-20160816; b=EhyYPSvlnJsh54mT3WWqny17YA5rAyqtHRoXwQJ4S4nG1x5h8UFsdLg2P3bL2vOT6S CKr2+xu7XXzj+SP5ypCAHntS8I+arwoUYVQy+Yl2cOJBq3sJjTuHr03DRXwR6rpTM4J/ hp7edSJhMBMg5WwDjzgc6cAMiQNXX82yfB/wmcDx8Kg3cIPEopZpXonKD91m1ighKkoW K9mswLx3kegprRtUVKlys/5sbeWwr9QKgUSP7mbMT3O8BGtK7mdw39qmoBFE4B5bWP03 Zk92+iaaryd0xlMNgAbAtHvj803peWfr2GFKlenTI8kWVsd+f+diPnNCKOc6JXhbQ8Yj vQZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=kW7zPVECsc+E3YiKJLVmPEw01r6tr1CTK8p1OQuUeO0=; b=motX7OMsxu+yrcGBgaIMuXedoyvQA+fCTdzklEDC4Gq/e+fm5sYiISBQvScnFqLT99 Pp21U+FSEdsVwBUXOnUj4VumYFHDery0b+LnEq4wyUDAvucscxLgypHnWQTPV4CRV93W yw/293/RgYB4FbevQR3T4kWZ3draykhFFT4Bcb5otxjh+Vx/mJO07cHXqxZYATwFKEzA RQ0nYkvMM/cB7RQKFJ7JBBtXtrkXCGFF9o6CiUqxrZrw/TFpz3GOIESmsdIhGbRIXRcr d52cybEgp+2oLFhy50nVSloumksGTLP/TfNm0eNyIzJtlhZDrH3wE5kOQiwCarrf9+o0 7AEw== 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 81-v6si20974192pgd.57.2018.09.04.01.25.55; Tue, 04 Sep 2018 01:26:10 -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 S1727037AbeIDMsg (ORCPT + 99 others); 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