adaptive mutexes, was Re: btrfs_tree_lock & trylock

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stephen Hemminger <shemminger@...>
Cc: Andi Kleen <andi@...>, Chris Mason <chris.mason@...>, <linux-btrfs@...>, <linux-kernel@...>
Date: Monday, September 8, 2008 - 1:16 pm

On Mon, Sep 08, 2008 at 08:07:51AM -0700, Stephen Hemminger wrote:

Well, the traditional wisdom in kernel land is that you want a spinlock
if the contention phases are short.  But we grow more an more places
where we might do sleep under the lock.  One optimization would be
to spin, but only if the mutex holder is not sleeping.  Or we make the
spinning a completely different API, mutex_lock_adaptive()

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
adaptive mutexes, was Re: btrfs_tree_lock & trylock, Christoph Hellwig, (Mon Sep 8, 1:16 pm)