mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Brennan Ashton" <comphappy@gmail.com>
To: "Jan Engelhardt" <jengelh@computergmbh.de>
Cc: "Robert Hancock" <hancockr@shaw.ca>,
	"Marty Leisner" <leisner@rochester.rr.com>,
	linux-kernel@vger.kernel.org
Subject: Re: power off disk drives while running
Date: Sat, 18 Aug 2007 13:20:42 -0800	[thread overview]
Message-ID: <b2d05de20708181420x1dab449ch97e59487a4fff12a@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0708182305220.5186@fbirervta.pbzchgretzou.qr>

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"

  reply	other threads:[~2007-08-18 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2007-08-20 15:25         ` Phillip Susi
2007-08-18 16:08 Marty Leisner
2007-08-18 16:21 ` Jan Engelhardt
2007-08-18 19:21   ` Brennan Ashton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2d05de20708181420x1dab449ch97e59487a4fff12a@mail.gmail.com \
    --to=comphappy@gmail.com \
    --cc=hancockr@shaw.ca \
    --cc=jengelh@computergmbh.de \
    --cc=leisner@rochester.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®