[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mrlocks vs. rw_semaphores
On Tue, 2002-12-24 at 10:40, Alexander Kabaev wrote:
> Looking through XFS change history, I noticed that several uses of mrlocks in
> the tree have been replaced with Linux's native rw_semaphores. What was the
> reason for this? Are rw_semaphores performing significantly better than
> mrlocks, or is there a subtle difference in their semantics which make
> rw_semaphores more suitable for the places they are used in now?
>
rw_semaphores are lighter weight than mrlocks, and suitable for use
as a replacement for them in some cases. In other cases we use semantics
not available with rw_semaphores, we have also found that if we add
these semantics, we run into starvation problems with the locks. This
is why mrlocks still exist in the linux code.
Steve