From: Yun Hsiang <hsiang023167@gmail.com>
To: Qais Yousef <qais.yousef@arm.com>
Cc: Patrick Bellasi <patrick.bellasi@matbug.net>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] sched/uclamp: release per-task uclamp control if user set to default value
Date: Wed, 7 Oct 2020 23:00:13 +0800 [thread overview]
Message-ID: <20201007150013.GA219885@ubuntu> (raw)
In-Reply-To: <20201005171500.eztpptd76fotkwa6@e107158-lin.cambridge.arm.com>
On Mon, Oct 05, 2020 at 06:15:00PM +0100, Qais Yousef wrote:
> On 10/05/20 18:58, Patrick Bellasi wrote:
>
> [...]
>
> > >> it can not go back to the initial state to let the module(group) control.
> > >
> > > In case A changes its values e.g. from 3a to 3b it will go back to be
> > > controlled by /TG again (like it was when it had no user defined
> > > values).
> >
> > True, however it's also true that strictly speaking once a task has
> > defined a per-task value, we will always aggregate/clamp that value wrt
> > to TG and SystemWide value.
> >
> > >> But the other tasks in the group will be affected by the group.
> >
> > This is not clear to me.
> >
> > All tasks in a group will be treated independently. All the tasks are
> > subject to the same _individual_ aggregation/clamping policy.
>
> I think the confusing bit is this check in uclamp_tg_restrict()
>
> 1085 uc_max = task_group(p)->uclamp[clamp_id];
> 1086 if (uc_req.value > uc_max.value || !uc_req.user_defined)
> 1087 return uc_max;
>
> If a task is !user_defined then it'll *inherit* the TG value. So you can end
> up with 2 different behaviors based on that flag. I.e: if 2 tasks have their
> util_min=0, but one is user_defined while the other isn't, the effective
> uclamp value will look different for the 2 tasks.
>
> IIUC, Yun wants to be able to reset this user_defined flag to re-enable this
> inheritance behavior for a task. Which I agree with you, seems a sensible thing
> to allow (via new sched_setattr() flag of course).
>
Yes, this is what I want. As Dietmar and Pavan said, use 0 and 1024 to
reset user_defined is problematic. I'll send a V2 patch that use
SCHED_FLAG_UTIL_CLAMP_RESET to reset the user_defined bit.
Thank for the suggestion!
>
> Thanks
>
> --
> Qais Yousef
>
Thanks,
Yun
next prev parent reply other threads:[~2020-10-07 15:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 8:26 [PATCH 1/1] sched/uclamp: release per-task uclamp control if user set to default value Yun Hsiang
2020-09-30 13:12 ` Dietmar Eggemann
2020-10-02 5:38 ` Yun Hsiang
2020-10-05 12:38 ` Dietmar Eggemann
2020-10-05 16:58 ` Patrick Bellasi
2020-10-05 17:15 ` Qais Yousef
2020-10-07 15:00 ` Yun Hsiang [this message]
2020-10-05 12:42 ` Pavan Kondeti
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=20201007150013.GA219885@ubuntu \
--to=hsiang023167@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=qais.yousef@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.