All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
	dm-devel@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH 2/5] dm-multipath: push back requests instead of queueing
Date: Sat, 01 Feb 2014 14:51:36 +0100	[thread overview]
Message-ID: <52ECFBE8.9090003@suse.de> (raw)
In-Reply-To: <20140131154042.GA17221@redhat.com>

On 01/31/2014 04:40 PM, Mike Snitzer wrote:
> On Fri, Jan 31 2014 at  4:10am -0500,
> Hannes Reinecke <hare@suse.de> wrote:
>
>> There is no reason why multipath needs to queue requests
>> internally for queue_if_no_path or pg_init; we should
>> rather push them back onto the request queue.
>>
>> And while we're at it we can simplify the conditional
>> statement in map_io() to make it easier to read.
>>
>> Cc: Mike Snitzer <snitzer@redhat.com>
>> Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>   drivers/md/dm-mpath.c         | 115 ++++++++++++++----------------------------
>>   drivers/md/dm.c               |  13 +++++
>>   include/linux/device-mapper.h |   1 +
>>   3 files changed, 52 insertions(+), 77 deletions(-)
>
> ...
>
>> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
>> index 0704c52..291491b 100644
>> --- a/drivers/md/dm.c
>> +++ b/drivers/md/dm.c
>> @@ -1912,6 +1912,19 @@ static int dm_any_congested(void *congested_data, int bdi_bits)
>>   	return r;
>>   }
>>
>> +void dm_table_run_queue(struct dm_table *t)
>> +{
>> +	struct mapped_device *md = dm_table_get_md(t);
>> +	unsigned long flags;
>> +
>> +	if (md->queue) {
>> +		spin_lock_irqsave(md->queue->queue_lock, flags);
>> +		blk_run_queue_async(md->queue);
>> +		spin_unlock_irqrestore(md->queue->queue_lock, flags);
>> +	}
>> +}
>> +EXPORT_SYMBOL_GPL(dm_table_run_queue);
>> +
>
> I think I agree with Junichi's previous point that this should live in
> dm-table.c.  You don't need the mapped_device, only the associated
> request_queue, so... I know I implemented something like
> dm_get_md_queue() before, but obviously it never went in for whatever
> reason.
>
> Anyway, I think something like this would be ideal (I renamed to
> dm_table_run_md_queue_async).  Please feel free to fold this in and
> repost with v4 of your patchset (assuming you'll be fixing up patch 3
> after you get Jun'ichi's feedback):
>
As mentioned, I don't mind.
The layering conventions in the device-mapper code still confuses
me occasionally.

I'll be folding it in.

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)

  reply	other threads:[~2014-02-01 13:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  9:10 [PATCHv3 0/5] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-01-31  9:10 ` [PATCH 1/5] dm-multipath: Do not call pg_init twice Hannes Reinecke
2014-01-31  9:10 ` [PATCH 2/5] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-01-31 15:40   ` Mike Snitzer
2014-02-01 13:51     ` Hannes Reinecke [this message]
2014-01-31  9:10 ` [PATCH 3/5] dm-multipath: remove process_queued_ios() Hannes Reinecke
2014-01-31  9:43   ` Junichi Nomura
2014-01-31 14:55     ` Hannes Reinecke
2014-02-03 10:26       ` Junichi Nomura
2014-02-03 10:31         ` Hannes Reinecke
2014-01-31  9:10 ` [PATCH 4/5] dm-multipath: reduce memory pressure during requeuing Hannes Reinecke
2014-01-31  9:10 ` [PATCH 5/5] dm-multipath: remove map_io() 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=52ECFBE8.9090003@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.