Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp766327ybl; Fri, 13 Dec 2019 04:21:16 -0800 (PST) X-Google-Smtp-Source: APXvYqzVwMExvOfbOy4tRtD4pw3q2psYNoxcuTwz9DuMTd+ccY52DnJ3pdPwQ0HfRq6/gJEu7nlC X-Received: by 2002:aca:de0a:: with SMTP id v10mr6563929oig.156.1576239676021; Fri, 13 Dec 2019 04:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576239676; cv=none; d=google.com; s=arc-20160816; b=QspqF1McM1fm4tHQ6U/ZKi1tcz3TtmrvLvtmZq7dMjj77vOcM5fH+IGqrkqlzJ0s3H WE2keHsCGWP+kDFQJoHJXDCxcEFzH/rBQLtqmjz7G7mfpXmT+t9XVRQf4eZ6kWnIzHxV JFCaR0dQZ9mgLA68/9LGHO7NBYQ4zGVTDqJ5gE2e0CSa4lCMPR+pmiP7jSiRIVQgI8Lu NAQ8TPznxOf3ck+FbXV3MhR0VBrBQbD3MsYX4sB/PMMa2Yz3EbNunawWA579D+dQf3mE IZ3Ah8lqj9yq3ZtB99P6951uvlPzCJCu/o8lySate66Mk1xWAyW0KaqcGIO5k6QVT3m8 F2kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Z72eChai+Of7YsAM3zKMtv5X1T1VZNfoqZWjLzGioPQ=; b=wm9k6y+3z94/shOqiolwsCwm6oVQOHnJ3/Prm9VIaKgeYOLolgU3T9mt9fSyTHsHWW miPccQFJfygTC1TGPbfN7UlaQ5kyjkCm1re90qqwrSQqeaxy9Z8Zb7PtXeXWA/KuS1M+ IV3TKIlP1aUU868FvhZEnVJh6xbieW6R8IpSt1/EqATG4MF9tGM1hEULVhW4yjqGYhIm K8RBoUAi5ErEjThqoZxSAMxQbqVVnxH2hXSizLWX1QkSFYR+pMCth2GuhqFV8KLnXsRm M92adrGP+RESsKDqsiTUdcOCfS880tR2FKBC16rOoH6ZUDwj3FTNMnXBypMb7v9n+KCp k/YA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si4933214oih.237.2019.12.13.04.21.03; Fri, 13 Dec 2019 04:21:16 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbfLMMUG (ORCPT + 99 others); Fri, 13 Dec 2019 07:20:06 -0500 Received: from foss.arm.com ([217.140.110.172]:57216 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbfLMMUG (ORCPT ); Fri, 13 Dec 2019 07:20:06 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CCC511B3; Fri, 13 Dec 2019 04:20:05 -0800 (PST) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DED93F718; Fri, 13 Dec 2019 04:20:04 -0800 (PST) Subject: Re: [PATCH] sched/fair: Optimize select_idle_cpu To: Peter Zijlstra Cc: "chengjian (D)" , mingo@kernel.org, linux-kernel@vger.kernel.org, chenwandun@huawei.com, xiexiuqi@huawei.com, liwei391@huawei.com, huawei.libin@huawei.com, bobo.shaobowang@huawei.com, juri.lelli@redhat.com, vincent.guittot@linaro.org References: <20191212144102.181510-1-cj.chengjian@huawei.com> <20191212152406.GB2827@hirez.programming.kicks-ass.net> <6d188305-66ab-81cf-6340-34d155dcaf3b@arm.com> <20191213120913.GB2844@hirez.programming.kicks-ass.net> From: Valentin Schneider Message-ID: <0a0744f4-24cf-f8b6-cc91-f63847560675@arm.com> Date: Fri, 13 Dec 2019 12:20:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191213120913.GB2844@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/12/2019 12:09, Peter Zijlstra wrote: >> Like you said the gains here would probably be small - the highest SMT >> count I'm aware of is SMT8 (POWER9). Still, if we end up with both >> select_idle_core() and select_idle_cpu() using that pattern, it would make >> sense IMO to align select_idle_smt() with those. > > The cpumask_and() operation added would also have cost. I really don't > see that paying off. > > The other sites have the problem that we combine an iteration limit with > affinity constraints. This loop doesn't do that and therefore doesn't > suffer the problem. > select_idle_core() doesn't really have an iteration limit, right? That being said, yeah, the cpumask_and() for e.g. SMT2 systems would be mostly wasteful.