public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM:	Rearrange core suspend code)
Date: Mon, 8 Jun 2009 15:35:13 +0100	[thread overview]
Message-ID: <20090608143513.GB16752@srcf.ucam.org> (raw)
In-Reply-To: <20090608142450.GE14234@elte.hu>

On Mon, Jun 08, 2009 at 04:24:50PM +0200, Ingo Molnar wrote:
> * Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > eSATA is pretty common now.
> 
> [ And 99% of the CPUs have an IDT still 99.9% of the users dont know 
>   what it is :) ]

Users know that there's a socket on the front of their computer that 
they can plug a hard drive into, and if that doesn't work then they're 
going to be upset.

> > The problem with this kind of default is that you get people who 
> > are confused that their hardware doesn't work.
> 
> If the hardware 'doesnt work' that is a kernel bug. Hardware that 
> _cannot be suspended_ safely (physically) should not be 
> auto-suspended, of course.

So, like I said, the kernel can't automatically suspend AHCI unless it's 
received some information from elsewhere that tells it it's ok to. The 
kernel can't know if there's an eSATA port or not.

> > If the kernel doesn't have enough information to make a decision 
> > it should err on the side of functionality - we're talking about 
> > fairly low-level power savings, but potentially several years of 
> > aggregate confusion on the part of users.
> 
> the difference between a 10W and a 1W footprint is a long series of 
> 'low-level power savings'.
> 
> If users are getting confused and if hardware gets broken then tha's 
> a plain bug and the wrong path is being walked.

Yes. And powersaving is a tradeoff between functionality and power 
consumption. The kernel doesn't know what level of functionality a given 
user requires. It *can't* know that itself.

> > Users are generally ok at realising correlation between a setting 
> > change and something no longer working, so as long as you provide 
> > that they'll be happy. I agree that this sucks. What we actually 
> > want is some means of reliably identifying whether a port is 
> > hotplug or not, but eSATA makes this very difficult.
> 
> Is it impossible?

To the best of my knowledge, yes.

> > My argument is "Hardware should work, and if the kernel default is 
> > for it to be broken then the default is wrong". We went through 
> > this for USB autosuspend. Userspace simply has more available 
> > information than the kernel, and it's not just a matter of static 
> > configuration (though that may be part of it). For instance, 
> > Oliver's example of screensavers and USB keyboards. If nothing's 
> > paying attention to volume keys (or if the keyboard doesn't have 
> > any) then you can enable remote wakeup and suspend the keyboard. 
> > If something /is/ paying attention to volume keys, you can't do 
> > that. That's the kind of case I'm discussing.
> 
> See my reply to Oliver. This is really advocating a broken model of 
> device usage. That volume key usage dependency is being hidden from 
> the kernel, and then you want to kludge it around by pushing suspend 
> functionality to user-space? That way lies madness. The proper way 
> is to close the device if it's not used by anything. Then the kernel 
> can auto-suspend it just like it could auto-suspend network 
> interfaces that are not in use, or like it could auto-suspend a 
> dislay port that has no monitor or other output device attached.

