lkml.org 
[lkml]   [2005]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 0/9] mutex subsystem, -V4
Xavier Bestel <xavier.bestel@free.fr> wrote:
>
> On Fri, 2005-12-23 at 15:57, Russell King wrote:
> > On Fri, Dec 23, 2005 at 06:51:18AM -0800, Andrew Morton wrote:
> > > Nicolas Pitre <nico@cam.org> wrote:
> > > > How can't you get the fact that semaphores could _never_ be as simple as
> > > > mutexes? This is a theoritical impossibility, which maybe turns out not
> > > > to be so true on x86, but which is damn true on ARM where the fast path
> > > > (the common case of a mutex) is significantly more efficient.
> > >
> > > I did notice your comments. I'll grant that mutexes will save some tens of
> > > fastpath cycles on one minor architecture. Sorry, but that doesn't seem
> > > very important.
> >
> > Wow.
>
> Yes, wow. Andrew doesn't seem aware of embedded linux people, for whom
> cycles are important and ARM is king.
>

Please, spare me the rhetoric.

Adding a new locking primitive is a big deal. We need good reasons for
doing it. And no, I don't think a few cycles on ARM is good enough. I'd
be very surprised if it was measurable - the busiest semaphore is probably
i_sem and when it's taken we're also doing heavy filesystem operations
which would swamp any benefit. And if we're going to churn i_sem then we
perhaps should turn it into an rwsem so we can perform concurrent lookups
(at least). We do disk I/O with that thing held.

Look, I'm not wildly against mutexes - it's not exactly a large amount of
code. I just think they're fairly pointless and I regret that we seem to
be diving into adding yet another locking primitive without having fully
investigated improving the existing one.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-23 16:31    [W:0.055 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site