Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D61C6C433DB for ; Fri, 22 Jan 2021 10:24:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 735952376F for ; Fri, 22 Jan 2021 10:24:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 735952376F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D51D6E9CD; Fri, 22 Jan 2021 10:24:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 72DA26E9A6 for ; Fri, 22 Jan 2021 10:24:21 +0000 (UTC) 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 C9D3D11D4; Fri, 22 Jan 2021 02:24:20 -0800 (PST) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 889CA3F719; Fri, 22 Jan 2021 02:24:19 -0800 (PST) Subject: Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds To: Lukasz Luba References: <20210121170445.19761-1-lukasz.luba@arm.com> <38c4dc94-0613-33f9-e4e4-e42d451aed9b@arm.com> From: Steven Price Message-ID: Date: Fri, 22 Jan 2021 10:24:13 +0000 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: <38c4dc94-0613-33f9-e4e4-e42d451aed9b@arm.com> Content-Language: en-GB X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tomeu.vizoso@collabora.com, airlied@linux.ie, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 22/01/2021 10:00, Lukasz Luba wrote: > > > On 1/22/21 8:21 AM, Steven Price wrote: >> On 21/01/2021 17:04, Lukasz Luba wrote: >>> The simple_ondemand devfreq governor uses two thresholds to decide about >>> the frequency change: upthreshold, downdifferential. These two tunable >>> change the behavior of the governor decision, e.g. how fast to increase >>> the frequency or how rapidly limit the frequency. This patch adds needed >>> governor data with thresholds values gathered experimentally in >>> different >>> workloads. >>> >>> Signed-off-by: Lukasz Luba >>> --- >>> Hi all, >>> >>> This patch aims to improve the panfrost performance in various >>> workloads, >>> (benchmarks, games). The simple_ondemand devfreq governor supports >>> tunables to tweak the behaviour of the internal algorithm. The default >>> values for these two thresholds (90 and 5) do not work well with >>> panfrost. >>> These new settings should provide good performance, short latency for >>> rising the frequency due to rapid workload change and decent freq slow >>> down when the load is decaying. Based on frequency change statistics, >>> gathered during experiments, all frequencies are used, depending on >>> the load. This provides some power savings (statistically). The highest >>> frequency is also used when needed. >>> >>> Example glmark2 results: >>> 1. freq fixed to max: 153 >>> 2. these new thresholds values (w/ patch): 151 >>> 3. default governor values (w/o patch): 114 >> >> It would be good to state which platform this is on as this obviously >> can vary depending on the OPPs available. > > Sorry about that. It was Rock Pi 4B and I have mesa 20.2.4. > >> >> Of course the real fix here would be to improve the utilisation of the >> GPU[1] so we actually hit the 90% threshold more easily (AFAICT kbase >> uses the default 90/5 thresholds), but this seems like a reasonable >> change for now. > > Agree, improving the scheduler would be the best option. I'll have a > look at that patch and why it got this 10% lower performance. Maybe > I would find something during testing. I'm afraid it'll probably need a fair bit of work to rebase - things have changed around that code. I'm hoping that most of the problem was really around how Mesa was driving the GPU at that time and things should be better. The DDK (hacked to talk Panfrost ioctls) saw a performance improvement. Let me know if you hit problems and need any help. >> >> Reviewed-by: Steven Price > > Thank you for the review. I guess this patch would go through drm tree? Yes, I'll push it to drm-misc-next later. Thanks, Steve > Regards, > Lukasz > >> >> Thanks, >> >> Steve >> >> [1] When I get some time I need to rework the "queue jobs on the >> hardware"[2] patch I posted ages ago. Last time it actually caused a >> performance regression though... >> >> [2] >> https://lore.kernel.org/r/20190816093107.30518-2-steven.price%40arm.com >> _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel