Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6500095ybi; Mon, 8 Jul 2019 04:04:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7nE8oKTF2ehWFPt2dmor+YmJ9cPx8nVZDwvqZ7afDyA7tAATqNfGQnFeLNsttkGENrm1U X-Received: by 2002:a63:1316:: with SMTP id i22mr23534140pgl.274.1562583861395; Mon, 08 Jul 2019 04:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562583861; cv=none; d=google.com; s=arc-20160816; b=yB5+gQ7G0KqKNchje4d3A3URlJX83fq2+iGMJIi248z1HpgYrzYJYqcWKsN/bP09ts BPQcoJGqfND7agJ8OGDOmDYWw0XzVCXu/b/5iu0+9xv9RJyw9e7UjAcM1Wwv616YxJr9 cQDNDfkIS0pDNjlb8t0BXUpI4I+U+oTI7+mmqV7DO/YDLIq7XnManEORMwNXsfYQvqzc wMc3krQ7leSf7CxMqmWjXCnZ0EKzGuihVgN7KRQam/wuSoYY0N73I7M73xJSIMC0ximn 7q1K1e1MyIlvLux1sg2mlaR1g/fFO5UbCQdRBeCs/J5H95hds0bXpnr5Qnmc/z83fCsQ VYdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FUCY1YwB/R6KzNtkKi2x6Os1qnizb1f0SoTtRRtZD2A=; b=0ImcXlQfApK4N8iE4rEd6xX8JisyxR+fYhNkNJgd+Y/4DastQdqWCB+wVwwwXG7ldn RL5074P1/G6F4kcnfaRMzqhMkOBlR0/CLwKhlOuIyW4VBosW2npojTfcmlBkfYVG/bpc wijMX3LKC2xK8n31ltY9HHO93OmKImyDs2LweKzUWysMj7pQIZx0cTnbJS6Uu9sMKHXa +U3fjF1duSOVC3AVrskLesuJtcsVFeQGsUf/gS+KXs1lQ+FZb3TIvwKLLC6Vxs/EM1Je 2cIZZfE3qvsNH3JcHskey3OYoLS6ZWYNRsApkTDK9EwF6Kvln1j43gvG1ByJV9145Xbb p79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SUdyA0AW; 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 s7si16993202plp.66.2019.07.08.04.04.05; Mon, 08 Jul 2019 04:04:21 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SUdyA0AW; 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 S1728211AbfGHIIp (ORCPT + 99 others); Mon, 8 Jul 2019 04:08:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:53176 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726692AbfGHIIp (ORCPT ); Mon, 8 Jul 2019 04:08:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FUCY1YwB/R6KzNtkKi2x6Os1qnizb1f0SoTtRRtZD2A=; b=SUdyA0AWMY8khw0UPLe6tbgfZ eCLU1CRCRERKczG1r8Pia4WtZ72Uuswsu7Yx/4phnU00dlxVjSG1CaFlGX0vZv7Gvo7Y3iZKcDkUk B1xSnmvcsHRpj1sFC1hCJ+vfiKui+mYV4kpDeugcVolpiJKOebZP5D6vVBKLZ5gFPqLIxvbUemmoM GRKqOqEhxdcGJZUPGRYIh98WfShwAWPGNmJjA+cFpDH77zPwQotm5D3G7Uf4F1RWSpqqUrd0Nfa3J 34ucxvzP3hlhEBTV/neDtgwyFP3WWENp1N93ifqMS8QUFONHkLcZJ9/i7X0HWzpiP+o6s85sTp0sK ohEGj2GDw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hkOhS-0002sL-HC; Mon, 08 Jul 2019 08:08:38 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 413C420977821; Mon, 8 Jul 2019 10:08:36 +0200 (CEST) Date: Mon, 8 Jul 2019 10:08:36 +0200 From: Peter Zijlstra To: Parth Shah Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, vincent.guittot@linaro.org, subhra.mazumdar@oracle.com Subject: Re: [RFC 0/2] Optimize the idle CPU search Message-ID: <20190708080836.GW3402@hirez.programming.kicks-ass.net> References: <20190708045432.18774-1-parth@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708045432.18774-1-parth@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 08, 2019 at 10:24:30AM +0530, 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. Have you seen these patches: https://lkml.kernel.org/r/20180530142236.667774973@infradead.org I've meant to get back to that, but never quite had the time :/