linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Mark Lord <liml@rtr.ca>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables
Date: Thu, 31 Jan 2008 12:23:20 +0900	[thread overview]
Message-ID: <47A13F28.7050001@gmail.com> (raw)
In-Reply-To: <47A0C8AB.9050505@rtr.ca>

Mark Lord wrote:
>> So, I'm not sure its worth the latency penalty...  at least as turned
>> on by default.
> ..
> 
> I agree.  It should default to off, and perhaps have some /sys/ attributes
> to enable/tune it.  Or something like that.

Eeeek.. :-)

> The theoretical value is apparently for situations like writing to RAID1.
> The write isn't really "complete" until all drives ACK it,
> so with IRQ coalescing it may behave more like NAPI than one I/O per IRQ.
> And NAPI is apparently a win under heavy load for network, so.. we'll see.
> 
> The vendor wants it in the driver, and I think it will be good to have it
> there so we can play with and tune it -- to find out for real whether it
> has
> worthwhile value or not.  But yes, the default should be "off", I think.

I'm skeptical about the benefit of IRQ coalescing on storage
controllers.  Coalescing improves performance when there are many small
requests to complete and if you put a lot of small non-consecutive
requests to a disk, it gets really really really slow and IRQ coalescing
just doesn't matter at all.  The only way to achieve high number of
completions is to issue small commands to consecutive addresses which is
just silly.  In storage, high volume transfer is achieved through
request coalescing not completion coalescing and this is true for even SDDs.

>>>  -- Target Mode support (interfaces yet to be defined)
>>
>> I would assume this would be along the lines of the SCSI target mode
>> stuff.
> ..
> 
> Ah, now there's a starting point.  Thanks.

It would be great if we can make a cheap SATA analyzer out of it.

>>>  -- TCQ support: would be good in general for libata on smart hosts,
>>>      but I'm not sure of the impact on libata EH processing.
>>
>> Agreed, it would be nice to support host queueing controllers.
>>
>> However, specifically for TCQ, it was rather poorly conceived.  For
>> most controllers (mv, broadcom/svw, others) an error will stop the DMA
>> engine, and you perform recovery in software.  All well and good, but
>> figuring out all the states possible during recovery is non-trivial (I
>> looked into it years ago).  Its just messy.
> ..
> 
> So is NCQ EH, but we manage it.  I wonder how similar (or not) the two are?

How many devices with working TCQ support are out there?  Early raptors?
 If the controller handles all that releasing and state transitions, I
think is shouldn't be too difficult.  You'll probably need to add TCQ
support to ata_eh_autopsy or roll your own autopsy function but that
should be about it for EH.  Heck, just freezing on any sign of problem
and let EH reset the drive and retry should work for most of the cases
although things like media errors won't be reported properly.

> I've done host-based TCQ several times now, and EH can be as simple as:
> 
> "when something goes wrong, just reset everything, and then re-issue the
> commands one at a time, doing per-command EH normally.  Then resume TCQ."
> 
> That's dumb, but works extremely reliably.

Oh, you were thinking the same thing. :-) It can be made more reliable
by simply falling back to non-TCQ if error repeats itself.  e.g. Media
error -> TCQ freeze -> reset -> media error -> TCQ freeze -> reset and
turn off TCQ -> media error gets handled and reported.  It isn't pretty
but should work for initial implementation.

Thanks.

-- 
tejun

  reply	other threads:[~2008-01-31  3:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 23:28 [PATCH 01/13] sata_mv ncq EH fixes Mark Lord
2008-01-26 23:30 ` [PATCH 02/13] sata_mv ncq Mask transient IRQs Mark Lord
2008-01-26 23:31 ` [PATCH 03/13] sata_mv ncq Rename base to port mmio Mark Lord
2008-01-26 23:31 ` [PATCH 04/13] sata_mv ncq Fix EDMA configuration Mark Lord
2008-01-26 23:31 ` [PATCH 05/13] sata_mv ncq Add want ncq parameter for " Mark Lord
2008-01-26 23:31 ` [PATCH 06/13] sata_mv ncq Use hqtag instead of ioid Mark Lord
2008-01-26 23:32 ` [PATCH 07/13] sata_mv ncq Ignore response status LSB on NCQ Mark Lord
2008-01-26 23:32 ` [PATCH 08/13] sata_mv ncq Restrict max sectors to 8-bits on GenII NCQ Mark Lord
2008-01-26 23:32 ` [PATCH 09/13] sata_mv ncq Use DMA memory pools for hardware memory tables Mark Lord
2008-01-29 17:10   ` Jeff Garzik
2008-01-29 18:24     ` Mark Lord
2008-01-30  9:54       ` Jeff Garzik
2008-01-30 16:40         ` Mark Lord
2008-01-30 17:08           ` Jeff Garzik
2008-01-30 17:19             ` Mark Lord
2008-01-30 17:45               ` Jeff Garzik
2008-01-30 18:57                 ` Mark Lord
2008-01-31  3:23                   ` Tejun Heo [this message]
2008-01-31  3:31                     ` Tejun Heo
2008-01-31  3:59                     ` Mark Lord
2008-01-31  9:00                       ` Mikael Pettersson
2008-01-26 23:32 ` [PATCH 10/13] sata_mv ncq Introduce per-tag SG tables Mark Lord
2008-01-30  9:50   ` Jeff Garzik
2008-01-26 23:33 ` [PATCH 11/13] sata_mv ncq Enable NCQ operation Mark Lord
2008-01-26 23:33 ` [PATCH 12/13] sata_mv ncq Remove post internal cmd op Mark Lord
2008-01-26 23:33 ` [PATCH 13/13] sata_mv ncq Comments and version bump 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=47A13F28.7050001@gmail.com \
    --to=htejun@gmail.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 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).