Re: [PATCH] dm-block-manager: use spinlocks that don't disable interrupts

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

 



On Mon, Sep 12, 2011 at 09:57:42AM -0400, Christoph Hellwig wrote:
> On Mon, Sep 12, 2011 at 07:24:48AM -0400, Mikulas Patocka wrote:
> > dm-block-manager: use spinlocks that don't disable interrupts
> > 
> > This will never be called in an interrupt context, so we don't have to use
> > spinlocks that disable interrupts.
> 
> The code looks like a re-implementation of rw_semaphores to me.
> 
> Is there any good reason to do this? (hint: normally there isn't :))

Yes, largely it is.  The major difference is it errors on recursive
use (which can occur due to malicious metadata as well as programming
errors).  This is far better than deadlocking (which rwsemaphores to),
livelocking (which no-locking may do), or not noticing something's
wrong (which no-locking may do).

I can understand that people may well want to turn locking off to get
the better performance.  So there's a Kconfig option for this.

- Joe

--
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