Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp469978pxb; Tue, 9 Feb 2021 05:11:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/id0YINk4aUBrBzY8pCLa5bcfmrm/MznXU9DDXSoM8L4YZQJYg8JplG2bW3SQfqvhtXMq X-Received: by 2002:a05:6402:1d82:: with SMTP id dk2mr21791283edb.132.1612876319561; Tue, 09 Feb 2021 05:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612876319; cv=none; d=google.com; s=arc-20160816; b=wVPJGLfAoP0HFX80W9zRC0HmAMao+Mc1S0ooPDe3j3VXgqmh5Q8hObMRGpvwMXjVaz aqKb4UPM24XWll7V6/oyyB7sQKVDOkA2rsp/Y5WTT0FpmFoCSeky0Glk/NwjeN/5Cm7f 9FYL1Y9Oew3XBTF0Cnvp5GqV7khUYTh6SCRlwFIhIGsKff3qEXBJO+hSfjQqhv6d6Yna 0NmAL0iBZTKAh2osy7vf+2uTvCGw8C126/u8+u7TiqHhJ6JG7vwOoQ4p6W3f6sHxNMDr zq0J7PcJdjpKtOk6eW7p4+CKY87LFatCzlNmdLrSU5WpkMTVDNRIWj/THkhTMRD7eCEo vmyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=jfjMebnDOhEaFeoJV5I7M20BAj2p3Bpu0eHH9wBlaEo=; b=mRFZjOH3iEIloXWSeL0XUKtJNia21l6ifkOwnwogoGMlu8kPV26p1fyP7/Z0XlKtkf zYY5aOvlI9IFEDU/eQ7h6Jqd4sVORj0xpq0n6Na306dxi8SSXgv5ogqpsIniBpw//pMc LBhYqvum1YMrBth8VTBOcCStCI4c0pwVXafwjnKEVvbpOSZ9JaFNa1kON5x/6NWZHPjW Ef+qZEMyeap702SM0s5bNa2jiZxu6EooNxX+k3jl5dBULgjJRczz9UItRjW/265rOqQr D3IooNBwdSpX6rzQQQPBfUnYG+KcdF+o/en4D3iKLO4s2D6z0XUPY9XLXxgLHXHZOjP5 tXbA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si15066615edb.238.2021.02.09.05.11.32; Tue, 09 Feb 2021 05:11:59 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbhBINKP (ORCPT + 99 others); Tue, 9 Feb 2021 08:10:15 -0500 Received: from foss.arm.com ([217.140.110.172]:51442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbhBINKP (ORCPT ); Tue, 9 Feb 2021 08:10:15 -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 E90A7ED1; Tue, 9 Feb 2021 05:09:28 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0EC363F719; Tue, 9 Feb 2021 05:09:26 -0800 (PST) From: Valentin Schneider To: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, fweisbec@gmail.com, tglx@linutronix.de, bristot@redhat.com, linux-kernel@vger.kernel.org, joel@joelfernandes.org Cc: qais.yousef@arm.com, Vincent Guittot Subject: Re: [PATCH 1/6] sched/fair: remove update of blocked load from newidle_balance In-Reply-To: <20210205114830.781-2-vincent.guittot@linaro.org> References: <20210205114830.781-1-vincent.guittot@linaro.org> <20210205114830.781-2-vincent.guittot@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 09 Feb 2021 13:09:20 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/21 12:48, Vincent Guittot wrote: > @@ -10517,16 +10499,11 @@ static void nohz_newidle_balance(struct rq *this_rq) > time_before(jiffies, READ_ONCE(nohz.next_blocked))) > return; > I was wondering whether all the conditions above were still relevant. I think they are, but this one: /* Will wake up very soon. No time for doing anything else*/ if (this_rq->avg_idle < sysctl_sched_migration_cost) return; should have its comment updated to something like: /* * Will wake up very soon. Blocked load will be updated * periodically, no need to wake an idle CPU. */ given kick_ilb() isn't the costliest of things. > - raw_spin_unlock(&this_rq->lock); > /* > - * This CPU is going to be idle and blocked load of idle CPUs > - * need to be updated. Run the ilb locally as it is a good > - * candidate for ilb instead of waking up another idle CPU. > - * Kick an normal ilb if we failed to do the update. > + * Blocked load of idle CPUs need to be updated. > + * Kick an ILB to update statistics. > */ > - if (!_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, CPU_NEWLY_IDLE)) > - kick_ilb(NOHZ_STATS_KICK); > - raw_spin_lock(&this_rq->lock); With this change, the return value of _nohz_idle_balance() is no longer used. This means we could get rid of the tracking of whether it iterated over all nohz CPUs or not. > + kick_ilb(NOHZ_STATS_KICK); > } > > #else /* !CONFIG_NO_HZ_COMMON */