lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1361367371.10155.32.camel@laptop>
Date:	Wed, 20 Feb 2013 14:36:11 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Alex Shi <alex.shi@...el.com>
Cc:	torvalds@...ux-foundation.org, mingo@...hat.com,
	tglx@...utronix.de, akpm@...ux-foundation.org,
	arjan@...ux.intel.com, bp@...en8.de, pjt@...gle.com,
	namhyung@...nel.org, efault@....de, vincent.guittot@...aro.org,
	gregkh@...uxfoundation.org, preeti@...ux.vnet.ibm.com,
	viresh.kumar@...aro.org, linux-kernel@...r.kernel.org,
	morten.rasmussen@....com
Subject: Re: [patch v5 09/15] sched: add power aware scheduling in
 fork/exec/wake

On Wed, 2013-02-20 at 20:09 +0800, Alex Shi wrote:
> On 02/20/2013 05:42 PM, Peter Zijlstra wrote:
> > On Mon, 2013-02-18 at 13:07 +0800, Alex Shi wrote:
> >> +/*
> >> + * Try to collect the task running number and capacity of the group.
> >> + */
> >> +static void get_sg_power_stats(struct sched_group *group,
> >> +       struct sched_domain *sd, struct sg_lb_stats *sgs)
> >> +{
> >> +       int i;
> >> +
> >> +       for_each_cpu(i, sched_group_cpus(group)) {
> >> +               struct rq *rq = cpu_rq(i);
> >> +
> >> +               sgs->group_utils += rq->nr_running;
> >> +       }
> >> +
> >> +       sgs->group_capacity = DIV_ROUND_CLOSEST(group->sgp->power,
> >> +                                               SCHED_POWER_SCALE);
> >> +       if (!sgs->group_capacity)
> >> +               sgs->group_capacity = fix_small_capacity(sd, group);
> >> +       sgs->group_weight = group->group_weight;
> >> +}
> > 
> > So you're trying to compute the group utilization, but what does that
> > have to do with nr_running? In an earlier patch you introduced the
> > per-cpu utilization, so why not avg that to compute the group
> > utilization?
> 
> I had tried to use rq utilisation in this balancing, but since the
> utilisation need much time to accumulate itself(345ms). It's bad for
> any burst balancing. So I use instant utilisation -- nr_running.

But but but,... nr_running is completely unrelated to utilization.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