Re: [RFC 2/5] sched: Add CPU rate soft caps



On 5/28/06, Peter Williams <pwil3058@xxxxxxxxxxxxxx> wrote:
Peter Williams wrote:
> Balbir Singh wrote:
>> On 5/26/06, Peter Williams <pwil3058@xxxxxxxxxxxxxx> wrote:
>> <snip>
>>>
>>> Notes:
>>>
>>> 1. To minimize the overhead incurred when testing to skip caps
>>> processing for
>>> uncapped tasks a new flag PF_HAS_CAP has been added to flags.
>>>
>>> 2. The implementation involves the addition of two priority slots to the
>>> run queue priority arrays and this means that MAX_PRIO no longer
>>> represents the scheduling priority of the idle process and can't be
>>> used to
>>> test whether priority values are in the valid range. To alleviate this
>>> problem a new function sched_idle_prio() has been provided.
>>
>> I am a little confused by this. Why link the bandwidth expired tasks a
>> cpu (its caps) to a priority slot? Is this a hack to conitnue using
>> the prio_array? why not move such tasks to the expired array?
>
> Because it won't work as after the array switch they may get to run
> before tasks who aren't exceeding their cap (or don't have a cap).


That behaviour would be fair. Let the priority govern who gets to run
first (irrespective of their cap) and then use the cap to limit their
timeslice (execution time).

Another important reason for using these slots is that it allows waking
tasks to preempt tasks that have exceeded their cap.


But among all tasks that exceed their cap (there is no priority based
scheduling). As far as preemption is concerned, if they are moved to
the expired array, capped tasks will only run if an array switch takes
place. If it does, then they get their fare share of the cap again
until they exceed their cap.

Balbir
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Entanet resellers (e.g. fast, ADSL24)
    ... for exceeding the cap. ... I informed my RESELLER UKFSN to put me in ... I would call Entanet to check if they have got ears. ...
    (uk.telecom.broadband)
  • Re: Entanet resellers (e.g. fast, ADSL24)
    ... exceeding the cap. ... I informed my RESELLER UKFSN to put me in next cap ... I would call Entanet to check if they have got ears. ...
    (uk.telecom.broadband)
  • Re: [RFC 2/5] sched: Add CPU rate soft caps
    ... unfairly in some circumstances (namely when it's exceeding that cap). ... the primary fairness mechanism in the scheduler is the time slice allocation and the capping code doesn't fiddle with those so there should be a reasonable degree of fairness between capped tasks. ... To improve that would require allocating several new priority slots for use by tasks exceeding their caps and fiddling with those. ...
    (Linux-Kernel)
  • Re: [RFC 2/5] sched: Add CPU rate soft caps
    ... > Balbir Singh wrote: ... The implementation involves the addition of two priority slots to the ... > before tasks who aren't exceeding their cap. ... the interactive bonus mechanism is not about fairness either. ...
    (Linux-Kernel)