Thread (84 messages) flat view 84 messages, 6 authors, 2019-03-19

Re: [PATCH v7 01/15] sched/core: uclamp: Add CPU's clamp buckets refcounting

From: Suren Baghdasaryan <surenb@google.com>
Date: 2019-03-14 16:39:25
Also in: linux-pm, lkml

On Thu, Mar 14, 2019 at 8:41 AM Patrick Bellasi [off-list ref] wrote:
On 14-Mar 08:29, Suren Baghdasaryan wrote:
quoted
On Thu, Mar 14, 2019 at 7:46 AM Patrick Bellasi [off-list ref] wrote:
quoted
On 13-Mar 14:32, Suren Baghdasaryan wrote:
quoted
On Fri, Feb 8, 2019 at 2:06 AM Patrick Bellasi [off-list ref] wrote:
[...]
quoted
quoted
quoted
quoted
The rq::uclamp::bucket[clamp_id][] array is scanned every time we need
to find a new MAX aggregated clamp value for a clamp_id. This operation
is required only when we dequeue the last task of a clamp bucket
tracking the current MAX aggregated clamp value. In these cases, the CPU
is either entering IDLE or going to schedule a less boosted or more
clamped task.
The following:
quoted
quoted
quoted
quoted
The expected number of different clamp values, configured at build time,
is small enough to fit the full unordered array into a single cache
line.
will read:

The expected number of different clamp values, configured at build time,
is small enough to fit the full unordered array into a single cache
line for the default UCLAMP_BUCKETS configuration of 7 buckets.
I think keeping default to be 5 is good. As you mentioned it's a nice
round number and keeping it at the minimum also hints that this is not
a free resource and the more buckets you use the more you pay.
Documentation might say "to fit the full unordered array into a single
cache line for configurations of up to 7 buckets".
[...]
quoted
Got it. From reading the documentation at the beginning my impression
was that whatever value I choose within allowed 5-20 range it would
still fit in a cache line. To disambiguate it might be worse
mentioning that this is true for the default value or for values up to
7. Thanks!
Right, I hope the above proposed change helps to clarify that.

--
#include <best/regards.h>

Patrick Bellasi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help