From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Josh Don <joshdon@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
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>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Paul Turner <pjt@google.com>,
David Rientjes <rientjes@google.com>,
Oleg Rombakh <olegrom@google.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Steve Sistare <steven.sistare@oracle.com>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: cgroup SCHED_IDLE support
Date: Fri, 11 Jun 2021 18:43:04 +0200 [thread overview]
Message-ID: <7222c20a-5cbb-d443-a2fd-19067652a38e@arm.com> (raw)
In-Reply-To: <CABk29Nu=mxz3tugjhDV9xCF7DRsMi9U747H+BqubviEva36RUw@mail.gmail.com>
On 10/06/2021 21:14, Josh Don wrote:
> Hey Dietmar,
>
> On Thu, Jun 10, 2021 at 5:53 AM Dietmar Eggemann
> <dietmar.eggemann@arm.com> wrote:
>>
>> Any reason why this should only work on cgroup-v2?
>
> My (perhaps incorrect) assumption that new development should not
> extend v1. I'd actually prefer making this work on v1 as well; I'll
> add that support.
>
>> struct cftype cpu_legacy_files[] vs. cpu_files[]
>>
>> [...]
>>
>>> @@ -11340,10 +11408,14 @@ void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
>>>
>>> static DEFINE_MUTEX(shares_mutex);
>>>
>>> -int sched_group_set_shares(struct task_group *tg, unsigned long shares)
>>> +#define IDLE_WEIGHT sched_prio_to_weight[ARRAY_SIZE(sched_prio_to_weight) - 1]
>>
>> Why not 3 ? Like for tasks (WEIGHT_IDLEPRIO)?
>>
>> [...]
>
> Went back and forth on this; on second look, I do think it makes sense
> to use the IDLEPRIO weight of 3 here. This gets converted to a 0,
> rather than a 1 for display of cpu.weight, which is also actually a
> nice property.
I'm struggling to see the benefit here.
For a taskgroup A: Why setting A/cpu.idle=1 to force a minimum A->shares
when you can set it directly via A/cpu.weight (to 1 (minimum))?
WEIGHT cpu.weight tg->shares
3 0 3072
15 1 15360
1 10240
`A/cpu.weight` follows cgroup-v2's `weights` `resource distribution
model`* but I can only see `A/cpu.idle` as a layer on top of it forcing
`A/cpu.weight` to get its minimum value?
*Documentation/admin-guide/cgroup-v2.rst
next prev parent reply other threads:[~2021-06-11 16:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 23:11 [PATCH] sched: cgroup SCHED_IDLE support Josh Don
2021-06-10 12:53 ` Dietmar Eggemann
2021-06-10 19:14 ` Josh Don
2021-06-11 16:43 ` Dietmar Eggemann [this message]
2021-06-11 23:34 ` Josh Don
2021-06-15 10:06 ` Dietmar Eggemann
2021-06-15 23:30 ` Josh Don
2021-06-25 9:24 ` Peter Zijlstra
2021-06-16 15:42 ` Tejun Heo
2021-06-17 1:01 ` Josh Don
2021-06-26 9:57 ` Tejun Heo
2021-06-29 4:57 ` Josh Don
2021-06-25 8:08 ` Peter Zijlstra
2021-06-26 10:06 ` Tejun Heo
2021-06-26 11:42 ` Rik van Riel
2021-06-25 8:14 ` Peter Zijlstra
2021-06-26 0:18 ` Josh Don
2021-06-25 8:20 ` Peter Zijlstra
2021-06-26 0:35 ` Josh Don
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=7222c20a-5cbb-d443-a2fd-19067652a38e@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=olegrom@google.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=steven.sistare@oracle.com \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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;
as well as URLs for NNTP newsgroup(s).