FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 09-12-2011, 01:52 PM
Joe Thornber
 
Default dm-block-manager: use spinlocks that don't disable interrupts

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.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

yep

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 09-12-2011, 01:57 PM
Christoph Hellwig
 
Default dm-block-manager: use spinlocks that don't disable interrupts

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 )

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 09-12-2011, 02:11 PM
Joe Thornber
 
Default dm-block-manager: use spinlocks that don't disable interrupts

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@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org