lkml.org 
[lkml]   [2006]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ckrm-tech] [PATCH 0/4] sched: Add CPU rate caps
Balbir Singh wrote:
> Peter Williams wrote:
>> Balbir Singh wrote:
>>
>>> Peter Williams wrote:
>>>
>
> <snip>
>
>>> Is it possible that the effective tasks
>>> is greater than the limit of the group?
>>
>>
>> Yes.
>>
>>> How do we handle this scenario?
>>
>>
>> You've got the problem back to front. If the number of effective
>> tasks is less than the group limit then you have the situation that
>> needs special handling (not the other way around). I.e. if the number
>> of effective tasks is less than the group limit then (strictly
>> speaking) there's no need to do any capping at all as the demand is
>> less than the limit. However, in the case where the group limit is
>> less than one CPU (i.e. less than 1000) the recommended thing to do
>> would be set the limit of each task in the group to the group limit.
>>
>> Obviously, group limits can be greater than one CPU (i.e. 1000).
>>
>> The number of CPUs on the system also needs to be taken into account
>> for group capping as if the group cap is greater than the number of
>> CPUs there's no way it can be exceeded and tasks in this group would
>> not need any processing.
>>
>
> What if we have a group limit of 100 (out of 1000) and 150 effective
> tasks in
> the group? How do you calculate the cap of each task?

Personally I'd round up to 1 :-) but rounding down to zero is also an
option. The reason I'd opt for 1 is that a zero cap has a special
meaning i.e. background.

> I hope my understanding of effective tasks is correct.

Yes, but I think that you fail to realize that this problem (a lower
limit to what caps can be enforced) exists for any mechanism due to the
fact we're stuck with discrete mathematics in computers. This includes
floating point representations of numbers which are just crude (discrete
maths) approximations of real numbers.

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-19 05:53    [W:0.303 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site