public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: "Kristian Høgsberg" <krh@bitplanet.net>,
	linux1394-devel@lists.sourceforge.net,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] ieee1394: sbp2: lower block queue alignment requirement
Date: Mon, 15 Jan 2007 15:24:59 -0600	[thread overview]
Message-ID: <1168896299.7708.15.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <tkrat.8dad811bf4dbb360@s5r6.in-berlin.de>

On Mon, 2007-01-15 at 21:02 +0100, Stefan Richter wrote:
> > By the way, is there a way to ask the SCSI stack to limit the size of
> > the entries in the scatterlist to 64k?  This would greatly simplify
> > the conversion to SBP-2 page tables, since this is the maximum size
> > these can hold.
> 
> Douglas has a very informative text on this:
> http://sg.torque.net/sg/sg_io.html#mozTocId154063
> 
> | [...] since lk 2.6.16 another limit comes into play: the
> | MAX_SEGMENT_SIZE define which is set to 64 KB. MAX_SEGMENT_SIZE is a
> | default and can be overridden by the LLD calling
> | blk_queue_max_segment_size().
> 
> Looks like we can yank out some cruft off sbp2.

Actually, there's one unfortunate case where Linux won't respect this:
an IOMMU that can do virtual merging.  This parameter is a block queue
parameter, so block will happily make sure the request segments obey it.
However, when you get to dma_map_rq() it doesn't see the segment limits,
so, if the iommu merges, you can end up with SG elements the other side
that violate this.  I've been meaning to do something about this for
ages (IDE is the other subsystem that has an absolute requirement for a
fixed maximum segment size) but never found an excuse to fix it.

James



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

  reply	other threads:[~2007-01-15 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-14 18:45 [PATCH] ieee1394: sbp2: lower block queue alignment requirement Stefan Richter
2007-01-14 19:19 ` James Bottomley
2007-01-14 20:14   ` Stefan Richter
2007-01-15 19:39     ` Kristian Høgsberg
2007-01-15 19:50       ` Mike Christie
2007-01-15 20:02       ` Stefan Richter
2007-01-15 21:24         ` James Bottomley [this message]
2007-01-25 21:35   ` Stefan Richter
2007-02-04 12:04     ` [PATCH] ieee1394: sbp2: remove unnecessary alignments of struct members Stefan Richter
2007-02-04 12:05       ` [PATCH] ieee1394: sbp2: enforce 32bit DMA mapping Stefan Richter
2007-02-04 16:06         ` David Moore
2007-02-04 19:25           ` Stefan Richter

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=1168896299.7708.15.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=krh@bitplanet.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /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