lkml.org 
[lkml]   [2007]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Disk spin down issue on shut down/suspend to disk
Mark Lord wrote:
>
> My suspend script now has this little chunk of code at the point
> where it actually does the suspend-to-RAM:
>
> sync; sync
> hdparm -F /dev/sda ## flush drive write cache
> sleep 1 ## allow time for the flush to complete
> echo mem > /sys/power/state ## suspend-to-RAM
>
> Without the "sleep 1", it doesn't always eliminate the extra Retract,
> so I hypothesize that the FLUSH_CACHE_EXT command is implemented in
> an asynchronous fashion by the drive: it returns immediately before
> it has actually completed writing cached data to disk. The "sleep 1"
> seems to give it enough time to finish up, at least for me.

Further to this, if I have an active-writer running at the time of suspend,
then even my scripted "sleep 1" is not good enough, as additional writes
are still happening before/after the flush.

Now I'll reboot and try it with the "sleep 1" hardcoded inside sd_suspend().

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

\
 
 \ /
  Last update: 2007-08-08 17:39    [W:0.075 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site