Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tony Lindgren
Date: Friday, May 7, 2010 - 12:55 pm

* Matthew Garrett <mjg@redhat.com> [100507 12:29]:

Well there are obviously two paths to take, I think both of
them should work. The alternative to suspend blockers is:

- Implement a decent kernel idle function for the hardware and
  use cpuidle to change the c states. The dyntick stuff should
  already work for most hardware.

- Fix the core userspace apps to minimize timers.

- Deal with broken apps whichever way you want in the userspace.

- Optionally, do echo mem > /sys/power/state based on some
  product specific logic in the userspace.

The advantage of this is that no kernel changes are needed,
except for implementing the custom idle function for the
hardware. And this kind of setup has been in use for about
five years.

And, you can keep the system running constantly if you have
hardware that supports good idle modes, then you don't even
need to suspend at all.

The core problems I see with suspend blockers are following,
please correct me if I'm wrong:

- It is caching the value of echo mem > /sys/power/state and
  misusing it for runtime power management as the system still
  keeps running after trying to suspend. Instead, the kernel
  idle function and cpuidle should be used if the kernel keeps
  running.

- They require patching all over the drivers and userspace.

- Once the system is suspended, it does not run. And the apps
  don't behave in a standard way because the system does not
  wake to timer interrupts.

I agree that we need to be able to echo mem > /sys/power/state
in an atomic way. So if there are problems with that, those
issues should be fixed.

Cheers,

Tony
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Brian Swetland, (Wed May 5, 2:37 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Wed May 5, 4:47 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Brian Swetland, (Wed May 5, 4:56 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Wed May 5, 5:05 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Wed May 5, 9:16 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Thu May 6, 6:40 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 10:01 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 10:04 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Thu May 6, 10:09 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 10:14 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Thu May 6, 10:22 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Thu May 6, 10:35 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 10:38 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Thu May 6, 10:43 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 11:33 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 11:36 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Thu May 6, 11:44 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Thu May 6, 12:11 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Thu May 6, 5:10 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 7:00 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Thu May 6, 7:05 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Thu May 6, 9:10 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 8:54 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 10:12 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 10:20 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 10:35 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 10:36 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 10:40 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 10:50 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 10:50 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 10:51 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 11:00 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 11:01 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 11:17 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 11:28 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 11:43 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 11:46 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 12:06 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 12:28 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 12:33 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 12:55 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 1:28 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 1:53 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 2:03 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 2:25 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 2:30 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Fri May 7, 2:32 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Fri May 7, 2:35 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 2:38 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 2:39 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 2:42 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Daniel Walker, (Fri May 7, 2:43 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 2:48 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Tony Lindgren, (Fri May 7, 3:00 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Matthew Garrett, (Fri May 7, 3:28 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Pavel Machek, (Thu May 27, 11:43 pm)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Arve Hjønnevåg, (Fri May 28, 12:01 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Pavel Machek, (Fri May 28, 6:29 am)
Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api., Brian Swetland, (Fri May 28, 6:42 am)