From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: Hannes Reinecke <hare@suse.de>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 0/8] dm: request-based dm-multipath
Date: Thu, 12 Mar 2009 10:40:29 +0900 [thread overview]
Message-ID: <49B8680D.6050007@ct.jp.nec.com> (raw)
In-Reply-To: <49B7AE6D.1080301@suse.de>
Hi Hannes,
On 2009/03/11 21:28 +0900, Hannes Reinecke wrote:
> Hi Kiyoshi,
>
> Kiyoshi Ueda wrote:
>> Hi Hannes,
>>
> [ .. ]
>>
>> Suspend was broken.
>> dm_suspend() recognized that suspend completed while some requests
>> were still in flight. So we could swap/free the in-use table while
>> there was in_flight request.
>> The patch is like the attached one, although it is not finalized and
>> I'm testing now.
>> I'll post an updated patch-set including the attached patch
>> this week or next week.
>>
>>
>> ---
>> drivers/md/dm.c | 236
>> ++++++++++++++++++++++++++++++++++----------------------
>> 1 file changed, 144 insertions(+), 92 deletions(-)
>>
>> Index: 2.6.29-rc2/drivers/md/dm.c
>> ===================================================================
>> --- 2.6.29-rc2.orig/drivers/md/dm.c
>> +++ 2.6.29-rc2/drivers/md/dm.c
>> @@ -701,11 +701,17 @@ static void free_bio_clone(struct reques
>> }
>> }
>>
>> -static void dec_rq_pending(struct dm_rq_target_io *tio)
>> +/*
>> + * XXX: Not taking queue lock for efficiency.
>> + * For correctness, waiters will check that again with queue
>> lock held.
>> + * No false negative because this function will be called everytime
>> + * in_flight is decremented.
>> + */
>> +static void rq_completed(struct mapped_device *md)
>> {
>> - if (!atomic_dec_return(&tio->md->pending))
>> + if (!md->queue->in_flight)
>> /* nudge anyone waiting on suspend queue */
>> - wake_up(&tio->md->wait);
>> + wake_up(&md->wait);
>> }
>>
> Hmm. Don't think that's a good idea. Either take the spinlock here or
> in_flight should be atomic.
Thank you for the comment.
OK, I'll change to take queue_lock here for maintenancability now,
although the queue_lock is not needed logically.
Then, I'll have another patch to drop the queue_lock for efficiency
in the future.
Thanks,
Kiyoshi Ueda
next prev parent reply other threads:[~2009-03-12 1:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 15:08 [PATCH 0/8] dm: request-based dm-multipath Kiyoshi Ueda
2008-10-03 15:09 ` [PATCH 1/8] dm core: remove unused DM_WQ_FLUSH_ALL Kiyoshi Ueda
2008-10-03 15:09 ` Kiyoshi Ueda
2008-10-03 15:10 ` [PATCH 2/8] dm core: tidy local_init Kiyoshi Ueda
2008-10-03 15:17 ` [PATCH 3/8] dm core: add kmem_cache for request-based dm Kiyoshi Ueda
2008-10-03 15:18 ` [PATCH 4/8] dm core: add target interfaces " Kiyoshi Ueda
2008-10-03 15:18 ` Kiyoshi Ueda
2008-10-03 15:18 ` [PATCH 5/8] dm core: add core functions " Kiyoshi Ueda
2008-10-03 15:18 ` Kiyoshi Ueda
2008-10-03 15:19 ` [PATCH 6/8] dm core: enable " Kiyoshi Ueda
2008-10-03 15:19 ` Kiyoshi Ueda
2008-10-03 15:19 ` [PATCH 7/8] dm core: reject I/O violating new queue limits Kiyoshi Ueda
2008-10-03 15:19 ` Kiyoshi Ueda
2008-10-03 15:19 ` [PATCH 8/8] dm-mpath: convert to request-based Kiyoshi Ueda
2008-10-03 15:19 ` Kiyoshi Ueda
2009-01-28 15:40 ` [PATCH 0/8] dm: request-based dm-multipath Alasdair G Kergon
2009-01-29 7:18 ` Kiyoshi Ueda
2009-01-29 10:41 ` Hannes Reinecke
2009-01-29 14:32 ` Alasdair G Kergon
2009-01-30 8:05 ` Kiyoshi Ueda
2009-03-10 6:10 ` Kiyoshi Ueda
2009-03-10 7:17 ` Hannes Reinecke
2009-03-10 8:17 ` Kiyoshi Ueda
2009-03-11 12:28 ` Hannes Reinecke
2009-03-12 1:40 ` Kiyoshi Ueda [this message]
2009-03-12 8:58 ` Kiyoshi Ueda
2009-03-12 9:08 ` Hannes Reinecke
2009-03-13 1:03 ` Kiyoshi Ueda
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=49B8680D.6050007@ct.jp.nec.com \
--to=k-ueda@ct.jp.nec.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
/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.