Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp352814pxa; Wed, 5 Aug 2020 02:56:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxji39OCYNOgqPGH/9Wxj1/1WmoYd9oL/61c8vuRQTBsj9A2yfJQ/qiqvDoh1kzLjR5C+Cw X-Received: by 2002:a17:906:c7d4:: with SMTP id dc20mr2490357ejb.283.1596621367692; Wed, 05 Aug 2020 02:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596621367; cv=none; d=google.com; s=arc-20160816; b=YZW3HQ4Wb74WtEIndi1RmLrqdAcmcTfJZs2qvfdaRRp220WV3aiTtyuo5d8tMgz4Rn 3hpUySnn8es0wFFTTWKxBIcm67uVjC74STFO0lnRcISeN2+sliCtguo7w0+RHA6TLH4W eedLC9+4sRhMaqVjRateG+0zt74j4BSMZqMXZBfhh9yH8mRJNoIQMGy84FjQzS7/xgN6 /jXBqyfde0llfL2DiQc9OaXOVbeYDK3WnADyRLxkPHa4BQueXEtaWX9clPRGVELwsXfg 9Q+BNtMI6Iw6zDpRdpIBrtQxiYZlEjVUoqjE01JjLxXzIYVr2/FkottwBRJ0O24IOd82 V8ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8zbjBTlTEIOjYZ0A0UHnxKS48vAj55zfStJ6MbeTqf4=; b=hD1ccx3zCWYYP3yjt021VibyLoFMBIWECs3XC+l68tNjN0oruHhkDPIiUcLw5qAF2W 740JOP4CKybp69XSz2979nksvqT6Emm1G29IIHPi7ehnMb7b0mjNT+SLjwbn2SNldYdT FWVYh2Ue3ZZUjXJ6usqSiQk6vVo+5BzJnVxxw17/X4/9dQ65GQIOE+zSGVsihuMCvlSz 8QVcNxVnVkfxK6MK9KmesAnC4tQNlZqMR2VTculGyqoUFUat6J7ovDY2Px8xUAKKIH7t OFY9nE4Dnx4zI2wWCEMqyUsNHYGcSXaTYqf8IyoiLLKtd/xAXPzaOmb/fmCHPuZ+FNI8 dCEw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gq12si987010ejb.428.2020.08.05.02.55.42; Wed, 05 Aug 2020 02:56:07 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728355AbgHEJzP (ORCPT + 99 others); Wed, 5 Aug 2020 05:55:15 -0400 Received: from foss.arm.com ([217.140.110.172]:56942 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgHEJxu (ORCPT ); Wed, 5 Aug 2020 05:53:50 -0400 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 3109AD6E; Wed, 5 Aug 2020 02:53:46 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EF4B23F93E; Wed, 5 Aug 2020 02:53:43 -0700 (PDT) Date: Wed, 5 Aug 2020 10:53:41 +0100 From: Qais Yousef To: Dongdong Yang Cc: Greg KH , "rjw@rjwysocki.net" , Viresh Kumar , "mingo@redhat.com" , "peterz@infradead.org" , "juri.lelli@redhat.com" , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Benjamin Segall , "mgorman@suse.de" , "linux-kernel@vger.kernel.org" , "devel@driverdev.osuosl.org" , "linux-pm@vger.kernel.org" , "yangdongdong@xiaomi.com" , "yanziily@xiaomi.com" , "rocking@linux.alibaba.com" Subject: Re: [PATCH v4] sched: Provide USF for the portable equipment. Message-ID: <20200805095341.cmoxmy47ts3ntxee@e107158-lin.cambridge.arm.com> References: <820a185b6765d6246ac34f612faedeb35189487c.1596526941.git.yangdongdong@xiaomi.com> <20200804104331.6vphb2iclwz3buig@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/05/20 03:33, Dongdong Yang wrote: > Appreciate Qais for your above comments. I believe the clamp is very good for > terminal devices per pid or cgroup setting. I really hope it works for the > extended scenario, "screen off", although it has a potential side effect on > "screen on" response because it needs to be recovered at high level with > latency. I set "512" to sched_util_clamp_min and max on screen off for our > developing device with android kernel5.4. However, it still could not > replace sched_usf_non_ux_r from the test result as attachment. The cpufreq > could not go down in time. > Screenshot at 2020-08-05 09:56:38.png Please fix your email client so that it doesn't send in HTML. LKML will reject HTML emails. I can't interpret the numbers in the pictures. Can you help explain what am I looking at? I did see an issue with frequency not capped immediately when the system was busy. I am still trying to debug that. I already fixed one problem related to iowait boost not honouring uclamp requests, I will be posting a patch for this soon. If you have IO heavy workload, then iowait boost will cause schedutil to run at high frequency, and uclamp capping is not applied in that path. Can you trace what happens inside uclamp_rq_util_with() when it's called from sched_cpu_util()? The clamp should be applied quickly, so it's a bug we need to fix. In my case I noticed if I ctrl+Z then `fg`, the cap is applied. My hands are full to look at this soon. So if you can trace it, that'd be great. Can you expand more on your worry for "screen on"? The only latency I see is userspace not being able to set uclamp values quickly. But since it seems you already can set sched_usf_non_ux_r from userspace with acceptable results, then uclamp should be able to cover the same functionality. What am I missing? Thanks -- Qais Yousef