lkml.org 
[lkml]   [2008]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Announce: Semaphore-Removal tree
On Fri, Apr 25, 2008 at 02:22:31PM -0700, Daniel Walker wrote:
> If you can make a case for converting some semaphores to spinlocks be my
> guest .. If you have good reasoning I wouldn't stand in the way.. (Real
> time converts all the spinlocks to mutexes anyway ..)

Right at hand I have the XFS inode hash lock was converted from a rw_semaphore
to a rwlock_t becuase the context switch overhead was killing
performance in various benchmarks. This is a very typical scenary for
locks that are taken often and held for a rather short time. Add to
that fact that a spinlock is compltely optimized away for an UP kernel
while a mutex is not and the amount of memory that any mutex takes
compared to a spinlock you have a clear winner.



\
 
 \ /
  Last update: 2008-04-26 11:33    [W:0.334 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site