Re: [CFS Bandwidth Control v4 5/7] sched: add exports tracking cfsbandwidth control statistics
From: Peter Zijlstra
Date: Fri Feb 25 2011 - 03:55:19 EST
On Thu, 2011-02-24 at 19:26 -0800, Paul Turner wrote:
> On Wed, Feb 23, 2011 at 5:32 AM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> > On Tue, 2011-02-15 at 19:18 -0800, Paul Turner wrote:
> >> + raw_spin_lock(&cfs_b->lock);
> >> + cfs_b->throttled_time += (rq->clock - cfs_rq->throttled_timestamp);
> >> + raw_spin_unlock(&cfs_b->lock);
> > That seems to put the cost of things on the wrong side. Read is rare,
> > update is frequent, and you made the frequent thing the most expensive
> > one.
> Hum.. the trade-off here is non-trivial I think
> - This update is only once per-quota period (*if* we throttled within
> that period). This places the frequency in the 10s-100s of ms range.
> - Sampling would probably occur on an order of once a second (assuming
> some enterprise management system that cares about these statistics).
Ugh,. people are really polling state like that? If the event is rare
pushing state is much saner.
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/