From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Qais Yousef <qais.yousef@arm.com>,
Pavan Kondeti <pkondeti@codeaurora.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Luis Chamberlain <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
Quentin Perret <qperret@google.com>,
Valentin Schneider <valentin.schneider@arm.com>,
Patrick Bellasi <patrick.bellasi@matbug.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] sched/uclamp: Add a new sysctl to control RT default boost value
Date: Thu, 30 Apr 2020 20:21:31 +0200 [thread overview]
Message-ID: <d3916860-6ee8-4d17-55ea-be5cada1302a@arm.com> (raw)
In-Reply-To: <20200429123056.otyedhljlugyf5we@e107158-lin>
On 29/04/2020 14:30, Qais Yousef wrote:
> Hi Pavan
>
> On 04/29/20 17:02, Pavan Kondeti wrote:
>> Hi Qais,
>>
>> On Tue, Apr 28, 2020 at 05:41:33PM +0100, Qais Yousef wrote:
[...]
>>> @@ -907,8 +935,15 @@ uclamp_tg_restrict(struct task_struct *p, enum uclamp_id clamp_id)
>>> static inline struct uclamp_se
>>> uclamp_eff_get(struct task_struct *p, enum uclamp_id clamp_id)
>>> {
>>> - struct uclamp_se uc_req = uclamp_tg_restrict(p, clamp_id);
>>> - struct uclamp_se uc_max = uclamp_default[clamp_id];
>>> + struct uclamp_se uc_req, uc_max;
>>> +
>>> + /*
>>> + * Sync up any change to sysctl_sched_uclamp_util_min_rt_default value.
>>> + */
>>> + uclamp_sync_util_min_rt_default(p);
>>> +
>>> + uc_req = uclamp_tg_restrict(p, clamp_id);
>>> + uc_max = uclamp_default[clamp_id];
>>
>> We are calling uclamp_sync_util_min_rt_default() unnecessarily for
>> clamp_id == UCLAMP_MAX case. Would it be better to have a separate
>
> It was actually intentional to make sure we update the value ASAP. I didn't
> think it's a lot of overhead. I can further protect with a check to verify
> whether the value has changed if it seems heavy handed.
Users of uclamp_eff_value()->uclamp_eff_get() ((like
rt_task_fits_capacity())) always call both ids.
So calling uclamp_sync_util_min_rt_default() only for UCLAMP_MIN would
make sense. It's overhead in the fast path for rt tasks.
Since changes to sched_util_clamp_min_rt_default will be fairly rare,
you might even want to consider only doing the uclamp_se_set(...,
min_rt_default, ...) in case
uc_se->value != sysctl_sched_uclamp_util_min_rt_default
[...]
next prev parent reply other threads:[~2020-04-30 18:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 16:41 Qais Yousef
2020-04-28 16:41 ` [PATCH v3 2/2] Documentation/sysctl: Document uclamp sysctl knobs Qais Yousef
2020-04-28 17:43 ` Randy Dunlap
2020-04-29 9:54 ` Qais Yousef
[not found] ` <BL0PR14MB377949FBF2B798EEC425EE719AAA0@BL0PR14MB3779.namprd14.prod.outlook.com>
2020-04-30 10:03 ` Qais Yousef
2020-04-29 11:32 ` [PATCH v3 1/2] sched/uclamp: Add a new sysctl to control RT default boost value Pavan Kondeti
2020-04-29 12:30 ` Qais Yousef
2020-04-29 15:21 ` Pavan Kondeti
2020-04-29 15:40 ` Qais Yousef
2020-04-30 18:21 ` Dietmar Eggemann [this message]
2020-05-01 11:03 ` Qais Yousef
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=d3916860-6ee8-4d17-55ea-be5cada1302a@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=juri.lelli@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=qais.yousef@arm.com \
--cc=qperret@google.com \
--cc=rostedt@goodmis.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=yzaikin@google.com \
/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
all inboxes | Powered by JetHome®