Re: [PATCH v3 3/7] sched: throttle cfs_rq entities which exceedtheir local quota

From: KAMEZAWA Hiroyuki
Date: Wed Oct 13 2010 - 03:05:48 EST


On Tue, 12 Oct 2010 23:44:29 -0700
Paul Turner <pjt@xxxxxxxxxx> wrote:

> On Tue, Oct 12, 2010 at 11:34 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > On Tue, 12 Oct 2010 13:22:02 +0530
> > Bharata B Rao <bharata@xxxxxxxxxxxxxxxxxx> wrote:

> >> Â/*
> >> Â * Re-compute the task group their per cpu shares over the given domain.
> >> Â * This needs to be done in a bottom-up fashion because the rq weight of a
> >> @@ -1688,7 +1691,14 @@ static int tg_shares_up(struct task_grou
> >> Â Â Â usd_rq_weight = per_cpu_ptr(update_shares_data, smp_processor_id());
> >>
> >> Â Â Â for_each_cpu(i, sched_domain_span(sd)) {
> >> - Â Â Â Â Â Â weight = tg->cfs_rq[i]->load.weight;
> >> + Â Â Â Â Â Â /*
> >> + Â Â Â Â Â Â Â* bandwidth throttled entities cannot contribute to load
> >> + Â Â Â Â Â Â Â* balance
> >> + Â Â Â Â Â Â Â*/
> >> + Â Â Â Â Â Â if (!cfs_rq_throttled(tg->cfs_rq[i]))
> >> + Â Â Â Â Â Â Â Â Â Â weight = tg->cfs_rq[i]->load.weight;
> >> + Â Â Â Â Â Â else
> >> + Â Â Â Â Â Â Â Â Â Â weight = 0;
> >
> > cpu.share and bandwidth control can't be used simultaneously or...
> > is this fair ? I'm not familiar with scheduler but this allows boost this tg.
> > Could you add a brief documentaion of a spec/feature. in the next post ?
> >
>
> Bandwidth control is orthogonal to shares, shares continue controls
> distribution of bandwidth when within quota. Bandwidth control only
> has 'perceivable' effect when you exceed your reservation within a
> quota period.
>
> What the above is doing is removing any throttled entities from the
> load-balancer's weight calculations (based on contribution from
> throttled entities) since these entities are already dequeued and
> cannot be balanced.
>
> Or have I misunderstood your question?
>

Thank you for quick reply.
It seems I don't undestand what "cfs_rq_throttled()==1" means.

Thanks,
-Kame

--
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/