public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Cc: Boaz Harrosh <bharrosh@panasas.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [patchset 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
Date: Mon, 10 Sep 2007 12:09:32 -0500	[thread overview]
Message-ID: <1189444172.12245.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20070910170334.GA12369@one-eyed-alien.net>

On Mon, 2007-09-10 at 10:03 -0700, Matthew Dharm wrote:
> On Mon, Sep 10, 2007 at 05:11:23PM +0300, Boaz Harrosh wrote:
> > 
> > In motivation to abstract scsi_cmnd members and insulate
> > drivers/transports from scsi_cmnd internals. The last
> > place left was the REQUEST_SENSE sequence when done
> > synchronous, by drivers.
> 
> This probably isn't serious, but I noticed one thing (beyond what Alan's
> analysis noted)...
> 
> I've always assumed that the scatterlist structs passed to an HCD were,
> themselves, allocated from DMA-able memory.  That is, not just the transfer
> buffers themselves, but the struct scatterlist also.

They are, but this is an artifact of the command allocation.  Commands
(as in the 6, 10 12 or 16 bytes of command sequence) are designed to be
DMAable, meaning that everything that makes up a struct scsi_cmnd is
automatically DMAable.  However, the design is for the dma_mapped
scatterlist to be converted to a form the underlying HBA can use.  I
don't currently know of any HBA whose descriptor format matches those of
struct scatterlist, so I don't think there'll be any impact to putting
the scatterlist in memory that might not be DMAable by the HBA.

> In this implementation, the struct scatterlist used for the single-element
> transfer of the request sense buffer is part of the
> struct scsi_eh_save_cmnd_info, which is allocated on the stack (for at
> least usb-storage).  And, stack isn't DMA-able on all arches.
> 
> It is not a problem for usb-storage, since the struct scatterlists are
> processed in code into a series of URBs, so nobody actually does DMA the
> scatterlist structures.  However, I don't know enough about the other HCDs
> to be certain about them.

James



      reply	other threads:[~2007-09-10 17:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 14:11 [patchset 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 14:21 ` [PATCH 1/5] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd() Boaz Harrosh
2007-09-10 14:23 ` [PATCH 2/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 15:12   ` Christoph Hellwig
2007-09-10 15:19   ` Randy Dunlap
2007-09-10 14:25 ` [PATCH 3/5] usb: transport.c use scsi_eh API in REQUEST_SENSE execution Boaz Harrosh
2007-09-10 14:25 ` [PATCH 4/5] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation Boaz Harrosh
2007-09-10 14:29 ` [PATCH 5/5] arm: fas216 " Boaz Harrosh
2007-09-10 15:58 ` [patchset 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Alan Stern
2007-09-10 17:03 ` Matthew Dharm
2007-09-10 17:09   ` James Bottomley [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=1189444172.12245.7.camel@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=bharrosh@panasas.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdharm-scsi@one-eyed-alien.net \
    --cc=stern@rowland.harvard.edu \
    /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