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]
Date:	Wed, 30 Apr 2014 00:19:53 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Morten Rasmussen <morten.rasmussen@....com>
Cc:	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Amit Kucheria <amit.kucheria@...aro.org>,
	Ingo Molnar <mingo@...e.hu>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] sched: idle: Add sched balance option

On Tuesday, April 29, 2014 11:00:23 AM Morten Rasmussen wrote:
> On Tue, Apr 29, 2014 at 12:11:47AM +0100, Rafael J. Wysocki wrote:
> > On Monday, April 28, 2014 01:07:31 PM Daniel Lezcano wrote:
> 
> [...]
> 
> > > I'm really wondering if the cgroup couldn't be a good solution:
> > > 
> > > Amit pointed the conflict about the power vs performance with some 
> > > applications. We want to have for example a game to run fast performance 
> > > and some other application to save power.
> > 
> > You can't save power.
> > 
> > Power is the energy flow *rate*.  It's like speed, so how can you save it?
> > 
> > If you talk about saving in this context, please always talk about energy as
> > well, because that's what we want to save.
> > 
> > This means that positioning power against performance doesn't make any sense
> > whatsoever.  You could try to position energy efficiency (that is, the relative
> > cost of doing work in terms of energy) against performance, but even that is
> > questionable, because, as I said in one of the previous messages, what is good
> > for performance is often good for energy efficiency too (think about race to
> > idle for example).
> > 
> > In other words, you want to have a knob whose both ends may happen to mean
> > the same thing.  Wouldn't that be a little odd?
> > 
> > In my opinion it would be much better to have a knob representing the current
> > relative value of energy to the user (which may depend on things like whether
> > or not the system is on battery etc) and meaning how far we need to go with
> > energy saving efforts.
> 
> I agree, more or less. I think of performance and energy awareness as
> optimization objectives. If we only care about performance we are
> dealing with a single-objective optimization problem. We do what it
> takes to get the best possible performance without considering energy at
> all. Energy awareness is IMO as multi-objective optimization problem. We
> want to save energy, but do so without sacrificing too much performance.
> What "too much" is depends on the scenario (application).
> 
> Energy efficiency and performance are different objectives, but I agree
> that the means to get better energy efficiency might be the same as
> those to get better performance in some cases. IMO, energy awareness is
> not a big switch to turn on specific scheduling mechanics (or other
> mechnaics in the kernel) such as task packing and disabling expensive
> DVFS states, it is about changing the scheduling optimization objective
> to include energy in the scheduling decisions.

Very well stated.

Also it is about to what extent those decisions should take energy into
account.

> That is, try to save energy for the current scenario. That includes race to
> idle if that is the best way for the particular application and platform/system
> topology.
> 
> > 
> > So if that knob is 0, we'll do things that are known-good for performance.
> > If it is 1, we'll do some extra effort to save enery as well possibly at
> > a small expense of performance if that's necessary.  If it is 100, we'll do
> > all we can to save as much energy as possible without caring about performance
> > at all.
> > 
> > And it doesn't even have to be scheduler-specific, it very well may be global.
> 
> I like the idea of knob representing the weight of energy awareness.
> Whether it should be global, per task, or per cgroup I'm not sure about.

A global knob might be useful to other parts of the kernel too, like device
drivers implementing runtime PM, for example.  In that context per task
or per cgroup knobs wouldn't be very useful.

Also there may be a user space component and a kernel component in it,
combined somehow, so that user space can influence its value and so that
the kernel can adjust it in response to power events automatically.

Thanks!

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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