Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2487675pxu; Mon, 7 Dec 2020 07:52:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuaUd1Tfr5FSr23kxpwxUrbbVmK4whzLGbjyQAS3jDcI9glechbzztHJx6P5NFgyKSC4V3 X-Received: by 2002:a05:6402:1155:: with SMTP id g21mr21104543edw.53.1607356345521; Mon, 07 Dec 2020 07:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607356345; cv=none; d=google.com; s=arc-20160816; b=RSbH3U+sBc+xNGDh7q1BmJwfM1uOMeNKJ4rci6RldnJRvsq08M0EBKimB7l2/+OkNl CfBN32RO5n2U3x5t4QBqUeqG4ZeXdUvcb1jkRI3db2q03UricRQ1dkbVD9ONcP/xoF00 vKVurYgUxNg8HEU/fYfuXIHQjJve908/8GeSDSt7gbmCfxTG50c6YYaXYXzlU7/dwCem 71Pjisgfgri8626sVJ2dQNUZJNYNdHXQsOsDE4wmApBEt3oHs98zxaYryQQWT1w6egOC FPyZOVZjjKSXVASirWP98JIFML6OMyIXM8e6EZKLNwoT99X5oL7g2zXGVDGfjkmADA2h 5rwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YhTuQpAuVhEXZKFT3p3qbp40M3jZi+iAS4Ki0D9kbgk=; b=XVEP29NeutrMS387wTDO4EkLXHcmTOoCKk2dnIaDVtlFmEAwE3EZvtWmNPPZbM7+tw nbQ0Wpko6qimywTmpVXfa4Fe1xgfAUaDq+mMwgzkOu8MzgvpYAIkPprVKLAgniGVbthj uJmLW6lDM+khgOAdpnFbQGjQDlOaAnIo+odXqIVdUz/Luic0Cb8cZ/dHgWVGc2Ckmlp6 DddnAXqK2/QVt+osO7X0jOulgXAxoeBCHNm5HOtopx7MxS1uDS2NNilnl6L2vQSvkLWH CLDZe83jATaK5Sgyy1l7lPgnyQ4+H73w4sNaz2T56YsoFkvSnbF5uC9xghelC1Djn3aw hTbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=wr3ouKem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do19si6726167ejc.670.2020.12.07.07.52.01; Mon, 07 Dec 2020 07:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=wr3ouKem; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgLGPtm (ORCPT + 99 others); Mon, 7 Dec 2020 10:49:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbgLGPtm (ORCPT ); Mon, 7 Dec 2020 10:49:42 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDDFEC06179C for ; Mon, 7 Dec 2020 07:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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; bh=YhTuQpAuVhEXZKFT3p3qbp40M3jZi+iAS4Ki0D9kbgk=; b=wr3ouKempAHHE1O6HSg1PGu1E7 qXyl3QyHhzb+ARRJX7ZxG+WW2NOZudStGTb9KayddDovSowmVo2YsdD6WfR9g/FyNzNdoKzFBdwbb 6dHhXAjOx5IppkvN6kfTgEZ2Rz9sjRy2HtwXsHp+FXhH6AFyxjNDjVJF99U7AU7+vue9NNpyOvzZS z2CaS0htrRK6zS0XsdI61HWybueeVRG0w69ec7FHbO+t7+IJ6ke11t/d2s5UtQ3//jQJgOgIg9IWM mjDZhrS/d/GghG7sBA1lSZLMkvxmqfJCyqTSSyODtx53T7hVoAcitIgmGLSiAfXu3vAozc911CSnG pjJYrbig==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmIkl-0002zy-NT; Mon, 07 Dec 2020 15:48:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1AEFC304B92; Mon, 7 Dec 2020 16:48:39 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0A261200E4A0F; Mon, 7 Dec 2020 16:48:39 +0100 (CET) Date: Mon, 7 Dec 2020 16:48:38 +0100 From: Peter Zijlstra To: Aubrey Li Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, mgorman@techsingularity.net, valentin.schneider@arm.com, qais.yousef@arm.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, Mel Gorman , Jiang Biao Subject: Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup Message-ID: <20201207154838.GP3040@hirez.programming.kicks-ass.net> References: <20201118043113.53128-1-aubrey.li@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118043113.53128-1-aubrey.li@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 12:31:13PM +0800, Aubrey Li wrote: > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index f324dc36fc43..6f5947673e66 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -163,6 +163,7 @@ static void cpuidle_idle_call(void) > */ > > if (cpuidle_not_available(drv, dev)) { > + update_idle_cpumask(this_rq(), true); > tick_nohz_idle_stop_tick(); > > default_idle_call(); > @@ -193,6 +194,7 @@ static void cpuidle_idle_call(void) > max_latency_ns = dev->forced_idle_latency_limit_ns; > } > > + update_idle_cpumask(this_rq(), true); > tick_nohz_idle_stop_tick(); > > next_state = cpuidle_find_deepest_state(drv, dev, max_latency_ns); > @@ -205,10 +207,12 @@ static void cpuidle_idle_call(void) > */ > next_state = cpuidle_select(drv, dev, &stop_tick); > > - if (stop_tick || tick_nohz_tick_stopped()) > + if (stop_tick || tick_nohz_tick_stopped()) { > + update_idle_cpumask(this_rq(), true); > tick_nohz_idle_stop_tick(); We already have a callback in tick_nohz_idle_stop_tick(), namely nohz_balance_enter_idle().