Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2422568imu; Thu, 29 Nov 2018 04:55:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/U/G9VVPy/PECb5irPULGa7GdhjzjNpUmLkli8/NI6Lja2yG75z0QoC+kWUS7jw4UdYDXOr X-Received: by 2002:a62:2082:: with SMTP id m2mr1223431pfj.163.1543496116294; Thu, 29 Nov 2018 04:55:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543496116; cv=none; d=google.com; s=arc-20160816; b=IF4BvelMAoN2KegG2ypdSvt1an/O7ZKvCdPv7TypGxyG3cCFmUv4aXScExwgG3xdYb /WgAQ7p1bjzGcsWtBrmI/N1mKtbUbOK+2efP2AsLmbWRxPDCK8PYpE2xMhqQry9tX/j0 CJ/ef7vXkBcASM7Aq5sRvgn34/llDL9AK8YvUkc86VH2quUCF6niJ7f6VKSPp2jFWZyc Zh7XAqKiJ+qcC1HTsLelBSBhujNevmamkrAdPnNFgGcI1kEZQz6s8aZddjbBbe+GOjk5 oW0RwfsNmB2r7tN8fERY9ZEmbhBqsruWSMH8Yww8U1iMucnIZRMs+uTM72DllDSigPS7 ucMQ== 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; bh=K+COZvF9HrSOwZVna3Gq9ATJ61O/vDbbqu5cBO305ws=; b=jYfNBl0414oL5WJTmbk1YqcfwKIS/XteGvSRBQd3oSopm2FI34BkepYMq2F+gv8c5E w4a5hgJy02cvdVMzj4aZDHpEEER/BHPirhQf4UOLckeUCGWbczJKdMCZSsaF0viQaNBu 9rw0rWQOlJOnRgRoOtnYzUa2BfoU9t9G0AAp080JTW4qIQq9q5WT1uiux5v85IFbsu0r qU9QUIiOMR7PvWpOGgbO91ShjHDgwTWQ+Ca2d9kutEh0piIIRrrqtyYMMqU6H9GKOc/+ xhOpGGm2p8vMflOnEja/7vl767uCnLRJxYr9fMkFTUIJsgXbYq4iXrttP3/tkj8+ugaP 01pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ss0CrV6P; 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 r10si1883587pgg.143.2018.11.29.04.55.00; Thu, 29 Nov 2018 04:55:16 -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=ss0CrV6P; 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 S1728326AbeK2X7R (ORCPT + 99 others); Thu, 29 Nov 2018 18:59:17 -0500 Received: from merlin.infradead.org ([205.233.59.134]:42306 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbeK2X7R (ORCPT ); Thu, 29 Nov 2018 18:59:17 -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=K+COZvF9HrSOwZVna3Gq9ATJ61O/vDbbqu5cBO305ws=; b=ss0CrV6P96e2MIvqREtHsT+61 x5htakmhuCMqrZC/C1kd90Q3xfrEIC6zUmL6EMZXEyo6W/ckiW/Tnea1EMSdVPAv2b7gY83nWD/Ji DcNxkhVCVbyewOFzy1h5nSFx780nni8WZymzvwMr3hK2Ttx25xY0rD0rLsQutYUM6caLQjVi/LsJ/ bu/qKoyrRg8cRNGOFgYcLask3k4M/h6XsTxt09rclVche9IHmSSuJMAMeIgtoHxju8M27EX97ELFh WhOoQ7Ak2as87Q6uI+ICM9fHrtI3xySX77mmfcLc/Y4RQVVBXQY03ULuHa9jTDROVO/6JiTw8Q9Sb ztCRKGPTg==; 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.90_1 #2 (Red Hat Linux)) id 1gSLpG-0008AQ-25; Thu, 29 Nov 2018 12:53:50 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BFBE42029FD58; Thu, 29 Nov 2018 13:53:48 +0100 (CET) Date: Thu, 29 Nov 2018 13:53:48 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: Vincent Guittot , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Dietmar Eggemann , Morten Rasmussen , Paul Turner , Ben Segall , Thara Gopinath , pkondeti@codeaurora.org, Quentin Perret , Srinivas Pandruvada Subject: Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT Message-ID: <20181129125348.GL2131@hirez.programming.kicks-ass.net> References: <1542711308-25256-1-git-send-email-vincent.guittot@linaro.org> <1542711308-25256-3-git-send-email-vincent.guittot@linaro.org> <20181128100241.GA2131@hirez.programming.kicks-ass.net> <20181128115336.GB23094@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181128115336.GB23094@e110439-lin> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 28, 2018 at 11:53:36AM +0000, Patrick Bellasi wrote: > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index ac855b2f4774..93e0cf5d8a76 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -3661,6 +3661,10 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep) > if (!task_sleep) > return; > > + /* Skip samples which do not represent an actual utilization */ > + if (unlikely(task_util(p) > capacity_of(task_cpu(p)))) > + return; > + > /* > * If the PELT values haven't changed since enqueue time, > * skip the util_est update. Would you not want something like: min(task_util(p), capacity_of(task_cpu(p))) And is this the only place where we need this? OTOH, if the task is always running, it will be always running irrespective of where it runs. Not storing these samples seems weird though; this is the exact condition you want to record -- the task is very active, if we skip these, we'll come back at a low frequency on the next wakeup.