linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Tejun Heo <htejun@gmail.com>
Cc: Miquel van Smoorenburg <miquels@cistron.nl>,
	Jeff Garzik <jeff@garzik.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Daniel Drake <dsd@gentoo.org>,
	Francesco Pretto <ceztko@gmail.com>,
	Chuck Ebbert <cebbert@redhat.com>,
	pkg-sysvinit-devel@lists.alioth.debian.org
Subject: Re: [Pkg-sysvinit-devel] [PATCH] libata: remove	libata.spindown_compat
Date: Sat, 19 May 2007 10:48:36 -0300	[thread overview]
Message-ID: <20070519134836.GA3750@khazad-dum.debian.net> (raw)
In-Reply-To: <464EDBFB.3050307@gmail.com>

On Sat, 19 May 2007, Tejun Heo wrote:
> > To fix this issue, halt(8) started issueing WIN_STANDBYNOW1 (0xE0) and
> > WIN_STANDBYNOW2 (0x94) ioctls before halt and poweroff, as that was more
> > reliable than "flush cache" and the effect was the same.
> 
> One culprit there is that, according to the spec, STANDBYNOW doesn't
> necessarily imply cache flush and AFAIK issuing STANDBYNOW to libata
> devices is to avoid emergency unload.  Can you comment on this Henrique?

Well, the reason I raised the ruckus in the first place was just the
emergency unload, yes.  I didn't know about any missing cache flushes (and
AFAIK we never had any reported to us).  We will have to fix that in halt(8)
IMHO, just in case.  And probably hdparm/sdparm should also know to not
standby or sleep disks without a cache flush, either.

I also don't know the history of halt(8), Miquel does... so I have not much
else to comment.

At least now it is clear what we need halt(8) to do (in Debian, anyway):

1. check if we have a responsible kernel or not through sysfs.

	1a: kernel is responsible, and can spin down disks at shutdown

		- if given -h on command line, use sysfs to tell kernel
		  to spin down *all* disk devices we can find in sysfs,
		  and don't send any taskfiles or IOCTLs to the disks.

	1b: kernel is missing this essential feature

		- keep doing what we are doing now, but issue a cache
		  flush before we send any standby commands.

2. push that to Debian unstable, and also to stable-proposed-updates, or at
the very least to backports.org.

This will give maximum compatibility with the kernel, and fix the
cache-not-flushed-before-spindown issue.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2007-05-19 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 14:43 [PATCH] libata: remove libata.spindown_compat Tejun Heo
2007-05-17 14:54 ` Tejun Heo
2007-05-18  0:58 ` Jeff Garzik
2007-05-19 11:06 ` Miquel van Smoorenburg
2007-05-19 11:14   ` [Pkg-sysvinit-devel] " Tejun Heo
2007-05-19 13:48     ` Henrique de Moraes Holschuh [this message]
2007-05-19 16:47       ` Tejun Heo

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=20070519134836.GA3750@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=cebbert@redhat.com \
    --cc=ceztko@gmail.com \
    --cc=dsd@gentoo.org \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=miquels@cistron.nl \
    --cc=pkg-sysvinit-devel@lists.alioth.debian.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).