Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1231088pxu; Mon, 23 Nov 2020 15:23:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJysvrgIPF02RPAvIxjGhrRMkyBuTZ9QpUANRWYkNRb1OAL/zWY9ZGebmwvRsC81mpQTbTNl X-Received: by 2002:a17:906:3c15:: with SMTP id h21mr312652ejg.535.1606173785887; Mon, 23 Nov 2020 15:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606173785; cv=none; d=google.com; s=arc-20160816; b=f9l1kyn8uCgV90tge74Jk4zpBO+ApYaghRNFUkgNzX60VfzeGf/G+7fK7wb12ktGiG QxS/oDjrfBkwoM5uIxm3+HXFFb/Zl8aknMQiqw7QhAEQLC9oUJRtg747F2DcbLTNjlZK 59UvJ5EKcwN5teTs2aZxVpsRntkz9G2RTIiPk0AJ9p/qQszExnmNdU+n8mP1gw3CMFiT qKYif1QajB62nrQ4Mf/52qjRqMlrbgMEpuWim5VnDBULusFKjKKM1/ajLrqA4MF2Cw/U GYu1651o1sFbk/BthKq8ytafZMIOKfoCk0NMthyruNK5ddmjzAg/Iqvaz1jiCO5ywrMc JvHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from; bh=CMXih6g+98JKH030hW/noTcOdeY5aih/kI7vfJAMeHw=; b=N4bxFw4Igd/vjqXP1U6smxe9f4hqxfWl2++fF5K8qIz6+6vLOli/04jO29N6W5g+zy KtKkywcikQpnmZbyEaMYG1F+vbm6dCHO0zfHQSea0qSwGe227wE55WumIhTlQCPqxWfn MViz8hQm47frlgSe30ecV88orXywweXl+duk7hbMm0K8+oCNeLVTO4BPc05Ocp1AWfMm NC53poFztd9AgL2LIRjnmaFqQ7mQM+3ghUGC/2fRC7wlwtUkX4RQTQd2BVxDcXacegYw 7p+6+pWAyHthjcVPgiI7aaYzKbkD1Pdv0ryzChCPpbAlN2PQXzasiXZ0k0t9qfTRF1+X QySw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z96si7298235ede.180.2020.11.23.15.22.40; Mon, 23 Nov 2020 15:23:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726051AbgKWJ02 (ORCPT + 99 others); Mon, 23 Nov 2020 04:26:28 -0500 Received: from foss.arm.com ([217.140.110.172]:38040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725275AbgKWJ02 (ORCPT ); Mon, 23 Nov 2020 04:26:28 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 80117101E; Mon, 23 Nov 2020 01:26:27 -0800 (PST) Received: from [192.168.178.2] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9398C3F70D; Mon, 23 Nov 2020 01:26:25 -0800 (PST) From: Dietmar Eggemann Subject: Re: [RFC] Documentation/scheduler/schedutil.txt To: Peter Zijlstra , "Rafael J. Wysocki" , Ingo Molnar Cc: Thomas Gleixner , Vincent Guittot , Morten Rasmussen , 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 References: <20201120075527.GB2414@hirez.programming.kicks-ass.net> Message-ID: <31ab5111-8cea-3a95-823e-f3a84476f7d6@arm.com> Date: Mon, 23 Nov 2020 10:26:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201120075527.GB2414@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/11/2020 08:55, Peter Zijlstra wrote: [...] > PELT (Per Entity Load Tracking) > ------------------------------- [...] > Using this we track 2 key metrics: 'running' and 'runnable'. 'Running' > reflects the time an entity spends on the CPU, while 'runnable' reflects the > time an entity spends on the runqueue. When there is only a single task these > two metrics are the same, but once there is contention for the CPU 'running' > will decrease to reflect the fraction of time each task spends on the CPU > while 'runnable' will increase to reflect the amount of contention. People might find it confusing to map 'running and 'runnable' into the 3 PELT signals (load_avg, runnable_avg and util_avg) being used in the scheduler ... with load_avg being 'runnable' and 'weight' based. > For more detail see: kernel/sched/pelt.c > > > Frequency- / Heterogeneous Invariance > ------------------------------------- We call 'Heterogeneous Invariance' CPU invariance in chapter 2.3 Documentation/scheduler/sched-capacity.rst. [...] > For more detail see: > > - kernel/sched/pelt.h:update_rq_clock_pelt() > - arch/x86/kernel/smpboot.c:"APERF/MPERF frequency ratio computation." drivers/base/arch_topology.c:"f_cur/f_max ratio computation". > UTIL_EST / UTIL_EST_FASTUP > -------------------------- [...] > util_est := \Sum_t max( t_running, t_util_est_ewma ) > > For more detail see: kernel/sched/fair.h:util_est_dequeue() s/fair.h/fair.c > UCLAMP > ------ > > It is possible to set effective u_min and u_max clamps on each task; the s/on each task/on each CFS or RT task [...]