Re: Fixing halt/shutdown for libata spindown handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux