public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Anton Blanchard <anton@samba.org>
Cc: Jens Axboe <axboe@suse.de>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: PATCH [5/15] qla2xxx:  SG tablesize update
Date: 14 Mar 2004 10:31:15 -0500	[thread overview]
Message-ID: <1079278279.2022.34.camel@mulgrave> (raw)
In-Reply-To: <20040314151809.GG19737@krispykreme>

On Sun, 2004-03-14 at 10:18, Anton Blanchard wrote:
> With 2.6.3 on a ppc64 box connected to a shark with 8 LUNs I could
> easily consume all the request slots on the card. At this point we spent
> > 50% of the cpu bouncing into qla2x00_start_scsi, doing a pci_map_sg
> realising it wont fit and doing a pci_unmap_sg.

Well, since the pool is fixed size, can't the driver do some rule of
thumb check before it actually gets to the map_sg (perhaps even
pre-reserve the slots before mapping)?

> As Andrew points out, the driver shouldnt be doing this constant
> map/unmap stuff, but is there some way for a scsi device driver to tell
> the layers above it to temporarily leave it alone?

Mappings can be very limited in certain machines.  I really don't think
we want precious mapping resources sitting in an issue queue in the
mid-layer just because the qla driver couldn't manage them efficiently.

The layering rules say that the driver is responsible for getting the
IOMMU resources with dma_map_sg before it places the I/O in-flight and
should free them ASAP after the I/O returns.

All drivers have to manage their issue slots efficiently.  It really
sounds like the root cause of this problem is mapping too early.

If you think you don't know how many resource slots you'll need, that's
in scsi_cmnd->request->nr_hw_segments (give or take, this is always
guaranteed to be at or over the actual number dma_map_sg eventually
returns).  So: fix the qlogic mapping routines.

James



  reply	other threads:[~2004-03-14 15:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-14  8:24 PATCH [5/15] qla2xxx: SG tablesize update Andrew Vasquez
2004-03-14 14:49 ` James Bottomley
2004-03-14 14:51   ` Jens Axboe
2004-03-14 14:59     ` James Bottomley
2004-03-14 15:15       ` Jens Axboe
2004-03-14 15:18       ` Anton Blanchard
2004-03-14 15:31         ` James Bottomley [this message]
2004-03-14 15:47           ` Anton Blanchard
2004-03-14 15:55             ` James Bottomley
2004-03-14 16:01               ` Anton Blanchard
2004-03-14 20:41             ` Jeff Garzik
2004-03-14 22:27               ` James Bottomley
2004-03-15 16:12                 ` Jeff Garzik
2004-03-14 20:36       ` Jeff Garzik
2004-03-14 22:31         ` James Bottomley
2004-03-15 16:09           ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-03-15 23:43 Andrew Vasquez
2004-03-16  3:37 ` James Bottomley
2004-03-16  6:40 ` Jeremy Higdon
2004-03-16 11:32 ` Anton Blanchard
2004-03-16 21:49 ` James Bottomley
2004-03-16 22:09 Andrew Vasquez

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=1079278279.2022.34.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=anton@samba.org \
    --cc=axboe@suse.de \
    --cc=linux-scsi@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