From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id A34D3B1B for ; Mon, 6 Jul 2015 16:34:06 +0000 (UTC) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 70A001DB for ; Mon, 6 Jul 2015 16:34:05 +0000 (UTC) Received: by ykfs198 with SMTP id s198so48495549ykf.2 for ; Mon, 06 Jul 2015 09:34:04 -0700 (PDT) MIME-Version: 1.0 References: <1489458.8WDRattPkl@vostro.rjw.lan> <20150706114017.463ef472@noble> <53223375.qzkvIEse3r@vostro.rjw.lan> In-Reply-To: <53223375.qzkvIEse3r@vostro.rjw.lan> From: Kristen Accardi Date: Mon, 06 Jul 2015 16:33:55 +0000 Message-ID: To: "Rafael J. Wysocki" , NeilBrown Content-Type: multipart/alternative; boundary=94eb2c07e24256bf84051a3779d3 Cc: Grant Likely , Len Brown , Alan Stern , ksummit-discuss@lists.linuxfoundation.org, Kristen Carlson Accardi Subject: Re: [Ksummit-discuss] [TECH TOPIC] System-wide interface to specify the level of PM tuning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --94eb2c07e24256bf84051a3779d3 Content-Type: text/plain; charset=UTF-8 On Mon, Jul 6, 2015 at 6:45 AM Rafael J. Wysocki wrote: > On Monday, July 06, 2015 11:40:17 AM NeilBrown wrote: > > On Mon, 06 Jul 2015 02:22:02 +0200 "Rafael J. Wysocki" > > wrote: > > > > > Hi All, > > > > > > This is a re-occuring theme, but we discussed it last month during > LinuxCon > > > Japan with Kristen, Grant and other people and pretty much the only > conclusion > > > we could reach was to propose it as the KS topic, so here it goes. > > > > > > As systems get more and more complex and more and more internally > integrated > > > over time, every new generation of them requires an increased amount > of tuning > > > to achieve satisfactory balance between energy usage and performance. > You need > > > to know what to tune and how to do that, it needs to be done from user > space or > > > requires special Kconfig options to be set (or even out-of-the-tree > patches to > > > be applied in extreme cases) and so on. All that becomes more and > more esoteric > > > and quite frankly I'm not sure how many users are able to do that on > their new > > > systems. > > > > > > That leads to a question whether or not a global interface > (sysfs-based, > > > command line etc.) could be added to the kernel that might be used to > make a > > > certain amount of the tuning happen already at the kernel level. For > example, > > > it might change the default runtime PM control setting for all devices > from > > > "on" to "auto", automatically enable other runtime power management > features > > > available from various bus types (SATA link power management, USB LPM, > others) > > > and generally enable power management techiques disabled by default > because > > > enabling them may lead to performance regressions. > > > > > > So do we need such an interface? If not, why not? If so, how should > it be > > > designed, what should it cover etc.? > > > > > > > This sounds like an important topic, but I don't think I quite > > understand the question. > > We already have ".../power/runtime_enabled" and various other tunables. > > What more could you need in a kernel interface? > > The problem is that the defaults for all of those tunables are > performance-oriented, > so you need to flip many of them (if not all) to become power-oriented. > > That usually mean flipping a number of knobs every time you boot the > system. > > > I can see that much more than an interface is needed - we need a tool > > that makes use of that interface. > > That is one possible approach, but that tool would need to be developed in > a lockstep with the kernel anyway, so it knows about all of the new > features > added to the kernel over time that have non-trivial power vs performance > characteristics. > Deployment of a user space tool is the big issue - like Rafael said it is hard to keep up with all the new settings that might be present and the kernel will have this knowledge. > > > Maybe a database of different systems together with tuning settings for > > different goals. > > Then some tools detects the particular hardware it is running on, and > > applies the tuning rules. > > > > (a tiny bit like a devicetree database which contains configuration > > rules). > > > > Or have I missed the point completely? > > No, I don't think you have missed it, but then most of subsystems and > drivers > in the kernel know what it means to be "power-friendly", so they should be > able > to choose their defaults on the basis of one single setting somewhere. > > Thanks, > Rafael > > Also some components can be present on performance sensitive platforms as well as power sensitive platforms, so it would be better if they chose their default setting based on a system wide policy default that can be set by a platform driver. > _______________________________________________ > Ksummit-discuss mailing list > Ksummit-discuss@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/ksummit-discuss > --94eb2c07e24256bf84051a3779d3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Jul 6,= 2015 at 6:45 AM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
O= n Monday, July 06, 2015 11:40:17 AM NeilBrown wrote:
> On Mon, 06 Jul 2015 02:22:02 +0200 "Rafael J. Wysocki"
> <rjw@rjwysoc= ki.net> wrote:
>
> > Hi All,
> >
> > This is a re-occuring theme, but we discussed it last month durin= g LinuxCon
> > Japan with Kristen, Grant and other people and pretty much the on= ly conclusion
> > we could reach was to propose it as the KS topic, so here it goes= .
> >
> > As systems get more and more complex and more and more internally= integrated
> > over time, every new generation of them requires an increased amo= unt of tuning
> > to achieve satisfactory balance between energy usage and performa= nce.=C2=A0 You need
> > to know what to tune and how to do that, it needs to be done from= user space or
> > requires special Kconfig options to be set (or even out-of-the-tr= ee patches to
> > be applied in extreme cases) and so on.=C2=A0 All that becomes mo= re and more esoteric
> > and quite frankly I'm not sure how many users are able to do = that on their new
> > systems.
> >
> > That leads to a question whether or not a global interface (sysfs= -based,
> > command line etc.) could be added to the kernel that might be use= d to make a
> > certain amount of the tuning happen already at the kernel level.= =C2=A0 For example,
> > it might change the default runtime PM control setting for all de= vices from
> > "on" to "auto", automatically enable other ru= ntime power management features
> > available from various bus types (SATA link power management, USB= LPM, others)
> > and generally enable power management techiques disabled by defau= lt because
> > enabling them may lead to performance regressions.
> >
> > So do we need such an interface?=C2=A0 If not, why not?=C2=A0 If = so, how should it be
> > designed, what should it cover etc.?
> >
>
> This sounds like an important topic, but I don't think I quite
> understand the question.
> We already have ".../power/runtime_enabled" and various othe= r tunables.
> What more could you need in a kernel interface?

