Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6843979rwb; Wed, 18 Jan 2023 10:02:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOpfBNWwx0xJh/nIwMDqonwWEJD1s1lmAYTfiMsabH5S90Rvap3tlNMaPTZJyIMDkv9sN7 X-Received: by 2002:a17:907:6746:b0:871:2051:637a with SMTP id qm6-20020a170907674600b008712051637amr8851149ejc.60.1674064974063; Wed, 18 Jan 2023 10:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674064974; cv=none; d=google.com; s=arc-20160816; b=WiHz1+t9J8wLoJ4CcnoGeGeoySM3DYBFyNFBE+yApWsn1i5hO0OcxFB9wh4vFvSy7Z DjNMkdHG66UGvOoH3ERdi/8m6vz3SvrUvA5zRB/QDNVS9j1CYDbAk7deU4FLrm9nlgV5 cn9hscNctIW8dT9nAjvqNwpPuV3OQV5/X3Kd6j+Wo2mjDEvsy8QbcpXeHJugzzRVjKoz 0+SoK8grzFN3jdLq0BP3+Gf2pS1AqflYmQUrV1QitjqOsdOGugzfwVaoECv5vqiHb2TY SGZrMbU3Q42BdBsrapAJebiclkYA5jPzLwN0ahFbdfOWYVxtJ2M5De4rZJi/nnPB/til b8OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=+cR29trn+nFpbVupqYjO0W+oJdo9Q6b0kQT9VEXZKck=; b=Bt8z+Vwga0khpkGrqm0p4qlOY1sZKuiiq++Qqmqr8oiOEPhhMRfWMArTTPWmmMlXf9 2chSfc1DBLiW8BfxKH2ihk67LYKuwhW8Xo3BYilHBTX+w4uxg94m62zSNQ+qxON7Rlog 0SOcgPLPti+CQyCOQiZheLjJNrWcXjpTf7omyZMVIomYm+1ZcEa5kQVamEVYx9L1ylzu 3Qaue0uj1Ote1nqO7zxjlDe6V8eaBKKZD4Ga3amBbgzgJF7mLR1UOpgQSWQ3zqhh62Xu rmfIfsaAz9Urdh1Ph5tHW5yszhWSwuoZKTgrXWIhYm+AubmII39Lsw8yytsNiufAX2HC w6Iw== 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 cr15-20020a170906d54f00b0084b895b6a23si15203980ejc.788.2023.01.18.10.02.43; Wed, 18 Jan 2023 10:02:54 -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 S229729AbjARRtA (ORCPT + 45 others); Wed, 18 Jan 2023 12:49:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230188AbjARRsx (ORCPT ); Wed, 18 Jan 2023 12:48:53 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DF3C5A801 for ; Wed, 18 Jan 2023 09:48:43 -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 94B1B2B; Wed, 18 Jan 2023 09:49:25 -0800 (PST) Received: from [10.1.196.21] (e125579.cambridge.arm.com [10.1.196.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9038F3F445; Wed, 18 Jan 2023 09:48:40 -0800 (PST) Message-ID: Date: Wed, 18 Jan 2023 17:48:32 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [RFC PATCH v4 1/2] sched/fair: Introduce short duration task check Content-Language: en-US To: Peter Zijlstra Cc: Chen Yu , Vincent Guittot , Tim Chen , Mel Gorman , Juri Lelli , Rik van Riel , Aaron Lu , Abel Wu , K Prateek Nayak , Yicong Yang , "Gautham R . Shenoy" , Ingo Molnar , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Valentin Schneider , Hillf Danton , Honglei Wang , Len Brown , Chen Yu , Tianchen Ding , Joel Fernandes , Josh Don , linux-kernel@vger.kernel.org References: <82689dd6-9db1-dd00-069b-73a637a21126@arm.com> From: Dietmar Eggemann In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 16/01/2023 10:33, Peter Zijlstra wrote: > On Thu, Jan 05, 2023 at 12:33:16PM +0100, Dietmar Eggemann wrote: >> On 16/12/2022 07:11, Chen Yu wrote: [...] > You were thinking of the dynamic PELT window size thread? (which is what > I had to think of when I looked at this). Yes, indeed. > I think we can still do that with this prev_sum_exec_runtime_vol (can't > say I love the name though). At any point (assuming we update > sum_exec_runtime) sum_exec_runtime - prev_sum_exec_runtime_vol is the > duration of the current activation. I ran Jankbench with your UTIL_EST_FASTER patch and: runtime = curr->se.sum_exec_runtime - curr->se.prev_sum_exec_runtime_vol plus: runtime >>= 10 before doing: util_est_fast = faster_est_approx(runtime * 2) ^^^ (boost) on a Pixel6 and the results look promising: Max frame duration (ms) +-------------------+-----------+------------+ | wa_path | iteration | value | +-------------------+-----------+------------+ | base | 10 | 147.571352 | | pelt-hl-m2 | 10 | 119.416351 | | pelt-hl-m4 | 10 | 96.473412 | | util_est_faster | 10 | 84.834999 | +-------------------+-----------+------------+ Mean frame duration (average case) +---------------+-------------------+-------+-----------+ | variable | kernel | value | perc_diff | +---------------+-------------------+-------+-----------+ | mean_duration | base | 14.7 | 0.0% | | mean_duration | pelt-hl-m2 | 13.6 | -7.5% | | mean_duration | pelt-hl-m4 | 13.0 | -11.68% | | mean_duration | util_est_faster | 12.6 | -14.01% | +---------------+-------------------+-------+-----------+ Jank percentage +-----------+-------------------+-------+-----------+ | variable | kernel | value | perc_diff | +-----------+-------------------+-------+-----------+ | jank_perc | base | 1.8 | 0.0% | | jank_perc | pelt-hl-m2 | 1.8 | -4.91% | | jank_perc | pelt-hl-m4 | 1.2 | -36.61% | | jank_perc | util_est_faster | 0.8 | -57.8% | +-----------+-------------------+-------+-----------+ Power usage [mW] +--------------+-------------------+-------+-----------+ | chan_name | kernel | value | perc_diff | +--------------+-------------------+-------+-----------+ | total_power | base | 144.4 | 0.0% | | total_power | pelt-hl-m2 | 141.6 | -1.97% | | total_power | pelt-hl-m4 | 163.2 | 12.99% | | total_power | util_est_faster | 150.9 | 4.45% | +--------------+-------------------+-------+-----------+ At first glance it looks promising! Have to do more testing to understand the behaviour fully.