Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp711343rwj; Sat, 17 Dec 2022 16:21:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXtqT61w5xeiDE79F9APnh7rGFraOzdt+P5CIqLZpRaGFP0WJbmdTITYjU/NaPeZYE/l9X2X X-Received: by 2002:a17:907:c30e:b0:801:98a4:5725 with SMTP id tl14-20020a170907c30e00b0080198a45725mr3461474ejc.30.1671322914781; Sat, 17 Dec 2022 16:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671322914; cv=none; d=google.com; s=arc-20160816; b=nROPmLh1rvkoH8gzDmKt+BsklrRSdWiC4IfWHQtYDMVGtZtsdcf5lQ2GVcLfRM1oGp iPmvuHiB/fljkFGyvs/HPfSWAvpRUvnEb1yNjNtlfNOkLCHPGfLgIuMKM+HmU7tRDjgM GqNQAOqjPDaW0M/dQalWlblnwFMdWkYKj+pG13mJf+MnUsToTxD7o7Osxu+jh5ltc/lB ucRadIwqd7kvqCbeldOemU+8DWUT5GL6hWS7aMo52JajdLytKtG2UbFkcgrIfqMSrCsN FMhQjUqrsjqGauF2II3BYOX3Nh5BeXQq0vZdHSOKh7K10+OoxHpAsE5GoGprPnc7Jpi9 emyg== 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:dkim-signature; bh=hOSkvzS5rw9RqReI9DDRUaJAR+FURiQ8Kin2htoeGpw=; b=m5rOpmPA55VoHWGe/QR2jl8Kf2+P1auzgSaV32662jomFdIP1SOeQPusSUrlJhxOiE Ud8BhpLmwDwkfOGXqR7g7mKKOfOZoW7kSMLEWzNEN09/LKGWiLHuBoyv7Uok1VOkPpoe lIWnDyuRss8vJjdcWcnEHJPbViGrF8CzqBFnkp5TSxtPrJNjPDVoj4FpHvbAnLg+2ImX kwuu24zVYAUDoaSxydVEkN+LRGbtitfaAkRhye98t8GaD8SqsMQ4S9eXdLRINFQvDlrS vma8KLhQkpV0oNOGva4MFYUGSdI61FzQRlC5+0mxbYSfcbCUpl4EDvzJV3G/T5jXajEN YYHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20210112.gappssmtp.com header.s=20210112 header.b=NNR2VsX7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb37-20020a1709077ea500b007c14eabf6adsi6248467ejc.116.2022.12.17.16.21.37; Sat, 17 Dec 2022 16:21: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; dkim=pass header.i=@layalina-io.20210112.gappssmtp.com header.s=20210112 header.b=NNR2VsX7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbiLQWBv (ORCPT + 69 others); Sat, 17 Dec 2022 17:01:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230133AbiLQWBo (ORCPT ); Sat, 17 Dec 2022 17:01:44 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D51D712773 for ; Sat, 17 Dec 2022 14:01:36 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so6409435wmb.2 for ; Sat, 17 Dec 2022 14:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hOSkvzS5rw9RqReI9DDRUaJAR+FURiQ8Kin2htoeGpw=; b=NNR2VsX7aR4bcPxEa4k1u9Clg3hy+/LnwwxOFJ2Z4F6ZO9LNftOkW9gHnWEfHhVilB NIng3eJ5DCU7l9c5VkOdEguqWz60y2g6S2kEqLTVje4M2uTR6aDaepL973vTvpsMPEsQ 7TpRM9T2HD71mIqkruO1vmfE2JMAJ1fNve6nJ8kYZuxhlWexEuuxRksJquPNLn2e2SrW VGaquzXROZiNfKnBn9qnwR9tPIe7BPkuq4/mFgw9GBICO1PznyVrJPUG0swlGfhODZUD zp8iB41Nvv8LMLJtbLJj3iHNupJD+MlgWKObZQjGf8a054QB5EZrP6Y8Sk2BPM6C3NO6 5iPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hOSkvzS5rw9RqReI9DDRUaJAR+FURiQ8Kin2htoeGpw=; b=2eRBgyLbT6IP8lqj2j/QZjsM4cpm14hX+YPF2BxJCieTGJwEBp6p5jgK//AnMsaqSJ 8aEW7rI7d+yvOvU1IkeImew/zxZNO/9jfyp+KA/bCIpL7iXxmVkphz6J6ACwvcHV8T4X fh2m/8KveXH4Qc/8zENbL2h2qkjhgiZKq36QgGOde/Ldruxd6nL1J2l3TRE86n1w1r6W VSPn9iltmzxGpUwtiGqrjSb8jakhsYsgfbQIgV7bneiuQwHwEIIDjaU91CDawj9nRFoX OQrnOE0qvdVNYzUxfffw3xplkI77hRYp82AAQq/KIjtuHXh9mC4QVDpPOlQX42mypjH5 f6nw== X-Gm-Message-State: ANoB5pldDX8myHP/o0rdZGIfEDUnyU49As43w53/SfCaEDuRqvpCXJVT Hb8A7VndQ8WSTA/8uVazi9Grvg== X-Received: by 2002:a05:600c:a0f:b0:3d0:8a0e:3910 with SMTP id z15-20020a05600c0a0f00b003d08a0e3910mr28797701wmp.34.1671314495353; Sat, 17 Dec 2022 14:01:35 -0800 (PST) Received: from airbuntu (host86-130-134-87.range86-130.btcentralplus.com. [86.130.134.87]) by smtp.gmail.com with ESMTPSA id q9-20020a7bce89000000b003d1e34bcbb2sm6826036wmj.13.2022.12.17.14.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 14:01:34 -0800 (PST) Date: Sat, 17 Dec 2022 22:01:33 +0000 From: Qais Yousef To: 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 , Lukasz Luba , Xuewen Yan , Wei Wang , Jonathan JMChen , Hank , Paul Bone , Russell King , Linus Walleij , Catalin Marinas Subject: Re: [PATCH v3] Documentation: sched: Document util clamp feature Message-ID: <20221217220133.p5wh7drpvkmkups2@airbuntu> References: <20221216235716.201923-1-qyousef@layalina.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 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. 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. Thanks! -- Qais Yousef