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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131014134809.GE28601@twins.programming.kicks-ass.net>
Date:	Mon, 14 Oct 2013 15:48:09 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Morten Rasmussen <morten.rasmussen@....com>
Cc:	mingo@...nel.org, pjt@...gle.com, arjan@...ux.intel.com,
	rjw@...k.pl, dirk.j.brandewie@...el.com,
	vincent.guittot@...aro.org, alex.shi@...aro.org,
	preeti@...ux.vnet.ibm.com, efault@....de, corbet@....net,
	tglx@...utronix.de, catalin.marinas@....com,
	linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org
Subject: Re: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver
 hints

On Fri, Oct 11, 2013 at 06:19:13PM +0100, Morten Rasmussen wrote:
> +static inline void inc_cpu_capacity(int cpu)
> +{
> +	if (weighted_cpuload(cpu) > power_of(cpu))
> +		go_faster(cpu, 0);
> +}
> +
> +static inline void dec_cpu_capacity(int cpu)
> +{
> +	if (weighted_cpuload(cpu) < power_of(cpu))
> +		go_slower(cpu, 0);
> +}

It seems wrong to me to use weighted_cpuload() here; that contains the
task weight, which is irrelevant to power usage. I would expect a pure
utilization term here.

Something like:

  se->avg.runnable_avg_sum / se->avg.runnable_avg_period


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