From: Balbir Singh <balbir@in.ibm.com>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: Andrew Morton <akpm@osdl.org>,
kernel@kolivas.org, sam@vilain.net, bsingharora@gmail.com,
vatsa@in.ibm.com, dev@openvz.org, linux-kernel@vger.kernel.org,
efault@gmx.de, kingsley@aurema.com,
ckrm-tech@lists.sourceforge.net, mingo@elte.hu,
rene.herman@keyaccess.nl
Subject: Re: [PATCH 0/4] sched: Add CPU rate caps
Date: Mon, 19 Jun 2006 05:43:52 +0530 [thread overview]
Message-ID: <4495EC40.70301@in.ibm.com> (raw)
In-Reply-To: <449529FE.1040008@bigpond.net.au>
Peter Williams wrote:
> Andrew Morton wrote:
>
>> On Sun, 18 Jun 2006 18:26:38 +1000
>> Peter Williams <pwil3058@bigpond.net.au> wrote:
>>
>> People are going to want to extend this to capping a *group* of tasks,
>> with
>> some yet-to-be-determined means of tying those tasks together. How well
>> suited is this code to that extension?
>
>
> Quite good. It can be used from outside the scheduler to impose caps on
> arbitrary groups of tasks. Were the PAGG interface available I could
> knock up a module to demonstrate this. When/if the "task watchers"
> patch is included I will try and implement a higher level mechanism
> using that. The general technique is to get an estimate of the
> "effective number" of tasks in the group (similar to load) and give each
> task in the group a cap which is the group's cap divided by the
> effective number of tasks (or the group cap whichever is smaller -- i.e.
> the effective number of tasks could be less than one).
>)
There is one possible issue with this approach. Lets assume that we desire
a cap of 10 for a set of two tasks. As discussed earlier, each task
would get a limit of 5% if they are equally busy.
Lets call the group as G1 and the tasks as T1 and T2.
If we have another group called G2 with tasks T3, T4 and T5 and a soft
cap of 90. Then each of T3, T4 and T5 would get a soft cap of
30% (assuming that they are equally busy). Now if T5 stops using its limit
for a while let say its cpu utilization is 10% - how do we divide the saved
20% between T1, T2, T3 and T4.
In a group scenario, the balance 20% should be shared between T3 and T4.
Also mathematically
A group is a superset of task
It is hard to implement things for a task and make it work for groups,
but if we had something for groups, we could easily adapt it to tasks
by making each group equal to a task
> Doing it inside the scheduler is also doable but would have some locking
> issues. The run queue lock could no longer be used to protect the data
> as there's no guarantee that all the tasks in the group are associated
> with the same queue.
>
>>
>> If the task can exceed its cap without impacting any other tasks (ie:
>> there
>> is spare idle capacity), what happens?
>
>
> That's the difference between soft and hard caps. If it's a soft cap
> then the task is allowed to exceed it if there's spare capacity. If
> it's a hard cap it's not.
>
By how much is the task allowed to exceed if there is spare capacity?
Will the spare capacity allocation require resetting of caps to implement
the new caps?
>> I trust that spare capacity gets
>> used? (Is this termed "work conserving"?)
>
>
> Soft caps, yes. Hard caps, no.
>
--
Cheers,
Balbir Singh,
Linux Technology Center,
IBM Software Labs
next prev parent reply other threads:[~2006-06-19 0:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-18 8:26 [PATCH 0/4] sched: Add CPU rate caps Peter Williams
2006-06-18 8:26 ` [PATCH 1/4] sched: Add CPU rate soft caps Peter Williams
2006-06-18 8:38 ` Con Kolivas
2006-06-18 15:52 ` Peter Williams
2006-06-19 1:21 ` Peter Williams
2006-06-18 8:26 ` [PATCH 2/4] sched: Add CPU rate hard caps Peter Williams
2006-06-18 8:27 ` [PATCH 3/4] sched: Add procfs interface for CPU rate soft caps Peter Williams
2006-06-18 8:27 ` [PATCH 4/4] sched: Add procfs interface for CPU rate hard caps Peter Williams
2006-06-18 9:50 ` [PATCH 0/4] sched: Add CPU rate caps Andrew Morton
2006-06-18 10:25 ` Peter Williams
2006-06-18 11:42 ` Srivatsa Vaddagiri
2006-06-18 12:19 ` Peter Williams
2006-06-19 0:13 ` Balbir Singh [this message]
2006-06-19 1:03 ` [ckrm-tech] " Peter Williams
2006-06-19 2:20 ` Balbir Singh
2006-06-19 3:17 ` Peter Williams
2006-06-19 3:31 ` Balbir Singh
2006-06-19 3:50 ` Peter Williams
2006-06-19 8:30 ` Balbir Singh
2006-06-19 11:35 ` Peter Williams
2006-06-19 11:33 ` Balbir Singh
2006-06-19 23:09 ` Peter Williams
2006-06-20 4:28 ` Peter Williams
2006-06-20 4:40 ` Balbir Singh
2006-06-20 5:56 ` Peter Williams
2006-06-19 5:04 ` Peter Williams
2006-06-19 23:59 ` Peter Williams
2006-06-19 18:55 ` [ckrm-tech] " Chris Friesen
2006-06-19 23:28 ` Peter Williams
-- strict thread matches above, loose matches on Subject: below --
2006-06-22 1:52 Peter Williams
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=4495EC40.70301@in.ibm.com \
--to=balbir@in.ibm.com \
--cc=akpm@osdl.org \
--cc=bsingharora@gmail.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=dev@openvz.org \
--cc=efault@gmx.de \
--cc=kernel@kolivas.org \
--cc=kingsley@aurema.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pwil3058@bigpond.net.au \
--cc=rene.herman@keyaccess.nl \
--cc=sam@vilain.net \
--cc=vatsa@in.ibm.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