Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7219803ybi; Mon, 8 Jul 2019 17:12:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzYo9HFZBmgpSyvgZwd1U/8hCfIzaLlxTUwojMy+0ioFW+SSuDdIJIN4YEa+Oz/3yfdjLk X-Received: by 2002:a17:902:788f:: with SMTP id q15mr28787673pll.236.1562631152309; Mon, 08 Jul 2019 17:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562631152; cv=none; d=google.com; s=arc-20160816; b=rJrDs5/0yiuDvt5tkcRdq035LG3cC8RJVIfs5ivDdB8Fn6E7xP/4N27mehHduyxDeH 3GSa2/rF1wq9MhZ5OaTGFdk8QZESpYZ+slnUeuC0o/46pGXvjw1272mKt29NuHa8b+WQ LXewpOKM+xhx2BWUQ+qO+SpuW1SxcU42oUlNZdx6D5HEQRZgVJo3LQRJYlxB+r1TpGhY +ix2ezEUA3hoIxgCXuLZXTCL/zcQZC604QuirW2wF1DHKnUytKai0u3xGnCDTL46HbEp +Mbicv2CeW/TELb0Ugo5v07KDFb+vfrHdtwCYX+8ClQGJv+tnOZLQntuf+9hFrieTe1P ffPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EyhI2SGXqBWf0uwma9BuLGltYhuzLwYJcUaoP1McYqc=; b=JYa/Fxz4tSumzHinl6mrORMTnJQwrsu9GztfjGsk8cCw0+eRa1WradNPZybWrx/xyl AsvYrbBjSMxuElCx/c8QJGfp4FJSqhGJSDCWvb0eTqzYIMtIfJ8cq9Bk4qk9Rm46rI/t HUKWHmpDLtaxCkYPknN9VPEjLUZKYI6v7eJJn2OKdDwon8eqRUeepoEAdJpIxaMj4qZT o3ZPQ/Xu7oarXwHtWXSsQfUdE7ywdlYjyLEFjAWXyU3kCGwDYYM+RNM1XhbI9thC7tJJ hWhid6DfLw7HXBibQda3AR6dDkzSG1OKKEL4Z6lg3JRsE+7T58jYgulreQa1cpVTvVj4 npTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=KrdmdLub; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k73si20413607pge.353.2019.07.08.17.12.17; Mon, 08 Jul 2019 17:12:32 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=KrdmdLub; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726792AbfGIAJU (ORCPT + 99 others); Mon, 8 Jul 2019 20:09:20 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:34946 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbfGIAJU (ORCPT ); Mon, 8 Jul 2019 20:09:20 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6908Vfr068374; Tue, 9 Jul 2019 00:08:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=EyhI2SGXqBWf0uwma9BuLGltYhuzLwYJcUaoP1McYqc=; b=KrdmdLubkfVXtIz1koe2WpIL/995GfgDfzv96B9yGzgQ4MPsszpkodh3LwYK9SB1ShWC K5vF1XCHwYFdw69MKMLZ+5OFYbWeeyyXTWJb0wkvTjSMdRrEztRhl2X0nnEqEQH7xIMU 7cp3padi+QzsN2JGpHaw5tV2obpz30fWiQa4WYUqrMSaBG5+oeeKFSQr58zgACJwSXKI ogjnBBYExwrWier2uUgBh4BkszKWFInbcAkpOS+eyuPO5OItjpcLyiq9u/YZ/USf9wLZ cp66QpwTMMWk/rNFepJuuctEiGsfMzJZvLDtDmCJvgOhyndjJrjOkR0AT2/Gc+6hLayg GQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2tjk2th8p2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Jul 2019 00:08:30 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6908MTc043766; Tue, 9 Jul 2019 00:08:30 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2tjgrtsg7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Jul 2019 00:08:30 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6908RHn023985; Tue, 9 Jul 2019 00:08:28 GMT Received: from Subhras-MacBook-Pro.local (/103.217.243.93) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 08 Jul 2019 17:08:26 -0700 Subject: Re: [RFC 0/2] Optimize the idle CPU search To: Parth Shah , linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org References: <20190708045432.18774-1-parth@linux.ibm.com> From: Subhra Mazumdar Message-ID: <839c6cc8-b550-3066-d856-3c8a919cc318@oracle.com> Date: Tue, 9 Jul 2019 05:38:10 +0530 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190708045432.18774-1-parth@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9312 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=883 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907090000 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9312 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=939 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907090000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/8/19 10:24 AM, Parth Shah wrote: > When searching for an idle_sibling, scheduler first iterates to search for > an idle core and then for an idle CPU. By maintaining the idle CPU mask > while iterating through idle cores, we can mark non-idle CPUs for which > idle CPU search would not have to iterate through again. This is especially > true in a moderately load system > > Optimize idle CPUs search by marking already found non idle CPUs during > idle core search. This reduces iteration count when searching for idle > CPUs, resulting in lower iteration count. > I believe this can co-exist with latency-nice? We can derive the 'nr' in select_idle_cpu from latency-nice and use the new mask to iterate.