All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/6] libata: Do not retry commands with valid autosense
Date: Mon, 03 Aug 2015 20:21:19 +0200	[thread overview]
Message-ID: <55BFB11F.30309@suse.de> (raw)
In-Reply-To: <20150803170159.GB24594@mtj.duckdns.org>

On 08/03/2015 07:01 PM, Tejun Heo wrote:
> Hello, Hannes.
> 
> On Mon, Aug 03, 2015 at 06:47:46PM +0200, Hannes Reinecke wrote:
>> At the moment NCQ autosense is mostly used to provide the host with more
>> details for a failed I/O. The typical case here is (no small surprise)
>> ZAC disks, which use autosense to inform the host about
>> a malformed I/O.
>>
>> It is _not_ being used as a replacement for existing error behaviour,
>> (ie link errors are not being signalled with that; how could they
>> if there is no link?); in fact, during testing I"ve seen both, autosense
> 
> Hmmm?  Devices can report link error via TF bits and you're bypassing
> TF analysis completley if sense data is present.
> 
But sense data will never be present for a link error ... and I'm not
disabling that.

>> I/O failures and normal I/O failures for which autosense is
>> not set, and the normal error handling kicks in.
>>
>> It's not that I've disable the original error handler completely,
>> it's only bypassed for I/O failure where a sense code is provided.
>> And the drive surely knows which error occurs, so we'd be daft not be
>> using that.
> 
> The patches are altering EH actions in a very subtle way depending on
> *how* an error is reported, not *what* is reported, which is a pretty
> silly thing to do.  It makes things a lot more confusing to follow and
> predict.  I really don't think this is an acceptable behavior.
> 
But if we were judging on _what_ is being reported we would have to know
which  sense code the drive will be reporting, in effect carrying
a massive table of possible sense codes, and map this to the actions.
Do you really want to go that way?

>> So I think disabling autosense completely is a bit extreme...
> 
> Please restructure the feature so that it doesn't interfere with the
> usual EH behavior.  e.g. leave the EH actions alone unless explicitly
> necessary but report detailed error information upwards.  If the extra
> error information can be helpful in determining what EH actions to
> take, factoring in that information can be helpful too but I'm not too
> convinced that'd make a huge difference.
> 
It does if we can avoid the retry on the libata layer.

> Also, please consider that ATA_QCFLAG_SENSE_VALID handling assumes
> that the reporting device is an ATAPI device and the command in
> question is not a regular IO one.  That's why EH ignores AC_ERR_DEV or
> AC_ERR_OTHER if ATA_QCFLAG_SENSE_VALID is set.  This doesn't work out
> for the new ATA usage at all.
> 
I've just mapped onto ATA_QCFLAGS_SENSE_VALID as I've found this to
reasonably close to what I've been needing.
If that's the wrong choice of course I can modify this.

> For now, I've reverted the changes as this is actively detrimental.
> 
Oh. So you've tested this on a device with autosense enabled?
I haven't seen any negative effects with this patchset, autosense
enabled or not.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-08-03 18:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 13:02 [PATCH 0/6] ZAC host-aware device support Hannes Reinecke
2015-07-31 13:02 ` [PATCH 1/6] libata: Do not retry commands with valid autosense Hannes Reinecke
2015-08-02 15:44   ` Tejun Heo
2015-08-03  7:31     ` Hannes Reinecke
2015-08-03 15:04       ` Tejun Heo
2015-08-03 15:16         ` [PATCH libata/for-4.2-fixes] libata: disable NCQ autosense Tejun Heo
2015-08-03 15:39           ` Tejun Heo
2015-08-03 15:18         ` [PATCH 1/6] libata: Do not retry commands with valid autosense Tejun Heo
2015-08-03 15:42           ` James Bottomley
2015-08-03 15:55             ` Tejun Heo
2015-08-03 16:44               ` James Bottomley
2015-08-03 16:50                 ` Tejun Heo
2015-08-03 16:47               ` Hannes Reinecke
2015-08-03 17:01                 ` Tejun Heo
2015-08-03 18:21                   ` Hannes Reinecke [this message]
2015-07-31 13:02 ` [PATCH 2/6] libata-scsi: use ata_scsi_set_sense when generating ATA sense Hannes Reinecke
2015-07-31 13:02 ` [PATCH 3/6] libata: implement ZBC IN translation Hannes Reinecke
2015-07-31 13:02 ` [PATCH 4/6] libata: Implement ZBC OUT translation Hannes Reinecke
2015-07-31 13:02 ` [PATCH 5/6] libata: support device-managed ZAC devices Hannes Reinecke
2015-07-31 13:02 ` [PATCH 6/6] libata: support host-aware " Hannes Reinecke
2015-08-02 15:47 ` [PATCH 0/6] ZAC host-aware device support Tejun Heo
2015-08-02 16:11 ` James Bottomley
2015-08-03  7:24   ` Hannes Reinecke
2015-08-03 15:31     ` James Bottomley

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=55BFB11F.30309@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tj@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.