Re: readers-writers mutex

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

 



On 4/5/06, Arjan van de Ven <[email protected]> wrote:
> On Wed, 2006-04-05 at 15:21 -0700, Joshua Hudson wrote:
> > Since we are moving from semaphores to mutex, there should be a
> > mutex_rw.
>
> should there really? We discussed this briefly during the mutex work
> the conclusion was that rw_sems
> 1) are rare (thankfully; they're highly expensive)
> 2) do not have mutex semantics
>
> so... can you explain how your rw_mutex is behaving different from an
> rw_sem, and can you explain what the gains are for that conversion?
> (eg for mutex it was better defined semantics, lots better debugging
> (possible due to the semantics) and more performance). What is that for
> rw_mutex ?
>
Just this: it inherits the better debugging from mutex. And if a
rw_sem is more expensive than two mutexes, this is cheaper where
it can be used (no ability to downconvert a lock).

Oh, and if nobody uses it, kernel size changes by 0k.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux