All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Mark Lord <liml@rtr.ca>
Cc: Jeff Garzik <jgarzik@pobox.com>, Alan Cox <alan@redhat.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: Flush drive cache before issuing ATA_16 from userspace?
Date: Wed, 20 Aug 2008 13:08:38 +0900	[thread overview]
Message-ID: <48AB98C6.3040805@gmail.com> (raw)
In-Reply-To: <48AB43A9.3000003@rtr.ca>

Mark Lord wrote:
>> That's an IDENTIFY (0xEC) command timing out.
>> The hddtemp program does it's work by issuing IDENTIFY and SMART
>> commands to the target drive, /dev/sdb in this case.
>>
>>     ioctl(3, 0x30d, 0xbfd2c418)
>>     ioctl(3, 0x31f, 0xbfd2c60c)
>>     ioctl(3, 0x31f, 0xbfd2c614)
>>     ioctl(3, 0x31f, 0xbfd2c408)
>>
>> So that 0xEC most likely came from the hddtemp program,
>> since libata doesn't normally issue them after probing.
>>
>> So why is it timing out?  Well, these drives have 32MB onboard caches,
>> and I'm guessing that something (firmware, whatever) tries to empty that
>> cache before processing the issued IDENTIFY command.  And we time out
>> before the drive has a chance to actually process the IDENTIFY.
> ..
> 
> Another possibility could be some kind of bug in libata or ahci.c.
> It seems unlikely -- .qc_defer ought to prevent issues -- but I haven't
> really poked around in there.  And this is a "production" machine :)
> so we don't like to use it (much) for debugging kernels if we can help it.

Can you please hack up a program to issue IDENTIFY with different
timeouts and see when the condition triggers?

Thanks.

-- 
tejun

  reply	other threads:[~2008-08-20  4:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 13:41 Flush drive cache before issuing ATA_16 from userspace? Mark Lord
2008-08-19 16:38 ` Grant Grundler
2008-08-19 22:05 ` Mark Lord
2008-08-20  4:08   ` Tejun Heo [this message]
2008-08-21 22:02     ` Mark Lord

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=48AB98C6.3040805@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=liml@rtr.ca \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.