From: Patrick Mansfield <patmans@us.ibm.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] 2.5 current bk fix setting scsi queue depths
Date: Wed, 30 Oct 2002 10:05:34 -0800 [thread overview]
Message-ID: <20021030100534.A12400@eng2.beaverton.ibm.com> (raw)
In-Reply-To: <200210301717.g9UHHs902706@localhost.localdomain>; from James.Bottomley@steeleye.com on Wed, Oct 30, 2002 at 11:17:52AM -0600
On Wed, Oct 30, 2002 at 11:17:52AM -0600, James Bottomley wrote:
> patmans@us.ibm.com said:
> > This patch fixes a problem with the current linus bk tree setting scsi
> > queue depths to 1. Please apply.
>
> This patch causes the depth specification to be retained when we release
> commandblocks. Since releasing command blocks is supposed only to be done
> when we give up the device (and therefore, is supposed to clear everything),
> your fix looks like it's merely masking a problem, not fixing it.
>
> Is the real problem that this controller is getting a release command blocks
> and then a reallocate of them after slave_attach is called? If so, that's
> probably what needs to be fixed.
>
> James
Yes, the problem is that in scsi_register_host() if there are no upper
level drivers - the standard case if building no modules - we call
scsi_release_commandblocks even though we are NOT getting rid of
the scsi_device. So, with current code, new_queue_depth and
current_queue_depth are zero.
When we register upper level drivers in scsi_register_device(), we
call scsi_build_commandblocks (again), and get a queue depth of 1,
since we've cleared new_queue_depth.
(In many cases, for one device we call build command blocks twice, call
release command blocks, and then build command blocks again. Yuck)
Removing the scsi_release_commandblocks() in scsi_register_host()
would also fix the problem, and in most cases, would not waste any
space. In the worst case AFAICT it would waste one scsi_cmnd (about 300
or so bytes?).
I see no good reason to zero new_queue_depth in scsi_release_commandblocks,
as new_queue_depth is the desired queue depth, and should remain so until
scsi_adjust_queue_depth is called. Setting new_queue_depth to zero means
we have to call slave_attach again to set it right, and depending on what
else an adapter slave_attach does could be very wrong.
-- Patrick Mansfield
next prev parent reply other threads:[~2002-10-30 17:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <patmans@us.ibm.com>
2002-10-30 16:58 ` Patrick Mansfield
2002-10-30 17:17 ` James Bottomley
2002-10-30 18:05 ` Patrick Mansfield [this message]
2002-10-31 0:44 ` James Bottomley
2002-09-09 14:57 [RFC] Multi-path IO in 2.5/2.6 ? James Bottomley
2002-09-09 16:56 ` Patrick Mansfield
2002-09-09 17:34 ` James Bottomley
2002-09-09 18:40 ` Mike Anderson
2002-09-10 13:02 ` Lars Marowsky-Bree
2002-09-10 16:03 ` Patrick Mansfield
2002-09-10 16:27 ` Mike Anderson
2002-09-10 0:08 ` Patrick Mansfield
2002-09-10 7:55 ` Jeremy Higdon
2002-09-10 13:04 ` Lars Marowsky-Bree
2002-09-10 16:20 ` Patrick Mansfield
2002-09-10 13:16 ` Lars Marowsky-Bree
2002-09-10 19:26 ` Patrick Mansfield
2002-09-11 14:20 ` James Bottomley
2002-09-11 19:17 ` Lars Marowsky-Bree
2002-09-11 19:37 ` James Bottomley
2002-09-11 19:52 ` Lars Marowsky-Bree
2002-09-12 1:15 ` Bernd Eckenfels
2002-09-11 21:38 ` Oliver Xymoron
2002-09-11 20:30 ` Doug Ledford
2002-09-11 21:17 ` Mike Anderson
2002-09-10 17:21 ` Patrick Mochel
2002-09-10 18:42 ` Patrick Mansfield
2002-09-10 19:00 ` Patrick Mochel
2002-09-10 19:37 ` Patrick Mansfield
2002-09-11 0:21 ` Neil Brown
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=20021030100534.A12400@eng2.beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@transmeta.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
Powered by JetHome