From: Mike Christie <michaelc@cs.wisc.edu>
To: linux-scsi@vger.kernel.org, promise_linux@promise.com,
david.somayajulu@qlogic.com
Subject: Re: [PATCH 1/3] scsi: fix shared tag map setup
Date: Fri, 11 Jul 2008 15:58:26 -0500 [thread overview]
Message-ID: <4877C972.9070706@cs.wisc.edu> (raw)
In-Reply-To: <1214721027-32426-2-git-send-email-michaelc@cs.wisc.edu>
michaelc@cs.wisc.edu wrote:
> From: Mike Christie <michaelc@cs.wisc.edu>
>
> Currently qla4xxx and stex pass in their can_queue values into
> scsi_activate_tcq because they wanted the tag map that large.
> The problem with this is that it ends up also setting the queue
> depth to that large value. All we want to do this in this case
> is set the device queue depth and the other device settings.
> We do not need to touch the tag map sizing because the drivers
> had setup that map according to their can_queue limits when the
> shared map was created.
>
> The scsi mid layer in request_fn will then handle the case where we
> have more requests than available tags when it checks the host
> queue ready function.
>
Actually, I think this code needs one more fix to scsi_request_fn.
If we hit this in scsi_request_fn:
if (!(blk_queue_tagged(q) && !blk_queue_start_tag(q, req)))
blkdev_dequeue_request(req);
blk_queue_tagged would be 1. blk_queue_start_tag could return 1 if we
have too many commands. And then we will accidentally dequeue the
request, and when we get to the host queue ready function, we could have
raced with a completion which would have decreased the host_busy and so
the command will be queued to the driver without a tag.
I will reroll these patches and add a fix to request_fn for this other
problem and resend it all in one patchset.
prev parent reply other threads:[~2008-07-11 20:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-29 6:30 scsi tcq fixes for 2.6.27 michaelc
2008-06-29 6:30 ` [PATCH 1/3] scsi: fix shared tag map setup michaelc
2008-06-29 6:30 ` [PATCH 2/3] qla4xxx: fix queue depth setting michaelc
2008-06-29 6:30 ` [PATCH 3/3] stex: " michaelc
2008-07-11 20:58 ` Mike Christie [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=4877C972.9070706@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=david.somayajulu@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=promise_linux@promise.com \
/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