[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1302010091.2225.1316.camel@twins>
Date: Tue, 05 Apr 2011 15:28:11 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Paul Turner <pjt@...gle.com>
Cc: linux-kernel@...r.kernel.org,
Bharata B Rao <bharata@...ux.vnet.ibm.com>,
Dhaval Giani <dhaval.giani@...il.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@...ibm.com>,
Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...e.hu>,
Pavel Emelyanov <xemul@...nvz.org>,
Nikhil Rao <ncrao@...gle.com>
Subject: Re: [patch 09/15] sched: add exports tracking cfs bandwidth
control statistics
On Tue, 2011-03-22 at 20:03 -0700, Paul Turner wrote:
> @@ -1431,10 +1432,15 @@ static void unthrottle_cfs_rq(struct cfs
> struct rq *rq = rq_of(cfs_rq);
> struct sched_entity *se;
> struct tg_unthrottle_down_data udd;
> + struct cfs_bandwidth *cfs_b = tg_cfs_bandwidth(cfs_rq->tg);
>
> se = cfs_rq->tg->se[cpu_of(rq_of(cfs_rq))];
>
> update_rq_clock(rq);
> + raw_spin_lock(&cfs_b->lock);
> + cfs_b->throttled_time += (rq->clock - cfs_rq->throttled_timestamp);
> + raw_spin_unlock(&cfs_b->lock);
> + cfs_rq->throttled_timestamp = 0;
>
> /* don't include throttled window for load statistics */
> udd.cpu = rq->cpu;
> @@ -1523,6 +1530,11 @@ static int do_sched_cfs_period_timer(str
> raw_spin_lock(&cfs_b->lock);
> cfs_b->runtime = runtime;
> cfs_b->runtime_assigned = runtime_assigned;
> +
> + /* update throttled stats */
> + cfs_b->nr_periods++;
Aren't you under-counting the periods, shouldn't that be += overrun?
> + if (throttled)
> + cfs_b->nr_throttled++;
idem?
> raw_spin_unlock(&cfs_b->lock);
>
> return idle;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists