From: Christoph Hellwig <hch@infradead.org>
To: Douglas Gilbert <dgilbert@interlog.com>
Cc: SCSI development list <linux-scsi@vger.kernel.org>,
"Elliott, Robert (Server Storage)" <elliott@hp.com>,
"Martin K. Petersen" <martin.petersen@ORACLE.COM>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] scsi_debug: support scsi-mq, queues and locks
Date: Wed, 2 Jul 2014 03:15:21 -0700 [thread overview]
Message-ID: <20140702101521.GA3275@infradead.org> (raw)
In-Reply-To: <53B0F0C0.40907@interlog.com>
Hi doug,
> ChangeLog:
> - add host_lock option whose default value is 0 which
> removes the host_lock around all queued commands
Any reason why we'd want to keep this? You suggest below that the PI
parts might need locking, but in that case we should keept it there
undconditionally until Martin had a chance to verify it.
> - accept delay=-1 (_hi_) or -2 which use a tasklet to invoke
> the scsi_done callback into the mid-layer. The default
> is still delay=1 which uses a timer to delay 1 jiffy
It might be worth to take a look at the null_blk driver for a few
more completion variants.
>
> IMO the scsi-mq queue_depth handling doesn't break but does
> not converge promptly (and in some cases seems to be steady
> state unstable) in the face of TASK_SET_FULL statuses.
> This can be seen with this sequence:
> # cd /sys/bus/pseudo/drivers/scsi_debug
> # echo 0x600 > opts
> < then in another window 'tail -f /var/log/syslog'>
> < then in yet another window run a fio test against scsi_debug>
> # echo 200 > max_queue
> < if the tail shows nothing, try writing a lower value into max_queue>
>
> max_queue starts at 576. Depending on the fio test, the new
> value written into max_queue needed to prompt the TSF trip
> point will vary. You will now it when you see it :-)
There's really nothing specific to blk-mq in the queue-full handling,
so I'd be surprised if if it works that different. What sort of
behavior do you see with scsi_debug when not using blk-mq?
What happens if you don't use blk-mq but the old host-wide tag
implementation (e.g. add a call to scsi_init_shared_tag_map in the probe
function)?
> struct sdebug_queued_cmd {
> - int in_use;
> - struct timer_list cmnd_timer;
> - done_funct_t done_funct;
> + /* in_use flagged by a bit in queued_in_use_bm[] */
> + struct timer_list *cmnd_timerp;
> + struct tasklet_struct *tletp;
Why not keep these allocated as part of the structure and use an union?
> static struct sdebug_queued_cmd queued_arr[SCSI_DEBUG_CANQUEUE];
> +static unsigned long queued_in_use_bm[SCSI_DEBUG_CANQUEUE_WORDS];
Any chance you could move to use the cmd_size field in the host template
instead of the statically allocated commands as suggested earlier?
That would allow for lockless I/O completions, and probably submissions
as well at least for the common case.
next prev parent reply other threads:[~2014-07-02 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 5:08 [PATCH] scsi_debug: support scsi-mq, queues and locks Douglas Gilbert
2014-07-02 10:15 ` Christoph Hellwig [this message]
2014-07-03 5:35 ` Douglas Gilbert
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=20140702101521.GA3275@infradead.org \
--to=hch@infradead.org \
--cc=dgilbert@interlog.com \
--cc=elliott@hp.com \
--cc=hch@lst.de \
--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