From: Hannes Reinecke <hare@suse.de>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH 4/6] dm-multipath: remove process_queued_ios()
Date: Mon, 03 Feb 2014 13:18:07 +0100 [thread overview]
Message-ID: <52EF88FF.8010609@suse.de> (raw)
In-Reply-To: <11AF7C027C4C02408624617A4986078401058DDD@BPXM12GP.gisp.nec.co.jp>
On 02/03/2014 01:08 PM, Junichi Nomura wrote:
> On 02/03/14 17:18, Hannes Reinecke wrote:
>> We only need to take care to add a small delay when calling
>> __pg_init_all_paths() to move processing off to a workqueue;
>> pg_init_done() is run from an interrupt context and needs to
>> complete as fast as possible.
> ...
>> @@ -1217,9 +1185,11 @@ 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 {
>> + m->pg_init_delay_retry = delay_retry;
>> + __pg_init_all_paths(m, 50/HZ);
>> + goto out;
>> + }
>>
>
> I forgot to comment on this.
> Adding delay to queue_work() doesn't make it fast.
> So I couldn't see why this "50/HZ" delay has to be added
> and where this value comes.
>
Well, it wasn't probably the best choice of words.
Thing is, without a delay the workqueue item will be executed
directly (cf __queue_delayed_work()).
But pg_init_done() is run from an interrupt context, and as such any
memory allocations have to be atomic.
So if we were to call queue_delayed_work() without any delay
we will end up calling scsi_dh_activate from an interrupt context,
too, but there we most definitely do _not_ have only atomic allocations.
Hence the delay.
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-03 12:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 8:18 [PATCHv4 0/6] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-02-03 8:18 ` [PATCH 1/6] dm-multipath: Do not call pg_init twice Hannes Reinecke
2014-02-03 8:18 ` [PATCH 2/6] dm: implement dm_md_get_queue() Hannes Reinecke
2014-02-03 8:18 ` [PATCH 3/6] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-02-03 8:18 ` [PATCH 4/6] dm-multipath: remove process_queued_ios() Hannes Reinecke
2014-02-03 11:30 ` Junichi Nomura
2014-02-03 11:39 ` Hannes Reinecke
2014-02-03 12:08 ` Junichi Nomura
2014-02-03 12:18 ` Hannes Reinecke [this message]
2014-02-03 12:39 ` Junichi Nomura
2014-02-03 12:57 ` Hannes Reinecke
2014-02-04 3:21 ` Junichi Nomura
2014-02-03 8:18 ` [PATCH 5/6] dm-multipath: reduce memory pressure during requeuing Hannes Reinecke
2014-02-03 8:18 ` [PATCH 6/6] dm-multipath: remove map_io() Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2014-02-03 12:34 [PATCHv5 0/6] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-02-03 12:34 ` [PATCH 4/6] dm-multipath: remove process_queued_ios() 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=52EF88FF.8010609@suse.de \
--to=hare@suse.de \
--cc=agk@redhat.com \
--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.