Re: echo mem > /sys/power/state

From: Ingo Molnar
Date: Fri Jan 18 2008 - 03:52:19 EST



* Jiri Slaby <jirislaby@xxxxxxxxx> wrote:

> On 01/17/2008 08:13 PM, Andrew Morton wrote:
>> On Thu, 17 Jan 2008 10:36:51 -0700 Zan Lynx <zlynx@xxxxxxx> wrote:
>>> Heh. Laptop suspend to anything has been so broken for so long in the
>>> -mm series on my Compaq R3000 that I didn't even know it was ever
>>> supposed to work.
>>
>> It gets broken more often than anything else. I do test each release on
>> two laptops and I get to do a lot of bisection searching and
>> grumpygramming as a result.
>>
>> Probably it would be more efficient to have the people who wrote the code
>> also test it.
>
> Big fat ACK from here. Suspend issues in past few -mms were *very*
> hard (and time consuming) to track down.

it's really all a matter of reducing latencies. Testing suspend/resume
is manual work currently (it either needs me hit a key on the laptop or
necessiates the use of a test-script that might or might not work
depending on whether the new /dev/rtc driver is enabled). So few people
besides those that rely on it will do it. The more a patch that breaks
suspend is out in the open unidentified, the more damage it does: it
gets into more trees, gets harder to bisect, etc.

So please give us overworked maintainers an easy to use .config option
dependent on CONFIG_DEBUG_KERNEL=y that automatically triggers a simple
suspend+resume sequence 60 seconds after bootup. It would be godsent.
(dont worry about proper gx resume) I compile and boot up every patch i
add to x86.git, so this would catch crap the moment we add it to the
tree.

The other, more long-term trick is to make rarely used functionality
more widely used. Consolidate code. Try to merge as much of
suspend/resume with bootup/module-insert/shutdown sequences as possible.
Suspend unused devices more agressively - such as non-mounted block
devices or downed networking ports. Try create more network effects with
other functionality, suspend and resume is not just about suspending
laptops, it can/could be used for so much more stuff. Try to get Pavel's
"Sleepy Linux" concept to work reasonably well - so that more people
(including developers) would use it in a daily basis.

Test coverage of a given piece of code is a direct function of its
utility and of its ease of testing. Decreeing "this is important" really
wont get more testing done. What you should realize i think is that this
is not a social/mindset problem (so no need to get frustrated about it),
this is a mostly technology problem: you can gradually _code_ your way
into people's test efforts.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/