Skip to contentSkip to conversation

HDD power states + kernel

DISCUSSION Mukesh Rajan 2 participants 2 messages Jun 7, 2002 – Jun 8, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

hi,

i need to implement powering down of the Hard Disk in the linux kernel. i understand that using "hdparm" i could set a timeout and power down the HDD after a certain idle time.

but then HDD has 4 power states and instead of powering down to the lowest power state, i would like to power down one state at a time based on certain timeout values.

i'm not sure where to start with this. would i have to play around with "llrwblk.c"? and what would i have to do here in order to monitor disk inactivity (idleness)? or should i look into APM stuff?

any help or pointers in this direction would be of great help.

thanks in advance,
mukesh

#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Mukesh Rajan

i need to implement powering down of the Hard Disk in the linux kernel. i understand that using "hdparm" i could set a timeout and power down the HDD after a certain idle time.

but then HDD has 4 power states and instead of powering down to the lowest power state, i would like to power down one state at a time based on certain timeout values.

i'm not sure where to start with this. would i have to play around with "llrwblk.c"? and what would i have to do here in order to monitor disk inactivity (idleness)? or should i look into APM stuff?

The various standby modes of IDE disks are exported to userland via ioctl()s (WIN_STANDBYNOW* and friends). For a userland solution see
http://noflushd.sourceforge.net. A first stab at a kernel implementation was recently posted by Andrew Morton to linux-kernel (June 4th, look out for "laptop mode"). Neither code makes use of multiple power states, but you could start hacking from there.

Regards,

Daniel.