Received: by 10.192.165.156 with SMTP id m28csp858794imm; Wed, 11 Apr 2018 08:19:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+MSgeXtYt+D5ln9COW1KxoPnXYR1luTYepqkt8awPIxHrwNpmR5fKDBfPXay931d40dfW/ X-Received: by 2002:a17:902:5a4:: with SMTP id f33-v6mr5675488plf.278.1523459980163; Wed, 11 Apr 2018 08:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523459980; cv=none; d=google.com; s=arc-20160816; b=IrofGLgApUDjoJVFH71PnnkpK0VeSBzlmfV470MNXfwOWN4G8TuFCBMM1jMpLCuu4L n7e/vIH5RcniK0vxsvtO7+TgdgohlbI3FHMMJlLASzXbRv8Tug4YFP/zdHLVhtU6ExVD +3z728ZbzTwjZvTIQhPIW4nGZ9vL6mE3xejog0XhLqeJy84DWjC6W19Hf22Q67cBDLK7 zPtqSaT9wsw9W7HHxnyc0JP8JZuyCjACltJbSvOhmq9Jgx0i0Rvw26Myeie/e4rMZf/G RW9lovY3a+nxEQsRibtsHeqgVh3eB1cOGnuy8opa6nynwdzcJjxnpD85HR4eTUYKreOa n/Jg== 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=u5P6JQIarvA91wkHZWwPnI9KpD7dsfqlIJVlGRdjnig=; b=KlkgOhmPtdueLNaxb8F4r4PuWcc5ZL50mpkNC3rxFlzfg7T2307VBPPqSsPbW2fuZE nNX7c7BL5BKjxAcRzfzAe805gJsbTqiho24XCCQc+B80yBzmuXyd3s6s6CiSOuFVXBzh ZJ977T3wl+Lrryx/STndPFMaf4dSD8DDITIXUdaqrBcM9C5w0zmAJ+4+JMPvuycAoAGY fScU2LHLMAEZmXC/0zfE/XX5/Pk5FLJKmNDmqPNeksX/07cu01YGi3nereOkntObZENz Iu8JbMF/g6egg9VYzB3xrrJLbjft9FSYl3jnLCAWLXNgiyNFKOgWMimLxMU3T3Hv6fKG DzOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=0IyViMsN; 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 o64si969843pfb.245.2018.04.11.08.19.03; Wed, 11 Apr 2018 08:19:40 -0700 (PDT) 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=0IyViMsN; 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 S1753695AbeDKPPC (ORCPT + 99 others); Wed, 11 Apr 2018 11:15:02 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48212 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753424AbeDKPPA (ORCPT ); Wed, 11 Apr 2018 11:15:00 -0400 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=u5P6JQIarvA91wkHZWwPnI9KpD7dsfqlIJVlGRdjnig=; b=0IyViMsNDWnkOqIpb/7nAe3e3 nUsu/vMrAO/juDj0c7vXLndnkGOKNikIVwh6Y3A3NlZIB26dTX6o8mV6tOFGkZnFDfZ6insCu0lVE Q1OR9ufTYI5lF8byo+PO0EYkIRE3gRS38J4dJ7r2oXeXq6f9/HB7cNYM11mD26WwZbImJpheJMZYT 7N53+qs7Nts9ATco0lHaMFLe47j2hrujWZweQaDxaj7iJDqvna8kfPZMNy2K9AmeIb4x0dJ0phc9W 29lpyCyYDR1vuuZJZqLG5ruZrODcQX6iwA21uGZrp6/3MoSRh838t67oa5tUQj++Mzj1q/4wz4N1C IAYQ+wflg==; 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 1f6HSV-0006Dk-Tk; Wed, 11 Apr 2018 15:14:52 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5D7C42029B0F8; Wed, 11 Apr 2018 17:14:50 +0200 (CEST) Date: Wed, 11 Apr 2018 17:14:50 +0200 From: Peter Zijlstra To: Patrick Bellasi Cc: Vincent Guittot , linux-kernel , "open list:THERMAL" , Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Juri Lelli , Joel Fernandes , Steve Muckle , Dietmar Eggemann , Morten Rasmussen Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available Message-ID: <20180411151450.GK4043@hirez.programming.kicks-ass.net> References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180410110412.GG14248@e110439-lin> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 10, 2018 at 12:04:12PM +0100, Patrick Bellasi wrote: > On 09-Apr 10:51, Vincent Guittot wrote: > > Peter, > > what was your goal with adding the condition "if > > (rq->cfs.h_nr_running)" for the aggragation of CFS utilization > > The original intent was to get rid of sched class flags, used to track > which class has tasks runnable from within schedutil. The reason was > to solve some misalignment between scheduler class status and > schedutil status. > > The solution, initially suggested by Viresh, and finally proposed by > Peter was to exploit RQ knowledges directly from within schedutil. > > The problem is that now schedutil updated depends on two information: > utilization changes and number of RT and CFS runnable tasks. > > Thus, using cfs_rq::h_nr_running is not the problem... it's actually > part of a much more clean solution of the code we used to have. > > The problem, IMO is that we now depend on other information which > needs to be in sync before calling schedutil... and the patch I > proposed is meant to make it less likely that all the information > required are not aligned (also in the future). Specifically, the h_nr_running test was get rid of if (delta_ns > TICK_NSEC) { j_sg_cpu->iowait_boost = 0; j_sg_cpu->iowait_boost_pending = false; - j_sg_cpu->util_cfs = 0; ^^^^^^^^^^^^^^^^^^^^^^^ that.. - if (j_sg_cpu->util_dl == 0) - continue; } because that felt rather arbitrary.