No, we can't just close it - then we won't get notification that a key's 
been hit in order to unlock the screensaver. Yes, we can greatly expand 
the userland-visible interface to every piece of hardware in order to 
make this work, but that's a huge amount of effort to avoid a model 
where userspace sets some tunables appropriately.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  parent reply	other threads:[~2009-06-08 14:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44L0.0906071651060.25203-100000@netrider.rowland.org>
2009-06-07 21:46 ` Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code) Rafael J. Wysocki
     [not found] ` <200906072347.00580.rjw@sisk.pl>
2009-06-07 22:02   ` Oliver Neukum
2009-06-07 22:05   ` Oliver Neukum
2009-06-08  6:54   ` Ingo Molnar
     [not found]   ` <200906080005.23304.oliver@neukum.org>
2009-06-08 11:29     ` Rafael J. Wysocki
     [not found]     ` <200906081329.27047.rjw@sisk.pl>
2009-06-08 12:04       ` Oliver Neukum
     [not found]       ` <200906081404.04118.oliver@neukum.org>
2009-06-08 18:34         ` Rafael J. Wysocki
     [not found]         ` <200906082034.31091.rjw@sisk.pl>
2009-06-09  7:25           ` Oliver Neukum
     [not found]           ` <200906090925.18866.oliver@neukum.org>
2009-06-09 14:33             ` Alan Stern
2009-06-09 22:44             ` Rafael J. Wysocki
2009-06-08 20:35       ` Alan Stern
     [not found]   ` <20090608065419.GA13568@elte.hu>
2009-06-08 11:30     ` Rafael J. Wysocki
     [not found]     ` <200906081330.50045.rjw@sisk.pl>
2009-06-08 13:05       ` Ingo Molnar
     [not found]       ` <20090608130509.GA3272@elte.hu>
2009-06-08 13:11         ` Matthew Garrett
     [not found]         ` <20090608131159.GA15100@srcf.ucam.org>
2009-06-08 13:22           ` Ingo Molnar
     [not found]           ` <20090608132235.GC13214@elte.hu>
2009-06-08 13:32             ` Matthew Garrett
2009-06-08 13:39             ` Oliver Neukum
     [not found]             ` <20090608133215.GA15482@srcf.ucam.org>
2009-06-08 13:46               ` Ingo Molnar
     [not found]               ` <20090608134647.GA14234@elte.hu>
2009-06-08 13:54                 ` Matthew Garrett
2009-06-08 13:58                 ` Oliver Neukum
     [not found]                 ` <20090608135431.GA16052@srcf.ucam.org>
2009-06-08 14:24                   ` Ingo Molnar
     [not found]                   ` <20090608142450.GE14234@elte.hu>
2009-06-08 14:35                     ` Matthew Garrett [this message]
2009-06-08 14:44                       ` Ingo Molnar
     [not found]                       ` <20090608144455.GA20905@elte.hu>
2009-06-08 14:51                         ` Matthew Garrett
     [not found]                         ` <20090608145102.GA17427@srcf.ucam.org>
2009-06-24 15:03                           ` Pavel Machek
2009-06-19  1:50                       ` Robert Hancock
     [not found]             ` <200906081539.20459.oliver@neukum.org>
2009-06-08 13:44               ` Matthew Garrett
2009-06-08 14:21               ` Ingo Molnar
     [not found]               ` <20090608142154.GD14234@elte.hu>
2009-06-08 14:30                 ` Matthew Garrett
     [not found]                 ` <20090608143023.GA16752@srcf.ucam.org>
2009-06-08 15:06                   ` Ingo Molnar
     [not found]                   ` <20090608150603.GB20905@elte.hu>
2009-06-08 15:11                     ` Matthew Garrett
2009-06-08 16:29                     ` Ray Lee
2009-06-09 22:44                 ` Jiri Kosina
     [not found] <Pine.LNX.4.44L0.0906081626120.13888-100000@netrider.rowland.org>
2009-06-08 21:31 ` Rafael J. Wysocki
     [not found] ` <200906082331.58933.rjw@sisk.pl>
2009-06-09  2:49   ` Alan Stern
2009-06-09  7:31   ` Oliver Neukum
     [not found]   ` <200906090931.37626.oliver@neukum.org>
2009-06-09 23:02     ` Rafael J. Wysocki
     [not found] <Pine.LNX.4.44L0.0906091032260.28447-100000@netrider.rowland.org>
2009-06-09 14:48 ` Oliver Neukum
     [not found] <Pine.LNX.4.44L0.0906082233490.19072-100000@netrider.rowland.org>
2009-06-09 22:57 ` Rafael J. Wysocki
     [not found] <200906100057.04473.rjw@sisk.pl>
2009-06-10 20:48 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0906101636180.2589-100000@iolanthe.rowland.org>
2009-06-10 21:15 ` Rafael J. Wysocki

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=20090608143513.GB16752@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    /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