linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bart.vanassche@sandisk.com>,
	Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Jamed Bottomley <jbottomley@odin.com>,
	linux-scsi@vger.kernel.org,
	Johannes Thumshirn <jthumshirn@suse.com>,
	Ewan Milne <emilne@redhat.com>
Subject: Re: [PATCH 00/18] ALUA device handler update, part 1
Date: Mon, 23 Nov 2015 17:10:46 +0100	[thread overview]
Message-ID: <56533A86.2090109@suse.de> (raw)
In-Reply-To: <564FA58A.8040006@sandisk.com>

On 11/20/2015 11:58 PM, Bart Van Assche wrote:
> On 11/20/2015 02:52 AM, Hannes Reinecke wrote:
>> One thing, though: I don't really agree with Barts objection that
>> moving to a workqueue would tie in too many resources.
>> Thing is, I'm not convinces that using a work queue is allocating
>> too many resources (we're speaking of 460 vs 240 bytes here).
>> Also we have to retry commands for quite some time (cite the
>> infamous NetApp takeover/giveback, which can take minutes).
>> If we were to handle that without workqueue we'd have to initiate
>> the retry from the end_io callback, causing a quite deep stack
>> recursion. Which I'm not really fond of.
> 
> Hello Hannes,
> 
> Sorry if I wasn't clear enough in my previous e-mail about this
> topic but I'm more concerned about the additional memory needed for
> thread stacks and thread control data structures than about the
> additional memory needed for the workqueue. I'd like to see the ALUA
> device handler implementation scale to thousands of LUNs and target
> port groups. In case all connections between an initiator and a
> target port group fail, with a synchronous implementation of STPG we
> will either need a large number of threads (in case of one thread
> per STPG command) or the STPG commands will be serialized (if there
> are fewer threads than portal groups). Neither alternative looks
> attractive to me.
> 
> BTW, not all storage arrays need STPG retries. Some arrays are able
> to process an STPG command quickly (this means within a few seconds).
> 
> A previous discussion about this topic is available e.g. at
> http://thread.gmane.org/gmane.linux.scsi/105340/focus=105601.
> 
Well, one could argue that the whole point of this patchset is to
allow you to serialize STPGs :-)

We definitely need to serialize STPGs for the same target port
group; the current implementation is far too limited to take that
into account.

But the main problem I'm facing with the current implementation is
that we cannot handle retries. An RTPG or an STPG might fail, at
which point we need to re-run RTPG to figure out the current status.
(We also need to send RTPGs when we receive an "ALUA state changed"
 UA, but that's slightly beside the point).
The retry cannot be send directly, as we're evaluating the status
from end_io context. So to instantiate a retry we need to move it
over to a workqueue.

Or, at least, that's the solution I'm able to come up with.
If you have other ideas it'd be most welcome.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-11-23 16:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 15:08 [PATCH 00/18] ALUA device handler update, part 1 Hannes Reinecke
2015-11-09 15:08 ` [PATCH 01/18] scsi_dh: move 'dh_state' sysfs attribute to generic code Hannes Reinecke
2015-11-24 12:14   ` Johannes Thumshirn
2015-11-30 16:59   ` Martin K. Petersen
2015-11-09 15:08 ` [PATCH 02/18] scsi: ignore errors from scsi_dh_add_device() Hannes Reinecke
2015-11-24 12:14   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 03/18] scsi_dh_alua: Disable ALUA handling for non-disk devices Hannes Reinecke
2015-11-24 12:14   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 04/18] scsi_dh_alua: Use vpd_pg83 information Hannes Reinecke
2015-11-24 12:15   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 05/18] scsi_dh_alua: improved logging Hannes Reinecke
2015-11-24 12:15   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 06/18] scsi_dh_alua: sanitze sense code handling Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 07/18] scsi_dh_alua: use standard logging functions Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 08/18] scsi_dh_alua: return standard SCSI return codes in submit_rtpg Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 09/18] scsi_dh_alua: fixup description of stpg_endio() Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 10/18] scsi: remove scsi_show_sense_hdr() Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 11/18] scsi_dh_alua: use flag for RTPG extended header Hannes Reinecke
2015-11-24 12:16   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 12/18] scsi_dh_alua: use unaligned access macros Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 13/18] scsi_dh_alua: rework alua_check_tpgs() to return the tpgs mode Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 14/18] scsi_dh_alua: simplify sense code handling Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 15/18] scsi: Add scsi_vpd_lun_id() Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 16/18] scsi: export 'device_id' to sysfs Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 17/18] scsi: Add scsi_vpd_tpg_id() Hannes Reinecke
2015-11-24 12:17   ` Johannes Thumshirn
2015-11-09 15:08 ` [PATCH 18/18] scsi_dh_alua: use scsi_vpd_tpg_id() Hannes Reinecke
2015-11-24 12:18   ` Johannes Thumshirn
2015-11-19  8:35 ` [PATCH 00/18] ALUA device handler update, part 1 Christoph Hellwig
2015-11-19  9:42   ` Hannes Reinecke
2015-11-20 10:47 ` Christoph Hellwig
2015-11-20 10:52   ` Hannes Reinecke
2015-11-20 10:54     ` Christoph Hellwig
2015-11-20 11:02       ` Hannes Reinecke
2015-11-20 22:58     ` Bart Van Assche
2015-11-23 16:10       ` Hannes Reinecke [this message]
2015-11-23 16:18         ` Bart Van Assche
2015-11-24 15:29           ` Hannes Reinecke

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=56533A86.2090109@suse.de \
    --to=hare@suse.de \
    --cc=bart.vanassche@sandisk.com \
    --cc=emilne@redhat.com \
    --cc=hch@lst.de \
    --cc=jbottomley@odin.com \
    --cc=jthumshirn@suse.com \
    --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;
as well as URLs for NNTP newsgroup(s).