Received: by 10.223.176.5 with SMTP id f5csp3072736wra; Thu, 1 Feb 2018 10:18:47 -0800 (PST) X-Google-Smtp-Source: AH8x22410eUb0upuT2/tCmnTszgazM1tykvQRZvfes+XEqj/UbZz6tfRaEnqB0zEP7Je+1O2ce4a X-Received: by 10.98.10.199 with SMTP id 68mr10009521pfk.202.1517509127215; Thu, 01 Feb 2018 10:18:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517509127; cv=none; d=google.com; s=arc-20160816; b=VKquzBgMIksLKSGmvwhwgV6fpnpu4s7IVbHedbFkzPXZjQEMG2mxibO2PAoGq0D3Nb fnN8h9MXOzBuhVUyHubOrkRVn7EU1Us6yJ+CpTQyxECOCC3PUKtKQfVm/qUbhuGjZymu BVwR8gPKtvwHA7IPjkVahQw+hW16+D2Vj+s4uQzgGMcKSF8Bst0JB51+/paeUWAckhrk GgMu4sU947/5+RCDbu+UWOBxtYTuCHNanfTMdND/Xu22meoAxqSqQ0srgGj7BG77pZSn aokPDibr/Jbqd2sZhqEXLEvnT6xVVqH58vgVXwhemfm8k/zrv8qAR1/4/1u708g+vQki Uf7g== 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=5FZGdsQs7/y1b58PZYDfBs1E3LC/X9xRJpuWdhsy8R8=; b=bs6OSHl3uLemx61paUfWpcFE6mWcAp9NBPqYpj39hq3kC38DyioGVPzPjkpyILA0nO D4VjQAnxNxxmBqE9ZvNkhd2vVJpGnnYWqa5UdptEO7zX0Kg6doO+R1m4yrER+wznAM1t utGDz/RgcNCn1XT19GA+ZPsrqVR+ytD1MyV/mbTaCbWXXuNPc1n3Piq2PjIM6NDo43vw vYfGGU+HgKHVxERtB1QK8vR4x9npaEno0Lo1MUoZLqqQCOCdhacPWxO4uVFfgXxEgkey +F4zK0x+TASp41JF+E6CBRI3h5FXyZzMHzymu1sPxJzJIJF2v09eb5gEeNGLjGkWqJQk Blpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=y1GpRZYB; 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 e13si73481pgt.584.2018.02.01.10.18.32; Thu, 01 Feb 2018 10:18:47 -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=y1GpRZYB; 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 S1753186AbeBASQm (ORCPT + 99 others); Thu, 1 Feb 2018 13:16:42 -0500 Received: from merlin.infradead.org ([205.233.59.134]:56632 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752840AbeBASQj (ORCPT ); Thu, 1 Feb 2018 13:16:39 -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=5FZGdsQs7/y1b58PZYDfBs1E3LC/X9xRJpuWdhsy8R8=; b=y1GpRZYB/DQ7G1FuFKZIRL6P/ 3Rlm0twb75bWEEROF0e1r2CGCO2n4IDraRDvSA67Z9JVGwXHTvnxfkAC1mxdcqmkG+VwbRr1TPWG3 kk6hxwAaKRQzBIULs2Xuxl/dtz0VmgcxmjX1gf3N4LKXXTK5YfgsxyudfopT+0B4SzMnbNXfPET7j b56s1QmUxWAc9IgM+zot417JwfoSZ07iDV/a/ppC4qyssRNoKnNP3c9Je89mY9elexBBSRCjMn0bB FZTcxFaiLmSG5i8B6cqdfng4USG70rqMDv7HE6j5FZR4rUIPJFFiOIgyEHKJqGOJAXg4QYfCo6Dmf NKB9MYicg==; 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 1ehJPX-0007aa-If; Thu, 01 Feb 2018 18:16:35 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 366F92029F9F9; Thu, 1 Feb 2018 19:16:34 +0100 (CET) Date: Thu, 1 Feb 2018 19:16:34 +0100 From: Peter Zijlstra To: Valentin Schneider Cc: Vincent Guittot , 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: <20180201181634.GG2269@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: 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 Mon, Jan 29, 2018 at 07:31:07PM +0000, Valentin Schneider wrote: > But for load update via _nohz_idle_balance(), we iterate through all of the > nohz CPUS and unconditionally call update_blocked_averages(). This could be > avoided by remembering which CPUs have stale load before going idle. > Initially I thought that was what nohz.stats_state was for, but it isn't. > With Vincent's patches it's only ever set to either 0 or 1, but we could use > it as a CPU mask, and use it to skip nohz CPUs that don't have stale load in > _nohz_idle_balance() (when NOHZ_STATS_KICK). Yes, you'd need to allocate a second cpumask, worse you need atomic bitops to set and clear bits there. That all _might_ be worth it... dunno.