All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>,
	device-mapper development <dm-devel@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>, Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH 1/2] dm-multipath: push back requests instead of queueing
Date: Mon, 20 Jan 2014 16:49:39 +0100	[thread overview]
Message-ID: <52DD4593.7090106@suse.de> (raw)
In-Reply-To: <11AF7C027C4C02408624617A4986078401024EB7@BPXM12GP.gisp.nec.co.jp>

On 01/20/2014 12:57 PM, Junichi Nomura wrote:
> On 01/17/14 19:42, Hannes Reinecke wrote:
>> @@ -1256,7 +1188,8 @@ static void pg_init_done(void *data, int errors)
>>  		m->queue_io = 0;
>>  
>>  	m->pg_init_delay_retry = delay_retry;
>> -	queue_work(kmultipathd, &m->process_queued_ios);
>> +	if (!m->queue_io)
>> +		dm_table_run_queue(m->ti->table);
>>  
>>  	/*
>>  	 * Wake up any thread waiting to suspend.
> 
> Does pg_init retry still work with this change?
> 
> I suspect it doesn't. When a retry is requested in pg_init_done(),
> m->queue_io is still 0 and somebody has to kick pg_init.
> 
> Instead of replacing "process_queued_ios" work completely,
> how about keeping it around and just replacing dispatch_queued_ios() by
> dm_table_run_queue()?
> 
I'd rather prefer to schedule the activate_path() workqueue item
directly; no need to involve yet another workqueue here.
And we already know which path to activate.

But yeah, it looks as if we need to reschedule activate_path() here.

>> @@ -1606,7 +1540,7 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
>>  
>>  	spin_lock_irqsave(&m->lock, flags);
>>  
>> -	if (!m->current_pgpath)
>> +	if (!m->current_pgpath || !m->queue_io)
>>  		__choose_pgpath(m, 0);
>>  
>>  	pgpath = m->current_pgpath;
> 
> Why is !m->queue_io check added here?
> 
You are right, this is a different patch.
I'll be splitting it up.

>> 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 this funcion fits better in dm-table.c.
> 
So I've thought, but struct mapped_device is internal to dm.c
And having yet another wrapper just to circumvent the layering
seemed a bit excessive.

But I do whatever deemed necessary by the powers that be ..

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

  reply	other threads:[~2014-01-20 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 10:42 [PATCHv2 0/2] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-01-17 10:42 ` [PATCH 1/2] " Hannes Reinecke
2014-01-20 11:57   ` Junichi Nomura
2014-01-20 15:49     ` Hannes Reinecke [this message]
2014-01-21  9:07       ` Junichi Nomura
2014-01-30 15:08         ` Mike Snitzer
2014-01-17 10:42 ` [PATCH 2/2] dm-multipath: reduce memory pressure during requeuing Hannes Reinecke
2014-01-20 11:59   ` Junichi Nomura
2014-01-20 12:15     ` Hannes Reinecke
2014-01-30 15:09       ` Mike Snitzer
2014-01-18 15:41 ` [PATCHv2 0/2] dm-multipath: push back requests instead of queueing Mike Snitzer
2014-01-30  1:38   ` Mike Snitzer
2014-01-30  6:53     ` 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=52DD4593.7090106@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.