Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2587915pxu; Mon, 7 Dec 2020 10:10:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrLglaZ4/GRJoVXacdvfNxwB9Ymqj1ajRYu3A/nyoWjYu6TnZnK43U6ES3sr3kDJgi/zcv X-Received: by 2002:a17:907:1009:: with SMTP id ox9mr6134975ejb.37.1607364631135; Mon, 07 Dec 2020 10:10:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607364631; cv=none; d=google.com; s=arc-20160816; b=VEaEs4LHEpKZKB1Fm49Z3zoeujb1x96felVoDtPkKrcvNwiR7i8ps9UNCxJDgNQbUR tSFzwwDnfMkd4+f9dJ1gwRqNYSvkA8jSfJai7g+EHNv7OeNDCXXWDgxhhO/kKsyY2xNu 4h9Q/w1N9POkGlgJJ47+9XT7Udkk2sCgJY0/KU2QI2WTFbh+JJ7Aya7unGAU3FNJ1FQi eVQYuAdop9cP7nxP0p9w9MEH4MAPaRDlx2bxAkaovFZMbe0Mp6Y3kNUtKQg04FiX+A4m +LM2Dp7QLnYhBjDD6Jy0PTh6PaV+XcB8KFWo4gw0K09kQ6u6vauZlG96ny3Swq5Lbybc f00A== 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=hqhNNeuHIOFZyPiLNtUO49By4xky1pUdsNSXoohKAXg=; b=pGXfbCsZW0TJ+eai8TOuPOO8+u9k9HkV/Z739vFSzNCVoO25ePtS7ahGXVWRO37W8/ B+9x3PzGO+xfZ6boOo441AfqFtOUBfTnGFqIzULCcpP3wBWA7POcm7rtMqj60rOpwqow GTgrVZjUq7tT2Ls4OEu2OJfhcMSbmz37xMKA2AbycfZpwjod5hpBlFvFbYjwYhd8EAYy 6PQokrRIdrC2sjvhMfYKQvWmYiQ3ajmxxM86uMLChyNndB/y53sZT/HFWf6WNP4lEkc3 TGD8JNZuTxQNyUgo4CypP38tmBclIoxjhsmJgtM0CM2mH8jazetZT9aGr7bLDCRa9MxU MfFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=V6o30UJo; 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 i19si6532888edr.468.2020.12.07.10.10.08; Mon, 07 Dec 2020 10:10:31 -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=V6o30UJo; 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 S1726162AbgLGSGZ (ORCPT + 99 others); Mon, 7 Dec 2020 13:06:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725822AbgLGSGZ (ORCPT ); Mon, 7 Dec 2020 13:06:25 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4435C061749 for ; Mon, 7 Dec 2020 10:05:44 -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=hqhNNeuHIOFZyPiLNtUO49By4xky1pUdsNSXoohKAXg=; b=V6o30UJoArkIeo6FSY7xxe2CsQ skhbhg6sbfReA+dCDG4LdxWK4i+waESNonbWOmAcdtO6/Bu2adVCYTucd09krKUzA7oIa2g8bwv5u 7VgG9xO5hPN+bajkspSigmknhinOL7IUqnmqFdY0KGmpxPEuucTd26CKNCscs8lkSdPfHTP7PCIch OxBb6pkV/j6k/OfPk3NyjBsldB6fGSwbGFyvUkNzFAUNgqq/wEU7LGHLaAhCLdN76x0oJO9qWU0nc X3inzyoY/mlOxXJLhxdKY2IICi5buGVkQ3ZQu6iSJJmFDbDuc0hXSdmcKnlBy+m56HAAlJkNO6o0D lyp9FP7A==; 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 1kmKsz-0007tj-HX; Mon, 07 Dec 2020 18:05:21 +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 E24CE304D28; Mon, 7 Dec 2020 19:05:18 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CF16E20819142; Mon, 7 Dec 2020 19:05:18 +0100 (CET) Date: Mon, 7 Dec 2020 19:05:18 +0100 From: Peter Zijlstra To: Valentin Schneider Cc: Aubrey Li , mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, mgorman@techsingularity.net, 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: <20201207180518.GR3040@hirez.programming.kicks-ass.net> References: <20201118043113.53128-1-aubrey.li@linux.intel.com> <20201207154838.GP3040@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 07, 2020 at 04:52:24PM +0000, Valentin Schneider wrote: > > On 07/12/20 15:48, Peter Zijlstra wrote: > > 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(). > > That's a no-op for !NO_HZ_COMMON though. For similar reasons, Aubrey moved > the clearing of the cpumask to scheduler_tick(). > > Are you saying this mechanism should only be driven for NO_HZ kernels? IFF it keys off of the tick being stopped, then yes. But as said in the other email, I think that's a very dubious thing to begin with.