public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Patrick Mochel <mochel@digitalimplant.org>
Cc: dtor_core@ameritech.net, Andrew Morton <akpm@osdl.org>,
	Linux-pm mailing list <linux-pm@lists.osdl.org>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [linux-pm] [patch] pm: fix runtime powermanagement's /sys interface
Date: Fri, 6 Jan 2006 01:07:05 +0100	[thread overview]
Message-ID: <20060106000704.GD3339@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.50.0601051546380.10428-100000@monsoon.he.net>

On Čt 05-01-06 15:54:15, Patrick Mochel wrote:
> 
> On Thu, 5 Jan 2006, Pavel Machek wrote:
> 
> > On Čt 05-01-06 14:15:39, Patrick Mochel wrote:
> 
> > > It should be replaced with a file exported by the bus driver that exports
> > > the actual states that the device supports. The parsing can easily happen
> > > at this point, because the bus knows what a good value is.
> >
> > (1) would change core<->driver interface
> 
> It's broken anyway for runtime power management.

Please explain. As far as I can see, it is fairly simple, but good
enough. pm_message_t.flags indicating it is runtime suspend would be
nice, but I do not think it is broken.

> > (2) is quite a lot of work
> 
> In the long run, it's not.

Nobody fixed it in a year, so apparently it is a lot of work.

> > (3) ...with very little benefit, until drivers support >2 states
> 
> Without it, you are preventing drivers from being able to support > 2
> states.

0 drivers support > 2 states. So it is indeed very little benefit.

> > If you want to rewrite driver model for >2 states, great, but that is
> > going to take at least a year AFAICS, so please let me at least fix
> > the bugs in meantime.
> 
> It's a band-aid; it is not a long-term solution.

But band-aid is apparently neccessary unless you want drivers to see
invalid values.

> > > The userspace interface is broken. We can keep it for compatability
> > > reasons, but there needs to be a new interface.
> >
> > I assumed we could fix the interface without actually introducing >2
> > states support. That can be done in reasonable ammount of code.
> 
> The interface is irreparably broken. You can't fix it with an infinite
> number of band aids.

Without "band aids", you'll get BUG()s all over the kernel.

> > > I don't understand what you're saying. If I have a driver that Iwant to
> >                                          ~~~~~~~~~~~~~~~~~~
> > > make support another power state and I'm willing to write that code, then
> > > there is a clear benefit to having the infrastructure for it to "just
> > > work".
> >
> > I do not see such drivers around me, that's all. It seems fair to me
> > that first driver author wanting that is the one who introduces >2
> > states support to generic infrastructure.
> 
> Just because you personally have not seen such things does not mean they
> do not exist.

Just because you claim they exist does not mean they exist.

> > Passing "on"/"off" down to radeon lets the driver decide what power
> > state it should enter.
> 
> Driver implements power state policy? Sounds like that policy would find a
> much more comfortable home in userspace.

Userspace can't know that driver does not support D3 on this
particular hardware version because of hardware problems... or simply
because it is not yet implemented.
								Pavel
-- 
Thanks, Sharp!

  reply	other threads:[~2006-01-06  0:07 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-27 21:34 [patch] pm: fix runtime powermanagement's /sys interface Pavel Machek
2005-12-27 21:55 ` [linux-pm] " Dmitry Torokhov
2005-12-27 22:05   ` Pavel Machek
2005-12-28  4:22     ` Patrick Mochel
2006-01-04 21:34       ` Pavel Machek
2006-01-04 22:06         ` Alan Stern
2006-01-04 22:16           ` Pavel Machek
2006-01-05 21:43           ` Patrick Mochel
2006-01-05 22:06             ` Alan Stern
2006-01-05 22:28               ` Pavel Machek
2006-01-05 21:42         ` Patrick Mochel
2006-01-05 21:55           ` Pavel Machek
2006-01-05 22:13             ` Dominik Brodowski
2006-01-05 22:23               ` Pavel Machek
2006-01-05 22:27                 ` Dominik Brodowski
2006-01-05 22:59                   ` Pavel Machek
2006-01-05 23:08                   ` Pavel Machek
2006-01-05 23:46                     ` Dominik Brodowski
2006-01-05 23:58                       ` Pavel Machek
2006-01-06  0:04                         ` Patrick Mochel
2006-01-06  0:12                           ` Pavel Machek
2006-01-06  1:37                             ` Patrick Mochel
2006-01-06  8:59                               ` Pavel Machek
2006-01-07  5:47                                 ` Adam Belay
2006-01-06  9:00                               ` Pavel Machek
2006-01-06 15:00                               ` Dominik Brodowski
2006-01-07  5:58                                 ` Adam Belay
2006-01-06 15:42                               ` Alan Stern
2006-01-07  0:08                                 ` Pavel Machek
2006-01-07  3:19                                   ` Alan Stern
2006-01-07  7:58                                   ` Adam Belay
2006-01-07 10:20                                     ` Pavel Machek
2006-01-07 13:06                                       ` Adam Belay
2006-01-06  4:17                                         ` Pavel Machek
2006-01-07  7:41                                 ` Adam Belay
2006-01-07 15:24                                   ` Alan Stern
2006-01-06  0:38                   ` Greg KH
2006-01-06 15:03                     ` Dominik Brodowski
2006-01-06 16:25                       ` Kay Sievers
2006-01-09 20:10                         ` Dominik Brodowski
2006-01-05 22:15             ` Patrick Mochel
2006-01-05 22:44               ` Pavel Machek
2006-01-05 23:54                 ` Patrick Mochel
2006-01-06  0:07                   ` Pavel Machek [this message]
2006-01-06 14:34             ` Tom Marshall
2006-01-06 16:20               ` Pavel Machek
2006-01-07  8:36         ` Adam Belay
2006-01-07 10:25           ` Pavel Machek
2006-01-07 12:45             ` Adam Belay
2006-01-06  4:24               ` Pavel Machek
2006-01-13 20:00                 ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2006-01-05 15:16 Scott E. Preece
2006-01-05 16:41 ` Alan Stern
2006-01-05 21:14   ` Pavel Machek
2006-01-05 21:37     ` Alan Stern
2006-01-05 21:44       ` Pavel Machek
2006-01-05 21:48 ` Patrick Mochel
2006-01-05 22:13 Preece Scott-PREECE
2006-01-05 22:21 Preece Scott-PREECE
2006-01-05 22:45 ` Pavel Machek
2006-01-06  0:02 ` Patrick Mochel
2006-01-05 22:55 Preece Scott-PREECE
2006-01-05 23:05 ` Pavel Machek
2006-01-06  0:31 Scott E. Preece

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060106000704.GD3339@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=mochel@digitalimplant.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox