All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [Fwd: [RFT] major libata update]
Date: Thu, 18 May 2006 09:21:35 +0200	[thread overview]
Message-ID: <20060518072134.GX4197@suse.de> (raw)
In-Reply-To: <446B9C88.4030005@garzik.org>

On Wed, May 17 2006, Jeff Garzik wrote:
> Jens Axboe wrote:
> >I think we have a different opinion on what 'optional' is then - because
> >things can certainly work just fine the way they current do. And it's
> >faster, too.
> >
> >>infrastructure, you inevitably wind up with the following code pattern:
> >>
> >>	infrastructure code
> >>	send fully prepared request to hardware
> >>	infrastructure code
> >
> >But yes, you can make the code nicer for _some_ things with a
> >->queueone() type setup.
> 
> That ->queueone() maps the closest to what most hardware appears to 
> want: "attempt to push request onto an async hardware queue".
> 
> It also enables additional entry points for returning 'device busy' or 
> (in SCSI lingo) 'host busy'.  The ability to signal and handle random 
> transient conditions like that when hardware resources disappear is easy 
> to overlook, but its really powerful.

'queue a request' is certainly how most hardware works. The fact is that
->queueone() doesn't enable _anything_ that you cannot already do. In
fact it takes information _away_ from you, since you can no longer peek
at the queue and see if there's one more there for you to issue. The
only selling point for ->queueone() is that it makes it more logical to
structure the code layout for handling the issue.

Which is why I never added this helper. From the block layer
perspective, the driver can only really tell you three things:

- request issued, give me another one
- request not issued, transient error (meaning, call me with this
  request again in the future).
- request not issued, permanent error. kill this request.

A ->queueone() setup deals with returning the right issue error code, a
->queuemany() setup deals with calling the right function for the
condition.

-- 
Jens Axboe


  reply	other threads:[~2006-05-18  7:20 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-15 17:08 [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 14:18 ` James Bottomley
2006-05-16 15:41   ` Jeff Garzik
2006-05-16 15:51     ` James Bottomley
2006-05-16 16:06       ` Jeff Garzik
2006-05-16 16:30         ` James Bottomley
2006-05-16 16:39           ` Jeff Garzik
2006-05-16 21:55             ` Luben Tuikov
2006-05-16 21:32           ` Luben Tuikov
2006-05-16 16:08       ` Tejun Heo
2006-05-16 16:13         ` Tejun Heo
2006-05-16 16:29         ` James Bottomley
2006-05-16 16:37           ` Jeff Garzik
2006-05-16 16:39           ` Tejun Heo
2006-05-16 16:50             ` James Bottomley
2006-05-16 17:07               ` Tejun Heo
2006-05-16 17:09                 ` Jeff Garzik
2006-05-16 19:58                 ` Christoph Hellwig
2006-05-16 20:02                   ` Jeff Garzik
2006-05-16 21:28                   ` James Bottomley
2006-05-18  3:27                     ` Tejun Heo
2006-05-19 12:07                       ` [PATCH] SCSI: make scsi_implement_eh() generic API for SCSI transports Tejun Heo
2006-05-16 16:12       ` [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 16:38         ` James Bottomley
2006-05-16 16:57           ` Jeff Garzik
2006-05-17  7:37             ` Jens Axboe
2006-05-17 15:06               ` Jeff Garzik
2006-05-17 15:50                 ` James Bottomley
2006-05-17 15:58                   ` James Smart
2006-05-17 16:17                   ` Jeff Garzik
2006-05-17 17:53                     ` James Bottomley
2006-05-17 22:08                       ` Jeff Garzik
2006-05-17 22:15                         ` Jeff Garzik
2006-05-17 17:47                   ` Linus Torvalds
2006-05-17 17:55                     ` Jens Axboe
2006-05-17 22:04                       ` Linus Torvalds
2006-05-17 22:12                         ` Jeff Garzik
2006-05-17 21:41                     ` Jeff Garzik
2006-05-17 21:52                     ` Douglas Gilbert
2006-05-17 22:20                       ` Linus Torvalds
2006-05-18  3:04                     ` Luben Tuikov
2006-05-17 16:05                 ` Douglas Gilbert
2006-05-17 17:37                 ` Jens Axboe
2006-05-17 21:58                   ` Jeff Garzik
2006-05-18  7:21                     ` Jens Axboe [this message]
2006-05-16 18:28       ` Luben Tuikov
2006-05-16 18:15     ` Luben Tuikov
2006-05-16 18:05   ` Luben Tuikov
2006-05-16 18:38     ` James Bottomley
2006-05-16 22:24       ` Luben Tuikov
2006-05-16 22:29         ` James Bottomley
2006-05-16 23:02           ` Luben Tuikov
2006-05-16 23:12             ` James Bottomley
2006-05-17  0:25               ` Luben Tuikov
2006-05-17 14:09                 ` James Bottomley
2006-05-18  2:39                   ` Luben Tuikov
2006-05-18 13:57                     ` James Bottomley
2006-05-19  3:28                       ` Luben Tuikov
2006-05-17 14:02               ` missed patch: Block I/O while SG reset operation in progress James Smart

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=20060518072134.GX4197@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@osdl.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.