linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Daniel Drake <dsd@gentoo.org>
Cc: linux-ide@vger.kernel.org
Subject: Re: Fixing halt/shutdown for libata spindown handling
Date: Tue, 15 May 2007 10:20:23 +0200	[thread overview]
Message-ID: <46496D47.9010504@gmail.com> (raw)
In-Reply-To: <46492931.4080700@gentoo.org>

Hello, Daniel.

Daniel Drake wrote:
> I was surprised to find that the /sbin/halt spin down implementation is
> very limited, it only works for IDE disks (by working through
> /proc/ide). This doesn't make sense to me, the libata commits state that
> userspace shutdown is spinning down libata disks.
> 
> So, this means that other distro's do it differently? I'd appreciate
> some pointers to what happens elsewhere.

Debian (and thus probably ubuntu) issues STADNBYNOW without FLUSH.
Opensuse doesn't seem to do anything and there's another distro which
does both, not sure which tho.  Hmm... If the upstream sysvinit code
doesn't contain spindown code, it's more likely we have more distros
which don't do anything.  If that's the case, it will be worthwhile to
detect that STANDBYNOW isn't issued and skip compat checking and just do
it.  I'll come up with a patch, please wait a bit before releasing the
update.

[--snip--]
> If I'm right and Gentoo is currently not spinning down SCSI/libata
> disks, the only /sbin/halt modification required is to write 0 into
> /sys/modules/libata/parameters/spindown_compat right?

Yes, that will make all kernels from now on behave correctly, but doing
FLUSH CACHE followed by STANDBYNOW on older kernels (kernels without
manage_start_stop) would help.

> Final question: should spindown_compat be set to 0 for both shutdown and
> reboot, or just shutdown?

It doesn't really matter.  It just needs to be set while powering down.
 You can set it anywhere, during boot, in shutdown.

Thanks.

-- 
tejun

  reply	other threads:[~2007-05-15  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15  3:29 Fixing halt/shutdown for libata spindown handling Daniel Drake
2007-05-15  8:20 ` Tejun Heo [this message]
2007-05-15 10:31   ` Francesco Pretto
2007-05-15 10:42     ` Tejun Heo
2007-05-17  1:16   ` Daniel Drake
2007-05-17 15:27     ` Tejun Heo
2007-05-29 22:42       ` Daniel Drake

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=46496D47.9010504@gmail.com \
    --to=htejun@gmail.com \
    --cc=dsd@gentoo.org \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).