* Linus Torvalds <[email protected]> wrote:
> On Fri, 23 Dec 2005, Ingo Molnar wrote:
> >
> > add the two generic mutex fastpath implementations.
>
> Now this looks more like it. This is readable code without any #ifdef's in
> the middle.
>
> Now the only #ifdef's seem to be for mutex debugging. Might it be
> worthwhile to have a generic debugging, that just uses spinlocks and
> just accept that it's going to be slow, but shared across absolutely
> all architectures?
yeah, that's how it's working right now - the debugging variant still
includes the arch header, but ignores it, and always does the slowpath.
That's one of the advantages of the arch defining the fastpath, but not
the API! Debugging needs to set up more state so it needs the spinlock
all the time.
> obj$(CONFIG_MUTEX_DEBUG) += mutex-debug.c
>
> in the kernel/ subdirectory? That way you could _really_ have a clean
> separation, with absolutely zero pollution of any architecture mess or
> debugging #ifdef's in any implementation code.
i think we are quite close to this already. We still want to share the
slowpath because we want to debug it. I'll try to put the mutex-debug.c
functions into a separate object file, but that introduces more
interfaces between the two than i wanted to - even if debugging is slow,
mutexes with full debugging are still faster in the VFS test than
semaphores ;) I also wanted to introduce a lighter mode of debugging
that could have the fastpath enabled, and which distributions could
enable by default in their QA phase. (just like SPINLOCK_DEBUG)
Ingo
-
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]