linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [RFC] current libata eh doc
Date: Wed, 07 Sep 2005 21:21:37 +0900	[thread overview]
Message-ID: <431EDB51.1040300@gmail.com> (raw)
In-Reply-To: <431ED51F.2020201@pobox.com>

Jeff Garzik wrote:
> Tejun Heo wrote:
> 
>> Jeff Garzik wrote:
>>
>>> I would note that ->complete_fn() is the asynchronous path, and 
>>> qc->waiting is the synchronous (sleeping in process context) path.
> 
> 
>>  Okay.  One question though.  Is it necessary to keep these two 
>> separate?  qc->waiting can easily be implemented in terms of 
>> ->complete_fn() if we add a void *udata argument to it.  Is there any 
>> design consideration I'm not aware of?
> 
> 
> 
> Synchronous usage (use of qc->waiting) is common and growing more 
> common, so it seemed expedient to put 'waiting' in the data structure. I 
> also thought it might be nice to have the completion occur after the 
> ->complete_fn() callback and tag poisoning occurred.
> 
> Certainly qc->waiting can be implemented in terms of ->complete_fn(). 
> But unless unseen elegance (or bug fixes) will result, I'm not terribly 
> inclined to change it.
> 

  The problem with qc->waiting is that it currently doesn't have anyway 
to pass command result when waking up the issuer.  We currently do this 
by reading ATA registers from the issuer after being woken up.  This is 
fine for EH, but, for multi-qc translation, this can be done but is a 
bit cumbersome.

  Also, we're gonna need to pass more information when a command fails 
if advanced EH is implemented.  We can add an extra per-qc/device error 
descriptor to be used by synchrnous completion, but these can be done 
much elegantly with ->complete_fn() w/ an opaqueue pointer.

-- 
tejun

      reply	other threads:[~2005-09-07 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-28  2:40 [RFC] current libata eh doc Tejun Heo
2005-09-07  8:17 ` Jeff Garzik
2005-09-07 11:39   ` Tejun Heo
2005-09-07 11:55     ` Jeff Garzik
2005-09-07 12:21       ` Tejun Heo [this message]

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=431EDB51.1040300@gmail.com \
    --to=htejun@gmail.com \
    --cc=albertcc@tw.ibm.com \
    --cc=jgarzik@pobox.com \
    --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).