public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, bvanassche@acm.org
Subject: Re: [PATCH v3 0/3] scsi: add attribute to set lun queue depth on all luns on shost
Date: Wed, 5 Feb 2020 10:57:54 -0800	[thread overview]
Message-ID: <b42ca35c-64ef-d9fb-a40a-eea482c9d30b@gmail.com> (raw)
In-Reply-To: <yq1v9olzqr3.fsf@oracle.com>

On 2/4/2020 6:56 PM, Martin K. Petersen wrote:
> 
> James,
> 
>> There has been a desire to set the lun queue depth on all luns on an
>> shost. Today that is done by an external script looping through
>> discovered sdevs and set an sdev attribute. The desire is to have a
>> single shost attribute that performs this work removing the
>> requirement for scripting.
> 
> I'd like you to elaborate a bit on this.
> 
>   - Why is scripting or adding a udev rule inadequate?

Simply put, admins don't want to create them, mod the system for them, 
nor concern themselves with finding/changing each of the lun devices 
that connect to a particular port. They have been comfortable changing 
the driver's initial lun queue depth via module parameter. Given that 
was at driver load, it changed everything at time of initial discovery 
so it was fine. But, if the system won't boot for days/weeks, they want 
to do something as simple as the module parameter and with only "1 echo 
command". Thus we wanted to make the parameter be rw rather than ro. 
However, the only interface available to the lldd was 
scsi_change_queue_depth(), which changes the depth but does not change 
the devices max value (which it does do if written via the per-device 
attribute). So although the now writeable attribute allows the driver 
value to change, it would only be applied to storage devices discovered 
after the change. Existing devices would not have their max changed 
unless the per-device attribute were changed.  This new interface gave 
the lldd a new routine, which would find all the devices and apply the 
new max/value to the devices - as if the per-device attributes had been 
called.

> 
>   - Why is there a requirement to statically clamp the queue depth
>     instead of letting the device manage it?

You are misreading it, and perhaps my description led things astray. It 
doesn't "clamp" it at a fixed/unchangable depth. It sets the max to a 
new value and changes the current queue depth to that new value. These 
are the same actions that the per-device attribute does if written to. 
The management of queue depth depth beyond that point is the same as it 
was - meaning queue fulls ramp it down, there is ramp up, and so on. So 
it is the device managing it, just with perhaps a small blip if it 
actually raised vs it's current level, or a pause if its current level 
was higher and it drains down to the new levels.

-- james



      reply	other threads:[~2020-02-05 18:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 23:01 [PATCH v3 0/3] scsi: add attribute to set lun queue depth on all luns on shost James Smart
2020-01-24 23:01 ` [PATCH v3 1/3] scsi: refactor sdev lun queue depth setting via sysfs James Smart
2020-01-25  5:54   ` Bart Van Assche
2020-01-24 23:01 ` [PATCH v3 2/3] scsi: add shost helper to set max queue depth on all of its devices James Smart
2020-01-25  5:53   ` Bart Van Assche
2020-01-24 23:01 ` [PATCH v3 3/3] scsi: add shost attribute to set max queue depth on all devices on the shost James Smart
2020-01-25  5:51   ` Bart Van Assche
2020-02-05  2:56 ` [PATCH v3 0/3] scsi: add attribute to set lun queue depth on all luns on shost Martin K. Petersen
2020-02-05 18:57   ` James Smart [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=b42ca35c-64ef-d9fb-a40a-eea482c9d30b@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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