Received: by 10.223.176.5 with SMTP id f5csp3065435wra; Thu, 1 Feb 2018 10:11:54 -0800 (PST) X-Google-Smtp-Source: AH8x224+/v8KR74VbFV+7cmX1zvDIFLYBxOdyHPDHyQmWZWLuDf//8liDZiPp9R/XMa5hMoxL4pI X-Received: by 10.99.95.4 with SMTP id t4mr28566441pgb.291.1517508714635; Thu, 01 Feb 2018 10:11:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517508714; cv=none; d=google.com; s=arc-20160816; b=OsVHcY75HxeJozDoyGEtGRim0a4uIRX7sQFXHWLjYIb5Nf0hhqz1LfbxzTXxHECA0m fMOs4agJz/fyx/vvEu6pRAANdFw41S18TMlZ8ruUIRiYnvU4kjrO43V0gQwgi945W6gy hSe0Rf5WdFY/JjP8ZFMh6gq0Yd1QW2ZaPkRBvNIZucnGQV0GhNDPioykWNFEaCQGc38y POQF3WemMXVvhzwtMpuAU7SY4bI2T3Ot/EDlR05LOi/nGrgyuJq1BOYUWDVyEE2FWB0W 44zLZN+UzXujOZE8kh82bEFH33tQTUoXIFo/f7kKXwwR5/ZZ2Y4oKS0nWDXdfe/tCmhn Mqng== 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:arc-authentication-results; bh=jw7+IzHRzFUPztK63g0K4XqbIW2iche3yesbszkxCBQ=; b=EFblwIYMq6mFQS/7FzA3ldgojOYocRoB2zkq/WTl8CG5obS2l7ctcWQxJ7WGzNRZHS hCx58alR3UiB9dHALmf0+SFZ1slDd02dS0+CE0nshQJOLMC5OrBRxLueoKJPO5XjXdKN Dk4PM8OFr77+MIMFA0qmzEmsCZOHurCn/11wmi+sZaeRxLGu6f33n7OCL2b4BLc75ODn zU+tVMbzHXqXdi7iVl7Ud4lPqXAl8JMMOS9CbBPIx2CQYLEldEJD49If7o3JooqnFe4O kpoRPa7feKoqo8prkbRHLSG4qx0+xv9nkwSkYCvv+E5B1DbmpzajYZZ4jhVLzpVe9zaA WRiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=MPe693bv; 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 o68si40214pfk.327.2018.02.01.10.11.39; Thu, 01 Feb 2018 10:11:54 -0800 (PST) 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=merlin.20170209 header.b=MPe693bv; 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 S1752923AbeBASKv (ORCPT + 99 others); Thu, 1 Feb 2018 13:10:51 -0500 Received: from merlin.infradead.org ([205.233.59.134]:56588 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752646AbeBASKu (ORCPT ); Thu, 1 Feb 2018 13:10:50 -0500 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: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=jw7+IzHRzFUPztK63g0K4XqbIW2iche3yesbszkxCBQ=; b=MPe693bvcqCtE2vV5KrmNr+8z cGYuzDEzrRx+0Be5ai6YFEzQlEN7mT9mWqTpDzqk4PzXsRQqawLvA7TwaD5zARqsc2z41MeX4Rg81 6X18An4QMHSMW2b6NlXBnNtrnS8X2KxAasKv8j9B8jiaInUQkA4tJaKiJQJqh6Y0xv0xgebPnCM++ UOTmtQFeP21/xl1RC2a2lR5vghjs/Mcxo5mqaDHlx5iDCO8sbXRUQwOQTCG2v1NvtK6WW8W1RySaq 8wijLs9AlKD0yP86vYzpEqV0i0saNTAu5BT4NHK+ZUOSCaQXhgIJXuHG7Ah6VnL0Chja4tZKF8EHT Q4W0NIaZg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ehJJs-0007Zk-S4; Thu, 01 Feb 2018 18:10:45 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0A9BE2029F9F9; Thu, 1 Feb 2018 19:10:42 +0100 (CET) Date: Thu, 1 Feb 2018 19:10:42 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: Morten Rasmussen , Ingo Molnar , linux-kernel , Brendan Jackman , Dietmar Eggemann , Morten Rasmussen Subject: Re: [RFC PATCH 2/5] sched: Add NOHZ_STATS_KICK Message-ID: <20180201181041.GF2269@hirez.programming.kicks-ass.net> References: <20171222082915.4lcb7xyyooqyjpia@hirez.programming.kicks-ass.net> <20171222091221.ow5vn3ydx3hj4nht@hirez.programming.kicks-ass.net> <20171222185629.lysjebfifgdwvvhu@hirez.programming.kicks-ass.net> <20171222204247.kyc6ugyyu3ei7zhs@hirez.programming.kicks-ass.net> <20180115082609.GA6320@linaro.org> <20180118103807.GD28799@e105550-lin.cambridge.arm.com> <20180124082536.GA32318@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180124082536.GA32318@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 09:25:36AM +0100, Vincent Guittot wrote: > @@ -8861,7 +8875,14 @@ static int idle_balance(struct rq *this_rq, struct rq_flags *rf) > update_next_balance(sd, &next_balance); > rcu_read_unlock(); > > - if (time_after(jiffies, next) && atomic_read(&nohz.stats_state)) > + /* > + * Update blocked idle load if it has not been done for a > + * while. Try to do it locally before entering idle but kick a > + * ilb if it takes too much time and might delay next local > + * wake up > + */ > + if (time_after(jiffies, next) && atomic_read(&nohz.stats_state) && > + !_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, CPU_NEWLY_IDLE)) > kick_ilb(NOHZ_STATS_KICK); > > goto out; This I really dislike. We're here because avg_idle is _really_ low, we really should not then call _nohz_idle_balance().