Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp591493rwb; Thu, 1 Dec 2022 06:09:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ErMUdaB130WjwAGWlJEg7G20gfMOEt/zG/TVVcJBQlQV2qBe9z7qJUjKtojzxyKn6Amde X-Received: by 2002:a63:756:0:b0:478:57c6:bd61 with SMTP id 83-20020a630756000000b0047857c6bd61mr8824469pgh.539.1669903791849; Thu, 01 Dec 2022 06:09:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669903791; cv=none; d=google.com; s=arc-20160816; b=iPHAHbYUds04OXgBBNANPhzGpD4IW3km0e/8QH28IMyhOnUBbreUlXLOQFeJU4o8FJ g7+bplK8LFM+ECptsGXnCvHGtqcVqSKy63Z5Mv7BDBE9WBR6BE9p0bHgCST3h7xP1vMH xnjCOzDKt0DM4+1jTcnX33VDf9dQ84vFaOZS/CAy1AHzjIDUk2BYN+laL38lBufOBrxY Ini2+lIZGE8V0Lgyl1ivtXwVmIUPZjJ3CVQvwW0FyT/jC0umQhFV/hngyqqUxVOxprTu YZMIzWAaha3nyVmR4ZXmI8qMF3UwfPxRXwC1Mr/oL1BBjhMo/EwaVXdcx9S+H0cuZ8n0 VTuw== 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=TlIpJKUVnWC58dPzedC2JzBVo69CezN5mtmrfatDMvY=; b=foAS8m5YAmU5k3u38oE/YFWIUoW9KpnyFW21zJfAFz1Abz9/hcTtMR8j5x8oletL2G P0AefdseEZouYzuSfIHkvlN5BJjotVmiC9cna+EUVSCUDyiosuap22lawFEcjYS9TmSx 9tpSjMZ/WgSMLvfdOleeyhnnGlDLBx8utYNfeuitTEN052jlEFyIi1uy0SNTS5KvS5i1 SZHwED4D7EdtJKYqc8k/Jzt+/6I9fUBkxkKkpFXS/nnp4TD3mYf7TS9Yx5ku/ck+6Wgm PK80ePjSgM+yNT35z6uPNusgaFYXZRrNstmsMy+gjBXHErzs+owfC02sMywVJtcwAfXF gYoA== 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 t15-20020a170902e84f00b0018128753b25si4851389plg.271.2022.12.01.06.09.39; Thu, 01 Dec 2022 06:09:51 -0800 (PST) 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 S231320AbiLANiw (ORCPT + 82 others); Thu, 1 Dec 2022 08:38:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbiLANin (ORCPT ); Thu, 1 Dec 2022 08:38:43 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 54538AD98A for ; Thu, 1 Dec 2022 05:38:39 -0800 (PST) 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 D1F48D6E; Thu, 1 Dec 2022 05:38:45 -0800 (PST) Received: from e126311.manchester.arm.com (unknown [10.57.73.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7BB9D3F73D; Thu, 1 Dec 2022 05:38:36 -0800 (PST) Date: Thu, 1 Dec 2022 13:37:25 +0000 From: Kajetan Puchalski To: Dietmar Eggemann Cc: Peter Zijlstra , Jian-Min Liu , 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: <48c178fc-108f-382b-e054-83e88ef9b01b@arm.com> <2eb769e6-0749-0cd2-3c1c-44262b3a8110@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2eb769e6-0749-0cd2-3c1c-44262b3a8110@arm.com> 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 Wed, Nov 30, 2022 at 07:14:51PM +0100, Dietmar Eggemann wrote: > By `runtime of the activation` you refer to `curr->sum_exec_runtime - > time(a)` ? And the latter we don't have? > > And `runtime = curr->se.sum_exec_runtime - curr->se.prev_sum_exec_run` > is only covering the time since we got onto the cpu, right? > > With a missing `runtime >>= 10` (from __update_load_sum()) and using > `runtime = curr->se.sum_exec_runtime - curr->se.prev_sum_exec_runtime` > for a 1 task-workload (so no preemption) with factor 2 or 4 I get at > least close to the original rq->cfs.avg.util_avg and util_est.enqueued > signals (cells (5)-(8) in the notebook below). > https://nbviewer.org/github/deggeman/lisa/blob/ipynbs/ipynb/scratchpad/UTIL_EST_FASTER.ipynb?flush_cache=true > With those two changes as described above the comparative results are as follows: Max frame durations (worst case scenario) +--------------------------------+-----------+------------+ | kernel | iteration | value | +--------------------------------+-----------+------------+ | baseline_60hz | 10 | 149.935514 | | pelt_rampup_runtime_shift_60hz | 10 | 108.126862 | +--------------------------------+-----------+------------+ Power usage [mW] +--------------+--------------------------------+-------+-----------+ | chan_name | kernel | value | perc_diff | +--------------+--------------------------------+-------+-----------+ | total_power | baseline_60hz | 141.6 | 0.0% | | total_power | pelt_rampup_runtime_shift_60hz | 168.0 | 18.61% | +--------------+--------------------------------+-------+-----------+ Mean frame duration (average case) +---------------+--------------------------------+-------+-----------+ | variable | kernel | value | perc_diff | +---------------+--------------------------------+-------+-----------+ | mean_duration | baseline_60hz | 16.7 | 0.0% | | mean_duration | pelt_rampup_runtime_shift_60hz | 13.6 | -18.9% | +---------------+--------------------------------+-------+-----------+ Jank percentage +-----------+--------------------------------+-------+-----------+ | variable | kernel | value | perc_diff | +-----------+--------------------------------+-------+-----------+ | jank_perc | baseline_60hz | 4.0 | 0.0% | | jank_perc | pelt_rampup_runtime_shift_60hz | 1.5 | -64.04% | +-----------+--------------------------------+-------+-----------+ Meaning it's a middle ground of sorts - instead of a 90% increase in power usage it's 'just' 19%. At the same time though the fastest PELT multiplier (pelt_4) was getting better max frame durations (85ms vs 108ms) for about half the power increase (9.6% vs 18.6%).