public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Luben Tuikov <luben@splentec.com>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	James Bottomley <James.Bottomley@steeleye.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] 2.5.x use list_head to handle scsi starved request queues
Date: Mon, 24 Mar 2003 21:25:09 +0100	[thread overview]
Message-ID: <20030324202509.GF2371@suse.de> (raw)
In-Reply-To: <3E7F688C.3020009@splentec.com>

On Mon, Mar 24 2003, Luben Tuikov wrote:
> Patrick Mansfield wrote:
> >On Mon, Mar 24, 2003 at 12:12:07PM -0500, Luben Tuikov wrote:
> >
> >>If scsi_queue_next_request(q, cmd) is running on more than one CPU
> >>and q != q1 then you have a problem with the starved devices list.
> >
> >
> >Not with the current locking: we lock queue_lock (equal to host_lock)
> >at the start of scsi_queue_next_request, and unlock at the end of
> >scsi_queue_next_request.
> 
> Are you sure that all device's request queues will use
> the same lock (the host lock) in the future?
> 
> My problem is that your patch code for scsi_queue_next_request()
> behaves as if q->queue_lock is the same for all devices' request_queues
> of the host.  And this is a _special case_, valid only at the present!!!!
> 
> I absolutely _detest_ the fact that the host_lock is used to lock LLDD's
> entry points, SCSI Core's data, *and* the request queues for
> all devices of the host... Talk about serializaion!
> 
> But okay, if you want to leave it like it is, holding the q->lock
> all over the place, _*PLEASE*_, put a comment saying that
> the q->lock is actually the host_lock and locks all the
> queues for all devices on the host... similar to my ``detest''
> paragraph above.  And if this were to be ever changed then
> the individual locks will have to be attained and released...
> and lots of code _rewritten_.

Irk no, that's quite a bad idea.

I completely agree with you that making assumptions about q->queue_lock
== host lock is really really bad. Don't do that.

-- 
Jens Axboe


  reply	other threads:[~2003-03-24 20:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-20  2:27 [PATCH] 2.5.x use list_head to handle scsi starved request queues Patrick Mansfield
2003-03-20 20:05 ` Luben Tuikov
2003-03-21  4:39   ` Patrick Mansfield
2003-03-21 20:48     ` Luben Tuikov
2003-03-22  0:50       ` Patrick Mansfield
2003-03-24 17:12         ` Luben Tuikov
2003-03-24 19:29           ` Patrick Mansfield
2003-03-24 20:20             ` Luben Tuikov
2003-03-24 20:25               ` Jens Axboe [this message]
2003-03-24 20:38                 ` Patrick Mansfield
2003-03-24 21:25                   ` Luben Tuikov
2003-03-24 21:56                     ` Patrick Mansfield
2003-03-24 22:15                       ` Luben Tuikov
2003-03-24 21:30                 ` Luben Tuikov

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=20030324202509.GF2371@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben@splentec.com \
    --cc=patmans@us.ibm.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