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-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to