Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3] Documentation: sched: Document util clamp feature
       [not found] <20221216235716.201923-1-qyousef@layalina.io>
@ 2022-12-17  9:53 ` Bagas Sanjaya
  2022-12-17 22:01   ` Qais Yousef
  0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2022-12-17  9:53 UTC (permalink / raw)
  To: Qais Yousef, Ingo Molnar, Peter Zijlstra, Vincent Guittot,
	Dietmar Eggemann, Jonathan Corbet
  Cc: linux-doc, linux-kernel, Linux ARM, Lukasz Luba, Xuewen Yan,
	Wei Wang, Jonathan JMChen, Hank, Paul Bone, Russell King,
	Linus Walleij, Catalin Marinas


[-- Attachment #1.1: Type: text/plain, Size: 2285 bytes --]

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
hear Arm big.LITTLE architecture. CC'ing several Arm folks and
linux-arm-kernel list for I'm unsure on this.

> +
> +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.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] Documentation: sched: Document util clamp feature
  2022-12-17  9:53 ` [PATCH v3] Documentation: sched: Document util clamp feature Bagas Sanjaya
@ 2022-12-17 22:01   ` Qais Yousef
  2022-12-19  9:09     ` Lukasz Luba
  0 siblings, 1 reply; 3+ messages in thread
From: Qais Yousef @ 2022-12-17 22:01 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Jonathan Corbet, linux-doc, linux-kernel, Linux ARM, Lukasz Luba,
	Xuewen Yan, Wei Wang, Jonathan JMChen, Hank, Paul Bone,
	Russell King, Linus Walleij, Catalin Marinas

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] Documentation: sched: Document util clamp feature
  2022-12-17 22:01   ` Qais Yousef
@ 2022-12-19  9:09     ` Lukasz Luba
  0 siblings, 0 replies; 3+ messages in thread
From: Lukasz Luba @ 2022-12-19  9:09 UTC (permalink / raw)
  To: Qais Yousef, Bagas Sanjaya
  Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Jonathan Corbet, linux-doc, linux-kernel, Linux ARM, Xuewen Yan,
	Wei Wang, Jonathan JMChen, Hank, Paul Bone, Russell King,
	Linus Walleij, Catalin Marinas



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-19  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20221216235716.201923-1-qyousef@layalina.io>
2022-12-17  9:53 ` [PATCH v3] Documentation: sched: Document util clamp feature Bagas Sanjaya
2022-12-17 22:01   ` Qais Yousef
2022-12-19  9:09     ` Lukasz Luba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox