From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org
Subject: Re: [PATCH v2 0/6] sched: expel confusing usage of the term "power"
Date: Tue, 27 May 2014 18:14:38 +0200 [thread overview]
Message-ID: <5384B9EE.10203@linaro.org> (raw)
In-Reply-To: <alpine.LFD.2.11.1405271140050.17310@knanqh.ubzr>
On 05/27/2014 06:02 PM, Nicolas Pitre wrote:
> On Tue, 27 May 2014, Daniel Lezcano wrote:
>
>> On 05/27/2014 12:19 AM, Nicolas Pitre wrote:
>>> "Power" is a very bad term in the scheduler context. There are so many
>>> meanings that can be attached to it. And with the upcoming "power
>>> aware" scheduler work, confusion is sure to happen.
>>>
>>> The definition of "power" is typically the rate at which work is performed,
>>> energy is converted or electric energy is transferred. The notion of
>>> "compute capacity" is rather at odds with "power" to the point many
>>> comments in the code have to make it explicit that "capacity" is the
>>> actual intended meaning.
>>>
>>> So let's make it clear what we man by using "capacity" in place of "power"
>>> directly in the code. That will make the introduction of actual "power
>>> consumption" concepts much clearer later on.
>>>
>>> This is based on the latest tip tree to apply correctly on top of existing
>>> scheduler changes already queued there.
>>>
>>> Changes from v1:
>>>
>>> - capa_factor and SCHED_CAPA_* changed to be spelled "capacity" in full
>>> to save peterz some Chupacabra nightmares
>>>
>>> - some minor corrections in commit logs
>>>
>>> - rebased on latest tip tree
>>>
>>>
>>> arch/arm/kernel/topology.c | 54 +++----
>>> include/linux/sched.h | 8 +-
>>> kernel/sched/core.c | 87 ++++++-----
>>> kernel/sched/fair.c | 323 ++++++++++++++++++++-------------------
>>> kernel/sched/sched.h | 18 +--
>>> 5 files changed, 246 insertions(+), 244 deletions(-)
>>
>> Hi Nico,
>>
>> it is a good initiative to replace the 'power' word by another to prevent
>> confusion for future code. Personally I have a preference to 'strength'
>> instead of 'capacity', in case that matter.
>
> Proper usage does matter:
>
> Strength could mean many things. Among them:
>
> Physical ability
>
> * Physical strength, as in people or animals
>
> As an abstract or psychological trait
>
> * Virtue and moral uprightness
> * Courage or fortitude in the face of moral or social pressure
> * Persuasiveness of an argument
> * The exercise of willpower
>
> Physics
>
> * Strength of materials, ability to withstand an applied stress
> without failure
> + Compressive strength, capacity to withstand axially directed
> pushing forces
> + Tensile strength, maximum stress while being stretched or
> pulled before necking
> + Shear strength, the ability to withstand shearing
> * Strength (explosive), the ability of an explosive to move
> surrounding material
> * Field strength, the magnitude of a field's vector
> * Signal strength, the magnitude of an electric field at a
> reference point
>
> I have difficulty referring to "CPU strength" without still be confused
> about what exactly this would mean. None of the above definitions would
> provide a sufficiently close analogy to be applied without ambiguity.
Ok, fair enough.
> On the other hand, the definition for capacity is much narrower:
>
> 1.
> a. The ability to receive, hold, or absorb.
> b. Abbr. c. A measure of this ability; volume.
>
> 2. The maximum amount that can be contained: a trunk filled to capacity.
>
> 3.
> a. Ability to perform or produce; capability.
> b. The maximum or optimum amount that can be produced: factories
> operating below capacity.
>
> Etc.
>
> Here the analogy with "CPU capacity" or "compute capacity" is clear and
> natural for what we are applying this term to.
>
>
> Nicolas
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2014-05-27 16:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 22:19 Nicolas Pitre
2014-05-26 22:19 ` [PATCH v2 1/6] sched/fair.c: remove "power" from struct numa_stats Nicolas Pitre
2014-05-27 3:07 ` Mike Galbraith
2014-05-27 3:18 ` Nicolas Pitre
2014-05-27 4:32 ` Mike Galbraith
2014-05-26 22:19 ` [PATCH v2 2/6] sched/fair.c: change "has_capacity" to "has_free_capacity" Nicolas Pitre
2014-05-26 22:19 ` [PATCH v2 3/6] sched/fair.c: disambiguate existing/remaining "capacity" usage Nicolas Pitre
2014-05-26 22:19 ` [PATCH v2 4/6] sched: let struct sched_group_power care about CPU capacity Nicolas Pitre
2014-05-26 22:19 ` [PATCH v2 5/6] sched: remove remaining dubious usage of "power" Nicolas Pitre
2014-05-26 22:19 ` [PATCH v2 6/6] sched: final power vs capacity cleanup Nicolas Pitre
2014-05-27 7:30 ` [PATCH v2 0/6] sched: expel confusing usage of the term "power" Vincent Guittot
2014-05-27 14:46 ` Nicolas Pitre
2014-05-27 14:07 ` Daniel Lezcano
2014-05-27 16:02 ` Nicolas Pitre
2014-05-27 16:14 ` Daniel Lezcano [this message]
2014-05-27 17:50 ` [PATCH v2 7/6] sched: rename capacity related flags Nicolas Pitre
2014-05-28 6:46 ` [PATCH v2 0/6] sched: expel confusing usage of the term "power" Peter Zijlstra
2014-06-05 10:09 ` Ingo Molnar
2014-06-05 10:16 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5384B9EE.10203@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome