public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjanv@infradead.org>,
	Nicolas Pitre <nico@cam.org>,
	Jes Sorensen <jes@trained-monkey.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	David Howells <dhowells@redhat.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
	Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [patch 2/8] mutex subsystem, add asm-generic/mutex-[dec|xchg].h implementations
Date: Fri, 23 Dec 2005 08:45:06 +0100	[thread overview]
Message-ID: <20051223074506.GA9043@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0512221550290.14098@g5.osdl.org>


* Linus Torvalds <torvalds@osdl.org> 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

      reply	other threads:[~2005-12-23  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 23:04 [patch 2/8] mutex subsystem, add asm-generic/mutex-[dec|xchg].h implementations Ingo Molnar
2005-12-22 23:56 ` Linus Torvalds
2005-12-23  7:45   ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051223074506.GA9043@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjanv@infradead.org \
    --cc=bcrl@kvack.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jes@trained-monkey.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=oleg@tv-sign.ru \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@osdl.org \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox