linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <jbottomley@parallels.com>,
	Sean Stewart <sean.stewart@netapp.com>,
	Martin George <marting@netapp.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 04/16] scsi_dh_alua: Make stpg synchronous
Date: Thu, 13 Feb 2014 10:31:34 +0100	[thread overview]
Message-ID: <52FC90F6.7020005@suse.de> (raw)
In-Reply-To: <52FBAFDE.4060104@cs.wisc.edu>

On 02/12/2014 06:31 PM, Mike Christie wrote:
> On 2/12/14 10:26 AM, Mike Christie wrote:
>> On 2/12/14 10:11 AM, Mike Christie wrote:
>>> On 2/12/14 9:29 AM, Hannes Reinecke wrote:
>>>> On 02/07/2014 02:54 AM, Mike Christie wrote:
>>>>> On 02/06/2014 07:24 PM, Mike Christie wrote:
>>>>>> On 01/31/2014 03:29 AM, Hannes Reinecke wrote:
>>>>>>> We should be issuing STPG synchronously as we need to
>>>>>>> evaluate the return code on failure.
>>>>>>>
>>>>>>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>>>>>>
>>>>>> I think we need to also make dm-mpath.c use a non-ordered
>>>>>> workqueue
>>>>>> for
>>>>>> kmpath_handlerd. With this patch and the current ordered
>>>>>> workqueue in
>>>>>> dm-mpath I think we will only be able to do one STPG at a time. I
>>>>>> think
>>>>>> if we use a normal old non-ordered workqueue then we would be
>>>>>> limited to
>>>>>> have max_active STPGs executing.
>>>>>
>>>>> I goofed and commented in the order I saw the patches :) I take
>>>>> this
>>>>> comment back for this patch, because I see in 16/16 you added a
>>>>> new
>>>>> workqueue to scsi_dh_alua to do rtpgs and stpgs.
>>>>>
>>>>> For 16/16 though, do we want to make kmpath_aluad a non single
>>>>> threaded
>>>>> workqueue? It looks like max_active for single threaded is only
>>>>> one
>>>>> work
>>>>> at a time too.
>>>>>
>>>> Well, that was by intention.
>>>>
>>>> The workqueue will be triggered very infrequently (basically for
>>>> every path switch).
>>>> For implicit ALUA we just need to issue a RTPG to get the new path
>>>> status; there we might be suffering from single threaded behaviour.
>>>> But we need to issue it only once and it should be processed
>>>> reasonably fast.
>>>> For explicit ALUA we'll have to send an STPG, which has potentially
>>>> system-wide implications. So sending several to (supposedly)
>>>> different targets might actually be contraproductive, as the first
>>>> might have already set the status for the second call.
>>>> Here we most definitely _want_ serialisation to avoid
>>>> superfluous STPGs.
>>>>
>>>
>>> What target is this?
>>>
>>> For our target it adds a regression. It only affects devices on
>>> the same
>>> port group. We then have multiple groups. Before the patch, we could
>>> failover/failback multiple devices in parallel. To do 64 devices
>>> it took
>>> about 3 seconds. With your patch it takes around 3 minutes.
>>>
>>
>> Also, with your pg change patch, I think we can serialize based on
>> group
>> and it will do what you want and also allow us to do STPGs to
>> different
>> groups in parallel.
> 
> I guess that would work for me, but I think if you had the same
> target port in multiple port groups then you could hit the issue you
> described, right?
> 
Yes, we might. But it's worth a shot anyway.

