From: Hannes Reinecke <hare@suse.de>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>,
Mike Snitzer <snitzer@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 4/7] dm mpath: remove process_queued_ios()
Date: Tue, 04 Feb 2014 09:18:23 +0100 [thread overview]
Message-ID: <52F0A24F.6050408@suse.de> (raw)
In-Reply-To: <11AF7C027C4C02408624617A498607840105D5F0@BPXM12GP.gisp.nec.co.jp>
On 02/04/2014 04:24 AM, Junichi Nomura wrote:
> On 02/04/14 05:28, Mike Snitzer wrote:
>> @@ -1216,9 +1185,12 @@ static void pg_init_done(void *data, int errors)
>>
>> if (!m->pg_init_required)
>> m->queue_io = 0;
>> -
>> - m->pg_init_delay_retry = delay_retry;
>> - queue_work(kmultipathd, &m->process_queued_ios);
>> + else if (m->current_pg) {
>> + m->pg_init_delay_retry = delay_retry;
>> + /* Use a small delay to force the use of workqueue context */
>> + __pg_init_all_paths(m, 50/HZ);
>> + goto out;
>> + }
>
> I think the patch is still broken.
>
> When "m->pg_init_required && !m->current_pg",
> it ends up with !pg_ready() and no pg_init running.
> So map_io() will not be called and IO will stall.
>
> What do you think about my suggestion here:
> https://www.redhat.com/archives/dm-devel/2014-February/msg00013.html
>
Sigh. pg_init_required again...
> Also it's not yet clear why the second parameter of __pg_init_all_paths()
> is needed. (At least, "50/HZ" is typo or something.)
>
>> @@ -1591,8 +1563,17 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
> ...
>> + if (m->current_pg && m->pg_init_required)
>> + __pg_init_all_paths(m, 0);
>> + spin_unlock_irqrestore(&m->lock, flags);
>> + dm_table_run_md_queue_async(m->ti->table);
>> + }
>
> What happens if "!m->current_pg && m->pg_init_required"?
>
>From the current logic it means that no valid pg was found, so
calling pg_init would be pointless.
We're calling __choose_pgpath() before that, so if that returns
with current_pg == NULL all paths are down, and calling
pg_init would be pointless.
But I think I see to have pg_init_required handling cleared up;
I'll be doing a patch to unset it at the start of __choose_pgpath(),
this we we can be sure that it'll be set correctly.
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)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2014-02-04 8:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 20:28 [PATCH v6 0/7] dm-multipath: push back requests instead of queueing Mike Snitzer
2014-02-03 20:28 ` [PATCH 1/7] dm mpath: do not call pg_init when it is already running Mike Snitzer
2014-02-04 3:25 ` Junichi Nomura
2014-02-03 20:28 ` [PATCH 2/7] dm table: add dm_table_run_md_queue_async Mike Snitzer
2014-02-04 3:27 ` Junichi Nomura
2014-02-03 20:28 ` [PATCH 3/7] dm mpath: push back requests instead of queueing Mike Snitzer
2014-02-04 3:25 ` Junichi Nomura
2014-02-03 20:28 ` [PATCH 4/7] dm mpath: remove process_queued_ios() Mike Snitzer
2014-02-04 3:24 ` Junichi Nomura
2014-02-04 8:18 ` Hannes Reinecke [this message]
2014-02-04 8:55 ` Junichi Nomura
2014-02-04 9:08 ` Hannes Reinecke
2014-02-04 9:27 ` Junichi Nomura
2014-02-04 9:45 ` Hannes Reinecke
2014-02-03 20:28 ` [PATCH 5/7] dm mpath: reduce memory pressure when requeuing Mike Snitzer
2014-02-04 3:27 ` Junichi Nomura
2014-02-03 20:28 ` [PATCH 6/7] dm mpath: remove map_io() Mike Snitzer
2014-02-04 3:27 ` Junichi Nomura
2014-02-03 20:28 ` [PATCH 7/7] dm mpath: remove extra nesting in map function when path exists Mike Snitzer
2014-02-04 3:27 ` Junichi Nomura
2014-02-04 8:43 ` Hannes Reinecke
2014-02-04 7:23 ` [PATCH v6 0/7] dm-multipath: push back requests instead of queueing Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2014-02-04 10:54 [PATCHv7 " Hannes Reinecke
2014-02-04 10:54 ` [PATCH 4/7] dm mpath: remove process_queued_ios() Hannes Reinecke
2014-02-04 11:26 ` Junichi Nomura
2014-02-04 11:31 ` Hannes Reinecke
2014-02-10 13:30 ` Mike Snitzer
2014-02-11 9:46 ` Hannes Reinecke
2014-02-11 15:55 ` Mike Snitzer
2014-02-11 18:03 ` Hannes Reinecke
2014-02-11 16:29 ` Mike Snitzer
2014-02-12 2:37 ` Junichi Nomura
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=52F0A24F.6050408@suse.de \
--to=hare@suse.de \
--cc=dm-devel@redhat.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=snitzer@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.