public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Martin Dalecki <dalecki@evision-ventures.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] queue barrier support
Date: Wed, 13 Feb 2002 15:41:41 +0100	[thread overview]
Message-ID: <20020213154141.N1907@suse.de> (raw)
In-Reply-To: <20020213135134.A1907@suse.de> <3C6A6571.7070707@evision-ventures.com> <20020213141306.F1907@suse.de> <3C6A7A07.8000405@evision-ventures.com>
In-Reply-To: <3C6A7A07.8000405@evision-ventures.com>

On Wed, Feb 13 2002, Martin Dalecki wrote:
> >On Wed, Feb 13 2002, Martin Dalecki wrote:
> >
> >>Jens Axboe wrote:
> >>
> >>>Patches attached, comments welcome.
> >>>
> >>>diff -Nru a/include/linux/ide.h b/include/linux/ide.h
> >>>--- a/include/linux/ide.h	Wed Feb 13 13:48:25 2002
> >>>+++ b/include/linux/ide.h	Wed Feb 13 13:48:25 2002
> >>>@@ -448,6 +448,7 @@
> >>>	byte		acoustic;	/* acoustic management */
> >>>	unsigned int	failures;	/* current failure count */
> >>>	unsigned int	max_failures;	/* maximum allowed failure count */
> >>>+	char		special_buf[4];	/* IDE_DRIVE_CMD, free use */
> >>>} ide_drive_t;
> >>>
> >>ide-barrier-1-c1.296:+  memset(drive->special_buf, 0, 
> >>sizeof(drive->special_buf));
> >>ide-barrier-1-c1.296:+  flush_rq->buffer = drive->special_buf;
> >>ide-barrier-1-c1.296:+  char            special_buf[4]; /* 
> >>IDE_DRIVE_CMD, free use */
> >>
> >>I just don't see special_buf used anywhere. What is it supposed to be 
> >>used for?
> >>Is the intention to make it look like the SCSI code?
> >>
> >
> >See ide.c:ide_queue_flush_cmd(), I'm only using 1 of the bytes but it
> >has room for 4 like that is typically used when issuing an ata command
> >directly. So yes, it is used, I'm not adding stuff for fun :-)
> >
> 
> OK I see now. Is this to become analogous to the sr_cmnd field for 
> struct scsi_request?
> It would make sense to first make them use the same software 
> architecture at least and then
> to merge as much of this driver mid-layer stuff as possible....

Well dunno, typically users of IDE_DRIVE_CMD's are using ide_wait and
thus waits for completion. So request and arguments are almost always
allocated on the stack, which is fine in that case. For out-of-order
execution like the pre and post flushes in the barrier patch, there just
needed to be some bytes available for the data command.

The SCSI sr_cmnd[] cdb is different from the ATA register set, but in
fact in 2.5 the IDE layer could use the cdb in struct request as a temp
buffer for stuff like this. It's exactly what the ide-barrier patch
above could use. So yeah I could clean special_buf[] and just use

	rq->buffer = rq->cmd;

instead.

-- 
Jens Axboe


  reply	other threads:[~2002-02-13 14:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-13 12:51 [PATCH] queue barrier support Jens Axboe
2002-02-13 13:09 ` Martin Dalecki
2002-02-13 13:13   ` Jens Axboe
2002-02-13 14:36     ` Martin Dalecki
2002-02-13 14:41       ` Jens Axboe [this message]
2002-02-13 14:51 ` Daniel Phillips
2002-02-13 15:18   ` Jens Axboe
2002-02-13 17:47     ` Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
2002-02-13 18:26 James Bottomley
2002-02-15  9:02 ` Jens Axboe
2002-02-15 15:15   ` James Bottomley
2002-02-15 16:28     ` Chris Mason
2002-02-15 16:51       ` James Bottomley
2002-02-15 17:17         ` Chris Mason
2002-02-15 17:48           ` James Bottomley
2002-02-15 22:30         ` Matthias Andree
2002-02-15 17:09       ` James Bottomley
2002-02-15 16:43     ` Mike Anderson
2002-02-15 13:41 ` Chris Mason
2002-02-16 10:20 ` Daniel Phillips
2002-02-16 15:02   ` 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=20020213154141.N1907@suse.de \
    --to=axboe@suse.de \
    --cc=dalecki@evision-ventures.com \
    --cc=linux-kernel@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