Re: [PATCHES]: dm lock optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux