All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	"Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCHES]: dm lock optimization
Date: Tue, 1 May 2012 22:17:47 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1205012214560.24798@file.rdu.redhat.com> (raw)
In-Reply-To: <4F953574.3000702@ce.jp.nec.com>

Hi

I placed the new code using srcu here: 
http://people.redhat.com/mpatocka/patches/kernel/dm-lock-optimization/

It removes io_lock, map_lock and holders and replaces them with srcu.


On Mon, 23 Apr 2012, Jun'ichi Nomura wrote:

> Hi Mikulas,
> 
> On 04/22/12 01:17, Mikulas Patocka wrote:
> > I created new patches that use rcu instead of map_lock, so they address 
> > the issues you mentioned. Get the new patches here:
> > http://people.redhat.com/mpatocka/patches/kernel/dm-lock-optimization/
> > 
> > performance with new patches:
> > no patch:               69.3
> > patch 1:                54.0
> > patch 1,2:              44.2
> > patch 1,2,3:            39.8
> > patch 1,2,3,4:          32.7
> 
> Thank you. I have 2 comments for the new patches.
> 
> synchronize_rcu could be put in dm_table_destroy() instead of __bind().
> I think it's safer place to wait.

I think the code is more readable if synchronizing rcu is just after 
assigning the pointer that is protected by rcu.

> io_lock could be converted to SRCU.
> I.e. something like:
>   On reader-side:
>     idx = srcu_read_lock(io_srcu);
>     if (!DMF_BLOCK_IO_FOR_SUSPEND)
>       split_and_process_bio();
>     srcu_read_unlock(io_srcu,idx);
>   In dm_suspend:
>     set_bit(DMF_BLOCK_IO_FOR_SUSPEND);
>     mb();
>     synchronize_srcu(io_srcu);
>     <from here, nobody will enter split_and_process_bio>
> That makes dm-optimize-percpu-io-lock.patch simpler.
> dm-optimize-take-io_lock-on-table-swap.patch may become simpler, too.
> 
> -- 
> Jun'ichi Nomura, NEC Corporation

Mikulas

  reply	other threads:[~2012-05-02  2:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19  3:03 [PATCHES]: dm lock optimization Mikulas Patocka
2012-04-19  5:17 ` Jun'ichi Nomura
2012-04-21 16:17   ` Mikulas Patocka
2012-04-23 10:56     ` Jun'ichi Nomura
2012-05-02  2:17       ` Mikulas Patocka [this message]
2012-05-10  4:33         ` Jun'ichi Nomura
2012-05-18  6:37           ` Mikulas Patocka
2012-05-23  6:27             ` Jun'ichi Nomura
2012-04-23 13:14 ` Joe Thornber
2012-05-02  0:03   ` Mikulas Patocka

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=Pine.LNX.4.64.1205012214560.24798@file.rdu.redhat.com \
    --to=mpatocka@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.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.