public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben@splentec.com>
To: Doug Ledford <dledford@redhat.com>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	Linux Scsi Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: One more change pushed to bk tree
Date: Mon, 25 Nov 2002 12:02:59 -0500	[thread overview]
Message-ID: <3DE257C3.C48D4FE6@splentec.com> (raw)
In-Reply-To: 20021123024501.GC19547@redhat.com

Doug Ledford wrote:
> 
> Well, before we go too far down this road, I do want to pipe up and
> publically announce how much I thoroughly *DETEST* that whole section of
> code with its totally convoluted hoop jumping crap that it does to avoid
> calling blk_init_queue() on each scan target.  Personally, if it were up
> to me I would make a much simpler/faster queue init routine, quit this
> crap of passing around and reusing the same pointer, and clean up *tons*
> of crap in the scsi scan code.  That being said, anything that increases
> the complexity of that code is bad IMHO.
> 
> Furthermore, one of my intended near future patches, pending review of the
> idea because this is a change that would touch *A LOT* of files, is to get
> rid of scsi_{build,release}_commandblocks entirely and instead change the
> scsi subsystem to use generic command blocks that are applicable to all
> hosts, modify all low level drivers to use the cmd->device pointer to get
> the host/bus/target id/lun values so that they don't need device specific
> command blocks, then to allocate a small pool of these on startup and lazy
> allocate/deallocate them as we run and as scsi_adjust_queue_depth() starts
> getting called for various devices.  If that happens, then most of the
> discussion about command blocks is moot.  Then, since currently I'm the
> only user of slave_alloc(), it would also be easy enough for me to make a
> rule that no device driver is allowed to hard code device numbers in thier
> alloced struct so that we could do this scanning of devices, not need to
> rebuild command blocks, not need to realloc slave structs, and still have
> everything work.  Good enough?

scsi_adjust_queue_depth() would ideally just change an integer,
say device->max_device_cmds or something like that (OSLT). This would play
nicely with int dev->device_cmds_held or int device_cmds_active OSLT, also
being an integer and it wouldn't matter if you _decrease_ the
max, but currently there are more active in the device. (you may
disallow this or set some policy if you wish, etc...)

As a spin off of this, if you set max_device_cmds to 0, you've
effectively turned off the device, but letting it complete what's
active -- one may not want to do this like that of course, but
mentioned here just as a consequence.

The point of all this is that this makes a lot more things a lot
more flexible and makes SCSI core shrink (long, long awaited).

BTW, you've mentioned this change many times before. I don't know
why you haven't implemented it yet, or how structural (non-cosmetic)
changes are voted for in linux-scsi for the SCSI layer, but
you have my vote on this change.

-- 
Luben

  reply	other threads:[~2002-11-25 17:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-22 18:36 One more change pushed to bk tree Doug Ledford
2002-11-22 20:45 ` Christoph Hellwig
2002-11-22 22:22   ` Doug Ledford
2002-11-22 22:56     ` Christoph Hellwig
2002-11-22 22:24 ` Doug Ledford
2002-11-22 23:43   ` Doug Ledford
2002-11-22 23:56 ` Patrick Mansfield
2002-11-23  2:45   ` Doug Ledford
2002-11-25 17:02     ` Luben Tuikov [this message]
2002-11-25 19:45     ` Patrick Mansfield

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=3DE257C3.C48D4FE6@splentec.com \
    --to=luben@splentec.com \
    --cc=dledford@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --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