Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2254362rwb; Thu, 29 Sep 2022 08:02:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ijFyzd++DdJtAiB4Gcs52CfCNqscjMC61+WN6/WYI6HYS7DtZRsMtYpGKk0CpIcVQloc8 X-Received: by 2002:a17:907:a044:b0:770:da0d:171d with SMTP id gz4-20020a170907a04400b00770da0d171dmr2946179ejc.742.1664463742594; Thu, 29 Sep 2022 08:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664463742; cv=none; d=google.com; s=arc-20160816; b=u++1ZT+Tj/NKiWV1ka4dqRTI50coMeKYf5m0Su8j22iWBRyJBTDk8uJImvfW6kdYd5 df9z62lFeiLvJjjOz41ZEb+lKmq+YxE8PENBwx5F8aBVj0pBEXElVH+lDg/AjbiYhH28 2kxACKxcIlRtYxlOuqu5Oy/cTfIY8zGeGKYF1jaCA7HEYoorSvbqas4Ir85XpNbpILr/ cfD1BVKK7+YWmkgcYwQudS74I9xFJC+AVzFHVbn6b+t2W2ro1tiBdkL6youo+hU/Rhdd IATLsqqTYjKhONVSfrfTpWuQI5zuR7fwUDrrrNQ2wpcNvqRHm0Vg160fQQYnrp2sMl88 GONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=cjuqpAwgia92KL7WsVbGxdd1GI54nk8pK69dPvZ6q0s=; b=yKS+yZuw47WxPDf86WWV3unMR268X2wu4G2hixW8jleb76C5wkJd7xD3ueoC4aof/R 38Ghn+dUn0XnAboFaaP6mfDaNA0ukPm51ffA8gtus6wrpbIx9PDsT0br0FCFDCOJOCY6 kEr0xVkULtJSyZfbCEYQiHDWaCRv+QOSNS68b5/CvT3TDESVvnaQc95h6vS8BF9nyPrB INPv54qWcmAZy+3vzV5pAK+wbypDFLZ/Y/ls5oldExTtdU1NYX18nmMsmSDyJoXDuK1d jaCsMd0udsS80pX3HPr3hVBnC9wXoIHxBE0MFmeO1TXGF/MTLpTBiaTMGJoLHvjW9Lir dQvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gf2-20020a170906e20200b0073d71124609si7100178ejb.182.2022.09.29.08.01.48; Thu, 29 Sep 2022 08:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234737AbiI2OmJ (ORCPT + 99 others); Thu, 29 Sep 2022 10:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbiI2OmC (ORCPT ); Thu, 29 Sep 2022 10:42:02 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B0611332F3 for ; Thu, 29 Sep 2022 07:42:01 -0700 (PDT) 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 8912D1650; Thu, 29 Sep 2022 07:42:07 -0700 (PDT) Received: from e126311.manchester.arm.com (unknown [10.57.64.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE7D03F792; Thu, 29 Sep 2022 07:41:57 -0700 (PDT) Date: Thu, 29 Sep 2022 15:41:47 +0100 From: Kajetan Puchalski To: Peter Zijlstra Cc: Jian-Min Liu , Dietmar Eggemann , Ingo Molnar , Vincent Guittot , Morten Rasmussen , Vincent Donnefort , Quentin Perret , Patrick Bellasi , Abhijeet Dharmapurikar , Qais Yousef , linux-kernel@vger.kernel.org, Jonathan JMChen Subject: Re: [RFC PATCH 0/1] sched/pelt: Change PELT halflife at runtime Message-ID: References: <20220829055450.1703092-1-dietmar.eggemann@arm.com> <0f82011994be68502fd9833e499749866539c3df.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 29, 2022 at 01:21:45PM +0200, Peter Zijlstra wrote: > On Thu, Sep 29, 2022 at 12:10:17PM +0100, Kajetan Puchalski wrote: > > > Overall, the problem being solved here is that based on our testing the > > PELT half life can occasionally be too slow to keep up in scenarios > > where many frames need to be rendered quickly, especially on high-refresh > > rate phones and similar devices. > > But it is a problem of DVFS not ramping up quick enough; or of the > load-balancer not reacting to the increase in load, or what aspect > controlled by PELT is responsible for the improvement seen? Based on all the tests we've seen, jankbench or otherwise, the improvement can mainly be attributed to the faster ramp up of frequency caused by the shorter PELT window while using schedutil. Alongside that the signals rising faster also mean that the task would get migrated faster to bigger CPUs on big.LITTLE systems which improves things too but it's mostly the frequency aspect of it. To establish that this benchmark is sensitive to frequency I ran some tests using the 'performance' cpufreq governor. Max frame duration (ms) +------------------+-------------+----------+ | kernel | iteration | value | |------------------+-------------+----------| | pelt_1 | 10 | 157.426 | | pelt_4 | 10 | 85.2713 | | performance | 10 | 40.9308 | +------------------+-------------+----------+ Mean frame duration (ms) +---------------+------------------+---------+-------------+ | variable | kernel | value | perc_diff | |---------------+------------------+---------+-------------| | mean_duration | pelt_1 | 14.6 | 0.0% | | mean_duration | pelt_4 | 14.5 | -0.58% | | mean_duration | performance | 4.4 | -69.75% | +---------------+------------------+---------+-------------+ Jank percentage +------------+------------------+---------+-------------+ | variable | kernel | value | perc_diff | |------------+------------------+---------+-------------| | jank_perc | pelt_1 | 2.1 | 0.0% | | jank_perc | pelt_4 | 2 | -3.46% | | jank_perc | performance | 0.1 | -97.25% | +------------+------------------+---------+-------------+ As you can see, bumping up frequency can hugely improve the results here. This is what's happening when we decrease the PELT window, just on a much smaller and not as drastic scale. It also explains specifically where the increased power usage is coming from.