Re: [linux-pm] [demo patch/RFC] sleepy linux

From: Pavel Machek
Date: Thu Feb 28 2008 - 13:13:43 EST


Hi!

> Is this limited to UP and only one disk?

Yes... for now.

> [comments below]

Thanks!

> > --- /dev/null
> > +++ b/Documentation/power/sleepy.txt
> > @@ -0,0 +1,55 @@
> > + Sleepy Linux
> > + ~~~~~~~~~~~~
> > +
> > +Copyright 2007 Pavel Machek <pavel@xxxxxxx>
> > + GPLv2
> > +
> > +Current Linux versions can enter suspend-to-RAM just fine, but only
> > +can do it on explicit request. But suspend-to-RAM is important, eating
>
> Usually "can only do it" AFAIK.
>
> > +something like 10% of power needed for idle system. Starting suspend
> > +manually is not too convinient; it is not an option on multiuser
>
> convenient;

Spelling applied.

> > +Then, enable SCSI powersave by something like:
> > +
> > +mount /sys
>
> Isn't /sys auto-mounted by kernel?

No.

> > +/* The host and its devices are all idle so we can autosuspend */
> > +static int autosuspend(struct Scsi_Host *host)
> > +{
> > + if (my_pdev && autosuspend_enabled) {
> > + printk("ahci: should autosuspend\n");
>
> Use printk() KERN_* levels (multiple places).

Well, code obviously needs a lot of work... I said it was ugly ;-).

> > @@ -1820,6 +1858,10 @@ static void ahci_thaw(struct ata_port *a
> >
> > static void ahci_error_handler(struct ata_port *ap)
> > {
> > + struct ata_host *host = ap->host;
> > + int rc;
> > + extern int slept;
>
> Eh?

Pavel in hack mode ;-). Yes, I'll clean it up once I fix the
fundamental issues -- like UP only etc...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/