Received: by 10.223.176.5 with SMTP id f5csp583781wra; Fri, 9 Feb 2018 04:01:59 -0800 (PST) X-Google-Smtp-Source: AH8x2279EwB9hF2DpeRrDBJ4lOVsAGee7unpdhJKkRBH1A7oZlS/63M/xa5S1mvHoUBXuihYv7H+ X-Received: by 10.99.168.76 with SMTP id i12mr2229511pgp.420.1518177719449; Fri, 09 Feb 2018 04:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518177719; cv=none; d=google.com; s=arc-20160816; b=jVWHyRfTnvNHdlyH7Z682OojWQ15G99pqzkk+pbQT5sUywyD4uAC0BMid3sncLnjCe OGv3QNGo6Dz6FXiMb6Wu1dF88VwDzKDJdGp2E9JxkXkcfEJ11DuEXM4fJC9Nt/fVmbC6 V/wWFs7RTx8U+LzAmLRVxote4uDlx9YBjEARF9nseA/T8zTjoYSPYa9RnlYsnGWw1R7h 75WgysKEcPW319FR7ZzEKrCn83uELRCfvF/z/RlW9CpHVf0clSlYxNA4yQkkgC/t4WiK tsf2W3cdyURGyuyKnbNa6nMIuKw3AUkC7M4zCJpbrfkUMNfavLiYbhzhh8/q7aMrJYzd qKjQ== 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=U9a1Rv/JfTQCESlwym5FyeY969aZ+zgPYiTP9UpPle8=; b=0D+mL3OhriH8ONHvnmPCF8qcVQ5+qBRXpJE520gbGUr5+DD4MiHR0vCizAFsb4XhKE bxoEDO6jdmI/BeAp9un7yh66xxacM/nlj1n7kGulWFzwBzIyAZsBamTOLeivQh2rhk98 wMssN2RdUHHYbK6dZd2PSe7MzAH9xyKE+c8jt57oCssU8yeIWyV0lkeGdK6DbfaKx/0s zGKNa2O0cDYk+nqvOcoFRZYB5tFgMbaC3bHtAKxHbVMSD2wQe6UhEsSsmFL2q20jyofj lvP7mOdQz56CEkKFE7us5dTjiYnBjnjVMVLJaEG8L+cNZ5Lo4I2vVOIu/TZvOS2CX97c V56g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EPGqGBpA; 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 m10si1311372pgn.120.2018.02.09.04.01.43; Fri, 09 Feb 2018 04:01:59 -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=bombadil.20170209 header.b=EPGqGBpA; 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 S1751038AbeBIMBB (ORCPT + 99 others); Fri, 9 Feb 2018 07:01:01 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:53785 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbeBIMBA (ORCPT ); Fri, 9 Feb 2018 07:01:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=U9a1Rv/JfTQCESlwym5FyeY969aZ+zgPYiTP9UpPle8=; b=EPGqGBpA3C1RKf/18xL+Oy9uS qyFxfPccuiT9yFGAMWQRgjuVZx75224p052dntxwqo9P/E9vJ3Nv9HKGDT/O6074X9Pb6KYBI3GrR 37aRYvw2HaG3yeQ4U2H79RRahHq2JJmYVnz6KFSlw1dTbCHfIdwGk7b3LtwqDR/iQ4unppd3WI4NF SMfOzbkmBKUQLK/xpcn+zCE3al8G2BEA2MHf/Tta9qAJxolPGsB+LQ3hE+6cc3EJS68LZUK5X8uwR LjYYdI9oWU4Mph7ghVTKp/DhY1voLoj106gOj/ZXm/DFptxtELTJ85sSS54PDzh2nmo1x+iSaV2Hw ArZEUyJaw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ek7MO-0004GG-EZ; Fri, 09 Feb 2018 12:00:56 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A638420274D62; Fri, 9 Feb 2018 13:00:53 +0100 (CET) Date: Fri, 9 Feb 2018 13:00:53 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: Ingo Molnar , linux-kernel , Valentin Schneider , Morten Rasmussen , Brendan Jackman , Dietmar Eggemann , Will Deacon Subject: Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed Message-ID: <20180209120053.GL25201@hirez.programming.kicks-ass.net> References: <1517944987-343-1-git-send-email-vincent.guittot@linaro.org> <1517944987-343-2-git-send-email-vincent.guittot@linaro.org> <20180208140005.GH25201@hirez.programming.kicks-ass.net> <20180208154459.GA25181@hirez.programming.kicks-ass.net> 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 Thu, Feb 08, 2018 at 05:52:00PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 16:44, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > >> On 8 February 2018 at 15:00, Peter Zijlstra wrote: > >> > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > >> > > >> >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > >> >> if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > >> >> return; > >> >> > >> >> + rq->has_blocked_load = 1; > > > > Should we not set that with rq->lock held? We already clear it while > > holding rq->lock. > > I think it's safe because it is used to re-enable the periodic decay > unconditionally. > It is cleared with rq->lock held to prevents any update of the cfs_rq > *_avg while deciding if we can clear has_blocked_load Yes, and that clearing must then have observed the new addition. But please put so in a comment.