[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5060B82B.1050206@cs.tu-berlin.de>
Date: Mon, 24 Sep 2012 21:44:43 +0200
From: "Jan H. Schönherr"
<schnhrr@...tu-berlin.de>
To: pjt@...gle.com
CC: linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>,
Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@...ibm.com>,
Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
Venki Pallipadi <venki@...gle.com>,
Ben Segall <bsegall@...gle.com>,
Mike Galbraith <efault@....de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Nikunj A Dadhania <nikunj@...ux.vnet.ibm.com>,
Morten Rasmussen <Morten.Rasmussen@....com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: [patch 11/16] sched: replace update_shares weight distribution
with per-entity computation
Am 23.08.2012 16:14, schrieb pjt@...gle.com:
> From: Paul Turner <pjt@...gle.com>
>
> Now that the machinery in place is in place to compute contributed load in a
> bottom up fashion; replace the shares distribution code within update_shares()
> accordingly.
[snip]
> static int update_shares_cpu(struct task_group *tg, int cpu)
> {
> + struct sched_entity *se;
> struct cfs_rq *cfs_rq;
> unsigned long flags;
> struct rq *rq;
>
> - if (!tg->se[cpu])
> - return 0;
> -
> rq = cpu_rq(cpu);
> + se = tg->se[cpu];
> cfs_rq = tg->cfs_rq[cpu];
>
> raw_spin_lock_irqsave(&rq->lock, flags);
>
> update_rq_clock(rq);
> - update_cfs_load(cfs_rq, 1);
> update_cfs_rq_blocked_load(cfs_rq, 1);
>
> - /*
> - * We need to update shares after updating tg->load_weight in
> - * order to adjust the weight of groups with long running tasks.
> - */
> - update_cfs_shares(cfs_rq);
> + if (se) {
> + update_entity_load_avg(se, 1);
> + /*
> + * We can pivot on the runnable average decaying to zero for
> + * list removal since the parent average will always be >=
> + * child.
> + */
> + if (se->avg.runnable_avg_sum)
> + update_cfs_shares(cfs_rq);
> + else
> + list_del_leaf_cfs_rq(cfs_rq);
The blocked load, which we decay from this function, is not part of
se->avg.runnable_avg_sum. Is list removal a good idea while there might be
blocked load? We only get here, because we are on that list... don't we end up
with a wrong task group load then?
Regards
Jan
> + } else {
> + update_rq_runnable_avg(rq, rq->nr_running);
> + }
>
> raw_spin_unlock_irqrestore(&rq->lock, flags);
>
--
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