Received: by 10.223.185.116 with SMTP id b49csp6108505wrg; Thu, 8 Mar 2018 01:49:56 -0800 (PST) X-Google-Smtp-Source: AG47ELvRCm+meMeM6NzRhoBaBrpBHKNglSOANkvFZl4V4uIcpX/yQS0NKvsOPFKE6y3Nj6UjEGMG X-Received: by 10.99.108.129 with SMTP id h123mr13548691pgc.30.1520502596798; Thu, 08 Mar 2018 01:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520502596; cv=none; d=google.com; s=arc-20160816; b=lmHcv+Koh6q4Gr38+XROMmYGnH1ZjvRNuP1OIjdPZZkCmRv89CuEgQmqLYEaRVasuL QyrIZJtlZyxv0V5fEk0VsWSr6Q3v5TvKnBtgd2zpOfbn8TQ1J/bT85YHunHscqg7OOJv A9uYW5nszZOCAKzaaF3RvZe1KXsk9m4q3L1YPQePmLTIKdbFQk4L19vv+wkNJdgFTVuv krngM1FmXOq4/b+ZDq7ZVvb/Zet0MUdUnUKG4a6BMRdOWOSRBBz1jZJpHz6r2ShT95Zq Bk03FzP1OgVKYN/IXS0F+wOTi+PbczPixLrdhKc2C8B6XoaZfymz9YAPytLdwxYj8VXN QIOw== 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=0Ou92I9fbdW1UgewUanZUtmhw117400LqpTKsE1KIiU=; b=kAoi6dqFhihOAd3M+ZgR98CKb79cavX6YmU61A5djK4m0OdXzK3F6CCbsNAQ4y2DuR ZedpLidvfoGwp2sqZkl9s85/m4c7bIKy7drlHyCl+WD9iWVEa/OJDmyTrFpOlpMeKwbA oKnAOTMsdGM//yfcvZ5MGkU1v4LikJUcE5uyRzQ1x5o22bx+BnEtOQicMRttsD0Cei05 wB6E3USx7NVW/rKo2exlN4IaOMbWr+B5L+uZKEo4T3RE78IEoE4GZ6H81b4N8denlNn5 MVztw9ffJGwG6ZdmidjxcPjLbHtmCLSB6PTsq5mEKFXvvxyGZbRwCI1dsat1l7G5kpfL 3YEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WIi3ASlu; 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 l11si869541pgp.249.2018.03.08.01.49.41; Thu, 08 Mar 2018 01:49:56 -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=WIi3ASlu; 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 S934957AbeCHJsi (ORCPT + 99 others); Thu, 8 Mar 2018 04:48:38 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:34096 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755155AbeCHJsg (ORCPT ); Thu, 8 Mar 2018 04:48:36 -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=0Ou92I9fbdW1UgewUanZUtmhw117400LqpTKsE1KIiU=; b=WIi3ASluodpedKX4E4CHr1Los 10ReomiqMdktRK07lgxFCoY0SzeG5S7dAW9qeuWmR/X5yD2NLiiR+NhxWyCwWKvpsQ6QJBPe6F/W1 8wVU1b0gMoY8obhURRFCESUWbj8kd5XucYQ0bTt5JzL1vdoqCC63Wlb/B42qBpPNLfEJHBHvRA7NQ CQ7AHlxpE8S1fT2vrvOZsG5VZl3xlQk9+0tjwCo0/5DuPzsDctQkGVCvVv4geKNzsXa21dGrafJrE ffAZjwDr1ZCpXDKvhVDDr2DcfX6nM+5S8NkkIcCHALeBd3QsP3/p/kFpgI8hu3DQKbj0eROrqRH7t tXeESTBVw==; 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 1etsA4-0000AP-KW; Thu, 08 Mar 2018 09:48:32 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 108532029FA14; Thu, 8 Mar 2018 10:48:31 +0100 (CET) Date: Thu, 8 Mar 2018 10:48:31 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle Subject: Re: [PATCH v5 4/4] sched/fair: update util_est only on util_avg updates Message-ID: <20180308094830.GK25201@hirez.programming.kicks-ass.net> References: <20180222170153.673-1-patrick.bellasi@arm.com> <20180222170153.673-5-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222170153.673-5-patrick.bellasi@arm.com> 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 22, 2018 at 05:01:53PM +0000, Patrick Bellasi wrote: > +#define UTIL_EST_NEED_UPDATE_FLAG 0x1 > @@ -5321,12 +5345,19 @@ static inline void util_est_dequeue(struct cfs_rq *cfs_rq, > if (!task_sleep) > return; > > + /* > + * Skip update of task's estimated utilization if the PELT signal has > + * never been updated (at least once) since last enqueue time. > + */ > + ue = READ_ONCE(p->se.avg.util_est); > + if (ue.enqueued & UTIL_EST_NEED_UPDATE_FLAG) > + return; The name and function seem inverted, if the flag is set, we do _NOT_ update util_est. How about something like UTIL_EST_UNCHANGED ? That would give: /* * If the PELT values haven't changed since enqueue time, * skip the util_est update. */ if (enqueue & UTIL_EST_UNCHANGED) return;