Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2385402imm; Tue, 4 Sep 2018 03:39:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYIbhg8zJzVHCb3lIzWuRP3bIpRb27/rUmidxWkc1yI+y3wAB1mxnPvpdg4PmAgf5rD2988 X-Received: by 2002:a65:520d:: with SMTP id o13-v6mr30956847pgp.282.1536057560851; Tue, 04 Sep 2018 03:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536057560; cv=none; d=google.com; s=arc-20160816; b=FJIB61QdguS9l1IVYx0rOY4wwD6LfE8crfeEi5Sy+6B0JqynCm1tfbGBSZUmWLbiNS hnpul+NhQnMY6XQ0PbD6exXUOgg/32YJ8OrHb3caExrGxCpORvdGSQdf9Ge+mbKZgQmv idW/UzmTxF6sZKkO7uCb8+Dj6Nhwe+XgLXOSp+vBSd5Y166R5eN0HPlvlt5pHSp9LXoN Tk8U7H5spP+NG7ToTFEM746+mJJEutU/B003NxgYUjt3g0NxBsb5ZRHE9C9OoMKvfDf/ 7+t0Dcw+AS7J0qDeSWhHbPfT/nrHtK5vj1gPRKJ1T1ELQvLgS1FQVNK+r4PegZH3JTqU bfew== 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-transfer-encoding:content-disposition:mime-version :references:reply-to:subject:cc:to:from:date :arc-authentication-results; bh=g6kx41hp8yl0c2eMXxNybY131Cnd+bNcH+qk55i1QfA=; b=EYpjQ7TVgc6hedCv29buMZEUcnHuRatwLhDVFtaqwPRXwMR9lbQuhGlcpGOTILRYDf Wyt6+Eh3Dw2jHvPhKw6IPx2p0Obva7jocQ3c2CUNW6plo/vLjWsfgrHYAYDM8qCSothR F+sslAv/QyG0Eefosk/hAPGpF/vWkBS79w+Bdv9F/iOLEjE67rqANl7Sj6GwYnKda24x 3G+WMCZqwzmixoFTc9Rq/AxQnH5lL1oil8RUgXbDmgOFLXOT1Uc65jXG3KvFje3804ON IQIW92m+fo9Bg0YvnQ0toT9+8vIppvncqOE84zhuqEoFaBLmDRzFuvDf4Z6CaTZap0Jd 9BVA== 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 z63-v6si21317751pfi.214.2018.09.04.03.39.02; Tue, 04 Sep 2018 03:39:20 -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 S1727024AbeIDPCV (ORCPT + 99 others); Tue, 4 Sep 2018 11:02:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46776 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726066AbeIDPCV (ORCPT ); Tue, 4 Sep 2018 11:02:21 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w84AY63h043014 for ; Tue, 4 Sep 2018 06:37:49 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m9qnfj6v9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Sep 2018 06:37:49 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Sep 2018 11:37:47 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) 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) Tue, 4 Sep 2018 11:37:45 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w84AbiZ034013414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Sep 2018 10:37:44 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8044642042; Tue, 4 Sep 2018 13:37:39 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9AD8342041; Tue, 4 Sep 2018 13:37:38 +0100 (BST) Received: from linux.vnet.ibm.com (unknown [9.40.192.68]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 4 Sep 2018 13:37:38 +0100 (BST) Date: Tue, 4 Sep 2018 03:37:42 -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> <20180904082424.GA2090@linux.vnet.ibm.com> <20180904093626.GA23936@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180904093626.GA23936@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18090410-0020-0000-0000-000002C0EA6A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090410-0021-0000-0000-0000210E0FF8 Message-Id: <20180904103742.GC61288@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-04_06:,, 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=836 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809040112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Vincent Guittot [2018-09-04 11:36:26]: > Hi Srikar, > > Le Tuesday 04 Sep 2018 ? 01:24:24 (-0700), Srikar Dronamraju a ?crit : > > 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 > > Is there system with both single threaded and multi threaded core ? > That was the main open point for me (and for Qais too) > I dont know of any systems that have come with single threaded and multithreaded. However some user can still offline few threads in a core while leaving other cores untouched. I dont really know why somebody would want to do it. For example, some customer was toying with SMT 3 mode in a SMT 8 power8 box. > > > 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. > > Then, there is the sibling flag at SMT level that normally ensures 1 task per > core for such UC > Agree. > > > > I always wonder why arch_scale_cpu_capacity() is called with NULL > > sched_domain, in scale_rt_capacity(). This way capacity might actually > > Probably because until this v4.19-rcxx version, the rt scaling was done > relatively to local cpu capacity: > capacity ?= arch_scale_cpu() * scale_rt_capacity / SCHED_CAPACITY_SCALE > > Whereas now, it directly returns the remaining capacity > > > be more than the capacity_orig. I am always under an impression that > > capacity_orig > capacity. Or am I misunderstanding that? > > You are right, there is a bug for SMT and the patch below should fix it. > Nevertheless, we still have the problem in some other places in the code. > > Subject: [PATCH] sched/fair: fix scale_rt_capacity() for SMT > > Since commit: > commit 523e979d3164 ("sched/core: Use PELT for scale_rt_capacity()") > scale_rt_capacity() returns the remaining capacity and not a scale factor > to apply on cpu_capacity_orig. arch_scale_cpu() is directly called by > scale_rt_capacity() so we must take the sched_domain argument > > Fixes: 523e979d3164 ("sched/core: Use PELT for scale_rt_capacity()") > Reported-by: Srikar Dronamraju > Signed-off-by: Vincent Guittot Reviewed-by: Srikar Dronamraju -- Thanks and Regards Srikar Dronamraju