Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1010183pxu; Wed, 2 Dec 2020 08:50:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQ3PgYxiLOgu2mx46RN/jnkSEEVy0sIDvRlq5P5t7pEL+bWIFMo5DFZcg3wwHclDjPJGcV X-Received: by 2002:a05:6402:1508:: with SMTP id f8mr800926edw.350.1606927835056; Wed, 02 Dec 2020 08:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606927835; cv=none; d=google.com; s=arc-20160816; b=bD0ACCF7RQic/84CS0GxfYyeilHgBy8o3arbJk+reHcmc3UudkWwacxiN5gw8UeNWc LDCqZXbcBKtF+1RbOU6yROfPU3FIcLVa4glB06vppTAfGQlGh0wH6t1mnI6+A8ZgD0y7 mvgIAPSiIYj7RLTHQbPT26FGIKVfC3hzSXSgbBFqyi4ClS5Dlc2doXhvS7kVG4LDLwm6 zDHts2C/yGcgPUko8DKVvg0I7isMLH3ucK0rTYyXr4g/l1TeuetKHbLOtbiVoe/EF1n6 XVpihGydGSvAPwtCWtWsqTMnry1aRBGzPTJgMWm6U4aWHf7QTvCe+lV9JGJgJmsv/n/V 6MVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Gyjtd4MykAUPvnhqvVId+UCwnxyNj03BuOCrH/pHdsU=; b=MSRA+qjanEOlCOz1f4z0Dgc282wt2k9ojHRHLlax6orCCF2s+qzclfxBms2hD1Yqo3 nSgJP0B/HRT+x1Po4c869WS4O5dPK4WedYgsGBsB6I2R15L8tZQTIreXhX1pAq0Yoqdy RIrJpft+HfiEVXsmJj5iPJ8HVZF98n3Ow7lpGIBrQHhJwD7QUAjBzeQytMlt8gn2twIo NcdfutPySo0p4+lii9nyPtqhwitPjbbvS3gUqSj2Kn3cPuBL4JT2UJHp3+oB5ET6m6Tq ZliYf/fzXVvzo+bHtEfT23/zI26giAFOkA7sH2AFboLWeqOret7otvI1f0U9h48duc2Q OCDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si295440ejr.169.2020.12.02.08.50.10; Wed, 02 Dec 2020 08:50:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbgLBQqQ (ORCPT + 99 others); Wed, 2 Dec 2020 11:46:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:50586 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727482AbgLBQqP (ORCPT ); Wed, 2 Dec 2020 11:46:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DC5D8AD4D; Wed, 2 Dec 2020 16:45:33 +0000 (UTC) Date: Wed, 2 Dec 2020 16:45:31 +0000 From: Mel Gorman To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Ingo Molnar , Thomas Gleixner , Vincent Guittot , Morten Rasmussen , dietmar.eggemann@arm.com, patrick.bellasi@matbug.net, lenb@kernel.org, linux-kernel@vger.kernel.org, valentin.schneider@arm.com, ionela.voinescu@arm.com, qperret@google.com, viresh.kumar@linaro.org Subject: Re: [RFC] Documentation/scheduler/schedutil.txt Message-ID: <20201202164531.GA3306@suse.de> References: <20201120075527.GB2414@hirez.programming.kicks-ass.net> <20201202141835.GY3306@suse.de> <20201202155452.GK3021@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201202155452.GK3021@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 02, 2020 at 04:54:52PM +0100, Peter Zijlstra wrote: > > IIRC, this 32ms is tied to the value of LOAD_AVG_PERIOD and the length > > of the ewma_sum series below. Might be worth expanding a little further. > > It is LOAD_AVG_PERIOD. Some people (re)generate the PELT tables with a > different period (16 and 64 are common). > > Not sure what there is to expand; the whole of it is: y^32=0.5. We had > to pick some half-life period, 32 seemed like a good number. > No issue with the number other than the y^32 is tied to LOAD_AVG_PERIOD. Again, it's something that someone looking at the source would eventually figure out so it's probably for the best. > > > To alleviate this (a default enabled option) UTIL_EST drives an (IIR) EWMA > > > > Expand IIR -- Immediate Impulse Reponse? > > Infinite Impuse Response > Sorry, yes, still worth an expansion. > > > with the 'running' value on dequeue -- when it is highest. A further default > > > enabled option UTIL_EST_FASTUP modifies the IIR filter to instantly increase > > > and only decay on decrease. > > > > > > A further runqueue wide sum (of runnable tasks) is maintained of: > > > > > > util_est := \Sum_t max( t_running, t_util_est_ewma ) > > > > > > For more detail see: kernel/sched/fair.h:util_est_dequeue() > > > > > > > It's less obvious what the consequence is unless the reader manages to > > tie the IO-wait comment in "Schedutil / DVFS" to this section. > > I'm not entirely sure I follow. The purpose of UTIL_EST is to avoid > ramp-up issues and isn't related to IO-wait boosting. > I mixed up the example. Historically io-wait boosting was one way of avoiding DVFS ramp-up issues but now that I reread it, it's best to leave it general like you already have in your current version. > > Is it worth explicitly mentioning that a key advantage over > > hardware-based approaches is that schedutil carries utilisation state on > > CPU migration? You say that it is tracked but it's less obvious why that > > matters as a pure hardware based approach loses utilisation information > > about a task once it migrates. > > Not sure that was the exact goal of the document; I set out to describe > schedutil. > Fair enough, it would simply lead to documentation creep. > > Even moving note 3 below into this section and expanding it with an > > example based on HWP would be helpful. > > I might not be the best person to talk about HWP; even though I work for > Intel I know remarkably little of it. I don't even think I've got a > machine that has it on. > > Latest version below... I'll probably send it as a patch soon and get it > merged. We can always muck with it more later. > True. At least any confusion can then be driven by specific questions :) FWIW, after reading the new version I'll ack the patch when it shows up. Thanks! -- Mel Gorman SUSE Labs