The problem is that the defaults for all of those tunables are performance-= oriented,
so you need to flip many of them (if not all) to become power-oriented.

That usually mean flipping a number of knobs every time you boot the system= .

> I can see that much more than an interface is needed - we need a tool<= br> > that makes use of that interface.

That is one possible approach, but that tool would need to be developed in<= br> a lockstep with the kernel anyway, so it knows about all of the new feature= s
added to the kernel over time that have non-trivial power vs performance characteristics.

Deployment of a user s= pace tool is the big issue - like Rafael said it is hard to keep up with al= l the new settings that might be present and the kernel will have this know= ledge.
=C2=A0

> Maybe a database of different systems together with tuning settings fo= r
> different goals.
> Then some tools detects the particular hardware it is running on, and<= br> > applies the tuning rules.
>
> (a tiny bit like a devicetree database which contains configuration > rules).
>
> Or have I missed the point completely?

No, I don't think you have missed it, but then most of subsystems and d= rivers
in the kernel know what it means to be "power-friendly", so they = should be able
to choose their defaults on the basis of one single setting somewhere.

Thanks,
Rafael


Also some components can be present on= performance sensitive platforms as well as power sensitive platforms, so i= t would be better if they chose their default setting based on a system wid= e policy default that can be set by a platform driver.
=C2=A0
_______________________________________________
Ksummit-discuss mailing list
Ksummit-discuss@lists.linuxfoundation.org
https://lists.linuxfoundation.org/= mailman/listinfo/ksummit-discuss
--94eb2c07e24256bf84051a3779d3--