* power off disk drives while running @ 2007-08-18 16:08 Marty Leisner 2007-08-18 16:21 ` Jan Engelhardt 0 siblings, 1 reply; 7+ messages in thread From: Marty Leisner @ 2007-08-18 16:08 UTC (permalink / raw) To: linux-kernel In embedded system design, it may be useful to poweroff the disks (as opposed to merely spinning them down). We want to leave the system running while the disk is powered down, and let the disk powerup when it needs to be spun up. While the "power off mechanism" would be platform dependent, is there a generic path to announce "prepare for power going away"? marty ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: power off disk drives while running 2007-08-18 16:08 power off disk drives while running Marty Leisner @ 2007-08-18 16:21 ` Jan Engelhardt 2007-08-18 19:21 ` Brennan Ashton 0 siblings, 1 reply; 7+ messages in thread From: Jan Engelhardt @ 2007-08-18 16:21 UTC (permalink / raw) To: Marty Leisner; +Cc: linux-kernel On Aug 18 2007 12:08, Marty Leisner wrote: > >In embedded system design, it may be useful to poweroff the disks (as opposed >to merely spinning them down). We want to leave the system running while >the disk is powered down, and let the disk powerup when it needs to be >spun up. That means you also have to power it on... >While the "power off mechanism" would be platform dependent, is there a >generic path to announce "prepare for power going away"? I do not see why that would be needed from a software point of view. Just make sure that the disk does not needlessy emergency-park when pulling power. When someone wants to write to disk, the request goes to the device driver, which hands it to the controller, which hands it to the disk. And your controller should be able to handle it (e.g. wait until reconnect) when there is a request for a disk that is powered off. Jan -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: power off disk drives while running 2007-08-18 16:21 ` Jan Engelhardt @ 2007-08-18 19:21 ` Brennan Ashton 0 siblings, 0 replies; 7+ messages in thread From: Brennan Ashton @ 2007-08-18 19:21 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Marty Leisner, linux-kernel On 8/18/07, Jan Engelhardt <jengelh@computergmbh.de> wrote: > > On Aug 18 2007 12:08, Marty Leisner wrote: > > > >In embedded system design, it may be useful to poweroff the disks (as opposed > >to merely spinning them down). We want to leave the system running while > >the disk is powered down, and let the disk powerup when it needs to be > >spun up. > > That means you also have to power it on... > > >While the "power off mechanism" would be platform dependent, is there a > >generic path to announce "prepare for power going away"? > > I do not see why that would be needed from a software point of view. Just make > sure that the disk does not needlessy emergency-park when pulling power. When > someone wants to write to disk, the request goes to the device driver, which > hands it to the controller, which hands it to the disk. And your controller > should be able to handle it (e.g. wait until reconnect) when there is a request > for a disk that is powered off. > > > Jan > -- > - > 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/ > I see this a a very important feature in the embedded system relm, I have worked on two projects that required extreme power management, and massive data storage. The ability to fully turn off a drive while the system is running is key. It seems like this should be able to be done from a kernel point of view rather than extra hardware. Although if is not in the IDE/SATA spec then extra hardware would be necessary. -- Brennan Ashton Bellingham, Washington "The box said, 'Requires Windows 98 or better'. So I installed Linux" ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <fa.l/ISoqsJwIs1QBGVs0hodyygNPM@ifi.uio.no>]
[parent not found: <fa.FVj1AVbAlk/6U33GB0rOY45WWqM@ifi.uio.no>]
[parent not found: <fa.CQDcAiLY+yM/ENberToamsw+vFw@ifi.uio.no>]
* Re: power off disk drives while running [not found] ` <fa.CQDcAiLY+yM/ENberToamsw+vFw@ifi.uio.no> @ 2007-08-18 20:22 ` Robert Hancock 2007-08-18 21:09 ` Jan Engelhardt 0 siblings, 1 reply; 7+ messages in thread From: Robert Hancock @ 2007-08-18 20:22 UTC (permalink / raw) To: Brennan Ashton; +Cc: Jan Engelhardt, Marty Leisner, linux-kernel Brennan Ashton wrote: > On 8/18/07, Jan Engelhardt <jengelh@computergmbh.de> wrote: >> On Aug 18 2007 12:08, Marty Leisner wrote: >>> In embedded system design, it may be useful to poweroff the disks (as opposed >>> to merely spinning them down). We want to leave the system running while >>> the disk is powered down, and let the disk powerup when it needs to be >>> spun up. >> That means you also have to power it on... >> >>> While the "power off mechanism" would be platform dependent, is there a >>> generic path to announce "prepare for power going away"? >> I do not see why that would be needed from a software point of view. Just make >> sure that the disk does not needlessy emergency-park when pulling power. When >> someone wants to write to disk, the request goes to the device driver, which >> hands it to the controller, which hands it to the disk. And your controller >> should be able to handle it (e.g. wait until reconnect) when there is a request >> for a disk that is powered off. >> >> >> Jan >> -- >> - >> 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/ >> > > I see this a a very important feature in the embedded system relm, I > have worked on two projects that required extreme power management, > and massive data storage. The ability to fully turn off a drive while > the system is running is key. It seems like this should be able to be > done from a kernel point of view rather than extra hardware. Although > if is not in the IDE/SATA spec then extra hardware would be necessary. You can put a drive into sleep mode with ATA commands, that one requires a reset to take it out of that state (as opposed to standby which spins down but will spin up on any command that's issued afterwards). That's as close as it gets to fully powering off a drive through software. -- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from hancockr@nospamshaw.ca Home Page: http://www.roberthancock.com/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: power off disk drives while running 2007-08-18 20:22 ` Robert Hancock @ 2007-08-18 21:09 ` Jan Engelhardt 2007-08-18 21:20 ` Brennan Ashton 2007-08-20 15:25 ` Phillip Susi 0 siblings, 2 replies; 7+ messages in thread From: Jan Engelhardt @ 2007-08-18 21:09 UTC (permalink / raw) To: Robert Hancock; +Cc: Brennan Ashton, Marty Leisner, linux-kernel On Aug 18 2007 14:22, Robert Hancock wrote: >> I see this a a very important feature in the embedded system relm, I >> have worked on two projects that required extreme power management, >> and massive data storage. The ability to fully turn off a drive while >> the system is running is key. It seems like this should be able to be >> done from a kernel point of view rather than extra hardware. Although >> if is not in the IDE/SATA spec then extra hardware would be necessary. > > You can put a drive into sleep mode with ATA commands, that one requires a > reset to take it out of that state (as opposed to standby which spins down but > will spin up on any command that's issued afterwards). That's as close as it > gets to fully powering off a drive through software. An IDE reset bringing the disk up again -- that does not sound like it is powered down. Power down for me means: as if the plug was pulled. Well, you could also rewrite the standy ioctl to do this: - flush data - send spindown request - wait 1ms - 1s (give drive some time to park heads) - outportb(0x378, 0) - poweroff by setting LPT data line to 0 (who knows? they might control the disk power!) But you'd still have to fiddle with bringing it up again. That is, you have to patch the block or device driver to outportb(0x378, 255) again when something is supposed to spin up again. Oh and of course you have to deal with the problem that all userspace apps may hang because they are waiting for the disk. Also consider that frequently spinning up/down is said to reduce lifetime. Jan -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: power off disk drives while running 2007-08-18 21:09 ` Jan Engelhardt @ 2007-08-18 21:20 ` Brennan Ashton 2007-08-20 15:25 ` Phillip Susi 1 sibling, 0 replies; 7+ messages in thread From: Brennan Ashton @ 2007-08-18 21:20 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Robert Hancock, Marty Leisner, linux-kernel On 8/18/07, Jan Engelhardt <jengelh@computergmbh.de> wrote: > > On Aug 18 2007 14:22, Robert Hancock wrote: > >> I see this a a very important feature in the embedded system relm, I > >> have worked on two projects that required extreme power management, > >> and massive data storage. The ability to fully turn off a drive while > >> the system is running is key. It seems like this should be able to be > >> done from a kernel point of view rather than extra hardware. Although > >> if is not in the IDE/SATA spec then extra hardware would be necessary. > > > > You can put a drive into sleep mode with ATA commands, that one requires a > > reset to take it out of that state (as opposed to standby which spins down but > > will spin up on any command that's issued afterwards). That's as close as it > > gets to fully powering off a drive through software. > > An IDE reset bringing the disk up again -- that does not sound like > it is powered down. Power down for me means: as if the plug was pulled. > > > Well, you could also rewrite the standy ioctl to do this: > > - flush data > - send spindown request > - wait 1ms - 1s (give drive some time to park heads) > - outportb(0x378, 0) - poweroff by setting LPT data line to 0 > (who knows? they might control the disk power!) > > But you'd still have to fiddle with bringing it up again. That is, you have to > patch the block or device driver to outportb(0x378, 255) again when something > is supposed to spin up again. > > Oh and of course you have to deal with the problem that all userspace apps may > hang because they are waiting for the disk. > > Also consider that frequently spinning up/down is said to reduce lifetime. > > > Jan > -- > In my experience with embedded systems, usually the OS is residing in flash with all of the apps. The hard disks are used a storage. Example remote off grid high resolution time laps photography. the device itself is simple OS, web server, and image grabber all reside in flash 32MB or so. Then HDs are used to store the images and turn off completely at night and when disk is full. -- Brennan Ashton Bellingham, Washington "The box said, 'Requires Windows 98 or better'. So I installed Linux" ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: power off disk drives while running 2007-08-18 21:09 ` Jan Engelhardt 2007-08-18 21:20 ` Brennan Ashton @ 2007-08-20 15:25 ` Phillip Susi 1 sibling, 0 replies; 7+ messages in thread From: Phillip Susi @ 2007-08-20 15:25 UTC (permalink / raw) To: Jan Engelhardt Cc: Robert Hancock, Brennan Ashton, Marty Leisner, linux-kernel Jan Engelhardt wrote: > An IDE reset bringing the disk up again -- that does not sound like > it is powered down. Power down for me means: as if the plug was pulled. Reset means "power on, initialize power on state". While shutdown in this way, the drive has shut down and is not drawing any power. The reset is required to enable power flow into the drive again so it comes online. Essentially you have a transistor disconnecting the power inside the drive, and the reset pulse flips that transistor. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-20 15:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-18 16:08 power off disk drives while running Marty Leisner
2007-08-18 16:21 ` Jan Engelhardt
2007-08-18 19:21 ` Brennan Ashton
[not found] <fa.l/ISoqsJwIs1QBGVs0hodyygNPM@ifi.uio.no>
[not found] ` <fa.FVj1AVbAlk/6U33GB0rOY45WWqM@ifi.uio.no>
[not found] ` <fa.CQDcAiLY+yM/ENberToamsw+vFw@ifi.uio.no>
2007-08-18 20:22 ` Robert Hancock
2007-08-18 21:09 ` Jan Engelhardt
2007-08-18 21:20 ` Brennan Ashton
2007-08-20 15:25 ` Phillip Susi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®