So to alleviate all this, this patch:

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
b/drivers/scsi/device_ha
ndler/scsi_dh_alua.c
index 569af9d..46cc1ef 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -1353,7 +1353,7 @@ static int __init alua_init(void)
 {
        int r;

-       kmpath_aluad = create_singlethread_workqueue("kmpath_aluad");
+       kmpath_aluad = create_workqueue("kmpath_aluad");
        if (!kmpath_aluad) {
                printk(KERN_ERR "kmpath_aluad creation failed.\n");
                return -EINVAL;

should be sufficient, right?

Could you test and see if it makes a difference?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (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:[~2014-02-13  9:31 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  9:29 [PATCHv2 00/16] scsi_dh_alua updates Hannes Reinecke
2014-01-31  9:29 ` [PATCH 01/16] scsi_dh_alua: Improve error handling Hannes Reinecke
2014-02-14 11:16   ` Bart Van Assche
2014-02-14 11:32     ` Hannes Reinecke
2014-03-06 23:43   ` Jeremy Linton
2014-03-07  7:12     ` Hannes Reinecke
2014-03-07 15:46       ` Jeremy Linton
2014-01-31  9:29 ` [PATCH 02/16] scsi_dh_alua: use flag for RTPG extended header Hannes Reinecke
2014-01-31  9:29 ` [PATCH 03/16] scsi_dh_alua: Pass buffer as function argument Hannes Reinecke
2014-02-14 11:22   ` Bart Van Assche
2014-02-14 11:36     ` Hannes Reinecke
2014-01-31  9:29 ` [PATCH 04/16] scsi_dh_alua: Make stpg synchronous Hannes Reinecke
2014-02-07  1:24   ` Mike Christie
2014-02-07  1:54     ` Mike Christie
2014-02-12 15:29       ` Hannes Reinecke
2014-02-12 16:11         ` Mike Christie
2014-02-12 16:26           ` Mike Christie
2014-02-12 17:31             ` Mike Christie
2014-02-13  9:31               ` Hannes Reinecke [this message]
2014-02-14 11:37                 ` Bart Van Assche
2014-02-14 11:53                   ` Hannes Reinecke
2014-02-14 18:21                   ` Mike Christie
2014-02-19  8:09                     ` Hannes Reinecke
2014-02-14 17:17                 ` Mike Christie
2014-02-14 11:27   ` Bart Van Assche
2014-02-14 11:38     ` Hannes Reinecke
2014-01-31  9:29 ` [PATCH 05/16] scsi_dh_alua: put sense buffer on stack Hannes Reinecke
2014-01-31  9:29 ` [PATCH 06/16] scsi_dh_alua: use local buffer for VPD inquiry Hannes Reinecke
2014-02-13  9:51   ` Maurizio Lombardi
2014-02-13 10:10     ` Hannes Reinecke
2014-02-14 11:41   ` Bart Van Assche
2014-01-31  9:29 ` [PATCH 07/16] scsi_dh_alua: Use separate alua_port_group structure Hannes Reinecke
2014-02-14 11:56   ` Bart Van Assche
2014-02-14 12:16     ` Hannes Reinecke
2014-02-14 16:12     ` Hannes Reinecke
2014-02-14 17:42       ` Bart Van Assche
2014-01-31  9:29 ` [PATCH 08/16] scsi_dh_alua: parse target device id Hannes Reinecke
2014-02-14 12:09   ` Bart Van Assche
2014-02-14 12:21     ` Hannes Reinecke
2014-02-17 14:05       ` Bart Van Assche
2014-02-17 14:09         ` Hannes Reinecke
2014-02-17 14:27           ` Bart Van Assche
2014-02-17 14:33             ` Hannes Reinecke
2014-02-18  7:26               ` Bart Van Assche
2014-01-31  9:29 ` [PATCH 09/16] scsi_dh_alua: simplify sense code handling Hannes Reinecke
2014-01-31  9:29 ` [PATCH 10/16] scsi_dh_alua: Do not attach to management devices Hannes Reinecke
2014-01-31  9:29 ` [PATCH 11/16] scsi_dh_alua: multipath failover fails with error 15 Hannes Reinecke
2015-03-30 12:30   ` Bart Van Assche
2015-03-30 12:32     ` Hannes Reinecke
2014-01-31  9:29 ` [PATCH 12/16] scsi_dh: return individual errors in scsi_dh_activate() Hannes Reinecke
2014-01-31  9:29 ` [PATCH 13/16] scsi_dh_alua: Clarify logging message Hannes Reinecke
2014-01-31  9:29 ` [PATCH 14/16] scsi_dh: invoke callback if ->activate is not present Hannes Reinecke
2014-01-31  9:29 ` [PATCH 15/16] scsi_dh_alua: revert commit a8e5a2d593cbfccf530c3382c2c328d2edaa7b66 Hannes Reinecke
2014-01-31  9:30 ` [PATCH 16/16] scsi_dh_alua: Use workqueue for RTPG Hannes Reinecke
2014-02-14 19:03   ` Bart Van Assche
2014-04-29 21:47   ` Stewart, Sean
2014-05-08  7:04     ` Hannes Reinecke
2014-03-02  9:10 ` [PATCHv2 00/16] scsi_dh_alua updates Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2013-12-20 12:13 [PATCH " Hannes Reinecke
2013-12-20 12:13 ` [PATCH 04/16] scsi_dh_alua: Make stpg synchronous 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=52FC90F6.7020005@suse.de \
    --to=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marting@netapp.com \
    --cc=michaelc@cs.wisc.edu \
    --cc=sean.stewart@netapp.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).