From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C791DC4332F for ; Mon, 19 Dec 2022 09:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v7gQEvw0FkhbjfBEMpfD8dQ2gN4pfkGsEfLTqbwPzSk=; b=tpwdKu2gMjCVLq flocxdOVNoYDDLUJWQPedcKjWYUoiE1XvccRERkQzYsj2F83Msb2P3djLyAQHE/5bgSu50xATkdDM Vz0lSKkFtm1VF1ArWLNIdtiDV8sEBKkoVoEtAArWkdXXauusPbADKy/gF62K1IjP106W8atmpToaA X3N6haw+6254SIToc4h5Qg+CpFhKfGz15NSuZgbYr5hVzoAMvvjcXxwZdH4y6SVtrYYDYbRnZ6SvG UJvMxSmwkscWlSD8UHsfxy/GhJPoNo/aHAEm2S5Vw3g2nwbAYfZyVDR7xE1r5mkUywAI8qdeZCaUE XxkRkoCfsFlM/P5edGuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7CBD-00B3Y2-No; Mon, 19 Dec 2022 09:11:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7C9Z-00B2LA-Ce for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 09:09:49 +0000 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 DA40CFEC; Mon, 19 Dec 2022 01:10:20 -0800 (PST) Received: from [10.57.10.192] (unknown [10.57.10.192]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08F983F703; Mon, 19 Dec 2022 01:09:36 -0800 (PST) Message-ID: <7f755efd-baad-b5c5-0707-e4adde2d3671@arm.com> Date: Mon, 19 Dec 2022 09:09:35 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v3] Documentation: sched: Document util clamp feature Content-Language: en-US To: Qais Yousef , Bagas Sanjaya Cc: Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Linux ARM , Xuewen Yan , Wei Wang , Jonathan JMChen , Hank , Paul Bone , Russell King , Linus Walleij , Catalin Marinas References: <20221216235716.201923-1-qyousef@layalina.io> <20221217220133.p5wh7drpvkmkups2@airbuntu> From: Lukasz Luba In-Reply-To: <20221217220133.p5wh7drpvkmkups2@airbuntu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_010946_137891_A150C0C0 X-CRM114-Status: GOOD ( 24.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/17/22 22:01, Qais Yousef wrote: > On 12/17/22 16:53, Bagas Sanjaya wrote: >> On Fri, Dec 16, 2022 at 11:57:16PM +0000, Qais Yousef wrote: >>> +Another example is in Android where tasks are classified as background, >>> +foreground, top-app, etc. Util clamp can be used to constrain how much >>> +resources background tasks are consuming by capping the performance point they >>> +can run at. This constraint helps reserve resources for important tasks, like >>> +the ones belonging to the currently active app (top-app group). Beside this >>> +helps in limiting how much power they consume. This can be more obvious in >>> +heterogeneous systems (e.g. Arm big.LITTLE); the constraint will help bias the >>> +background tasks to stay on the little cores which will ensure that: >>> + >>> + 1. The big cores are free to run top-app tasks immediately. top-app >>> + tasks are the tasks the user is currently interacting with, hence >>> + the most important tasks in the system. >>> + 2. They don't run on a power hungry core and drain battery even if they >>> + are CPU intensive tasks. >>> + >>> +.. note:: >>> + **little cores**: >>> + CPUs with capacity < 1024 >>> + >>> + **big cores**: >>> + CPUs with capacity = 1024 >> >> Processing capacity (CPU frequency) in MHz? This is the first time I > > This is a scheduler abstraction value from 0-1024. Biggest CPU always has > a capacity of 1024. On SMP all cpus appear as 1024 CPUs. > >> hear Arm big.LITTLE architecture. CC'ing several Arm folks and >> linux-arm-kernel list for I'm unsure on this. > > This has my Arm SoB :-) > > This was added based on Lukasz comments. Both Lukasz and Dietmar were my > colleagues at Arm and are on CC. Arm big.LITTLE is probably the most popular heterogeneous system in the world (hundreds of millions of phones run that) :) Bagas you definitely has to catch up ;) [1] [2] > > I don't think it was necessary to expand the recipients list. But probably more > is better though all the scheduler people are covered. This has nothing to do > with Arm but it's the prime example of heterogeneous systems. > >> >>> + >>> +By making these uclamp performance requests, or rather hints, user space can >>> +ensure system resources are used optimally to deliver the best possible user >>> +experience. >>> + >>> +Another use case is to help with **overcoming the ramp up latency inherit in >>> +how scheduler utilization signal is calculated**. >> >> IMO the bold text isn't needed (why did you highlight the phrase above)? >> >>> +When task @p is running, **the scheduler should try its best to ensure it >>> +starts at 40% performance level**. If the task runs for a long enough time so >>> +that its actual utilization goes above 80%, the utilization, or performance >>> +level, will be capped. >> >> Same here. >> >>> +**Generally it is advised to perceive the input as performance level or point >>> +which will imply both task placement and frequency selection**. >> >> Same here too. > > All of these were added based on Lukasz review comments. He thought they're > important pieces and should be highlighted, I opted to do that by making them > bold text. Looks OK to me. This documentation will be read by application developers. They used to read different type of documentations. We want to help them to better understand the issues and possible solution's mechanisms. That's why IMO bold text is OK in this case. > > > Thanks! > > -- > Qais Yousef [1] https://developer.arm.com/documentation/den0024/a/big-LITTLE-Technology [2] https://developer.arm.com/documentation/den0024/a/Multi-core-processors/Multi-processing-systems/Heterogeneous-multi-processing _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel