From: Patrick Bellasi <firstname.lastname@example.org>
To: Qais Yousef <email@example.com>
Cc: Peter Zijlstra <firstname.lastname@example.org>,
Ingo Molnar <email@example.com>, Jonathan Corbet <firstname.lastname@example.org>,
Juri Lelli <email@example.com>,
Vincent Guittot <firstname.lastname@example.org>,
Dietmar Eggemann <email@example.com>,
Steven Rostedt <firstname.lastname@example.org>,
Ben Segall <email@example.com>, Mel Gorman <firstname.lastname@example.org>,
Luis Chamberlain <email@example.com>,
Kees Cook <firstname.lastname@example.org>,
Iurii Zaikin <email@example.com>,
Quentin Perret <firstname.lastname@example.org>,
Valentin Schneider <email@example.com>,
Pavan Kondeti <firstname.lastname@example.org>,
Randy Dunlap <email@example.com>,
Subject: Re: [PATCH v4 2/2] Documentation/sysctl: Document uclamp sysctl knobs
Date: Mon, 11 May 2020 15:00:04 +0200 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
On Tue, May 05, 2020 at 16:56:37 +0200, Qais Yousef <email@example.com> wrote...
>> > +sched_util_clamp_min_rt_default:
>> > +================================
>> > +
>> > +By default Linux is tuned for performance. Which means that RT tasks always run
>> > +at the highest frequency and most capable (highest capacity) CPU (in
>> > +heterogeneous systems).
>> > +
>> > +Uclamp achieves this by setting the requested uclamp.min of all RT tasks to
>> > +SCHED_CAPACITY_SCALE (1024) by default, which effectively boosts the tasks to
>> > +run at the highest frequency and biases them to run on the biggest CPU.
>> > +
>> > +This knob allows admins to change the default behavior when uclamp is being
>> > +used. In battery powered devices particularly, running at the maximum
>> > +capacity and frequency will increase energy consumption and shorten the battery
>> > +life.
>> > +
>> > +This knob is only effective for RT tasks which the user hasn't modified their
>> > +requested uclamp.min value via sched_setattr() syscall.
>> > +
>> > +This knob will not escape the constraint imposed by sched_util_clamp_min
>> > +defined above.
>> Perhaps it's worth to specify that this value is going to be clamped by
>> the values above? Otherwise it's a bit ambiguous to know what happen
>> when it's bigger than schedu_util_clamp_min.
> Hmm for me that sentence says exactly what you're asking for.
> So what you want is
> s/will not escape the constraint imposed by/will be clamped by/
> I'm not sure if this will help if the above is already ambiguous. Maybe if
> I explicitly say
> ..will not escape the *range* constrained imposed by..
> sched_util_clamp_min is already defined as a range constraint, so hopefully it
> should hit the mark better now?
Right, that also can work.
>> > +Any modification is applied lazily on the next opportunity the scheduler needs
>> > +to calculate the effective value of uclamp.min of the task.
>> This is also an implementation detail, I would remove it.
> The idea is that this value is not updated 'immediately'/synchronously. So
> currently RUNNING tasks will not see the effect, which could generate confusion
> when users trip over it. IMO giving an idea of how it's updated will help with
> expectation of the users. I doubt any will care, but I think it's an important
> behavior element that is worth conveying and documenting. I'd be happy to
> reword it if necessary.
Right, I agree on giving an hint on the lazy update. What I was pointing
out was mainly the reference to the 'effective' value. Maybe we can just
drop that word.
> I have this now
> 984 This knob will not escape the range constraint imposed by sched_util_clamp_min
> 985 defined above.
> 987 For example if
> 989 sched_util_clamp_min_rt_default = 800
> 990 sched_util_clamp_min = 600
> 992 Then the boost will be clamped to 600 because 800 is outside of the permissible
> 993 range of [0:600]. This could happen for instance if a powersave mode will
> 994 restrict all boosts temporarily by modifying sched_util_clamp_min. As soon as
> 995 this restriction is lifted, the requested sched_util_clamp_min_rt_default
> 996 will take effect.
> 998 Any modification is applied lazily to currently running tasks and should be
> 999 visible by the next wakeup.
That's better IMHO, would just slightly change the last sentence to:
Any modification is applied lazily to tasks and is effective
starting from their next wakeup.
next prev parent reply other threads:[~2020-05-11 13:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 11:49 [PATCH v4 1/2] sched/uclamp: Add a new sysctl to control RT default boost value Qais Yousef
2020-05-01 11:49 ` [PATCH v4 2/2] Documentation/sysctl: Document uclamp sysctl knobs Qais Yousef
2020-05-03 17:45 ` Patrick Bellasi
2020-05-05 14:56 ` Qais Yousef
2020-05-11 13:00 ` Patrick Bellasi [this message]
2020-05-11 15:28 ` Qais Yousef
2020-05-03 17:37 ` [PATCH v4 1/2] sched/uclamp: Add a new sysctl to control RT default boost value Patrick Bellasi
2020-05-05 14:27 ` Qais Yousef
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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;
as well as URLs for NNTP newsgroup(s).