mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kai Geek" <kaigeek@linuxmail.org>
To: "Linus Torvalds" <torvalds@osdl.org>, "Ingo Molnar" <mingo@elte.hu>
Cc: "Nick Piggin" <nickpiggin@yahoo.com.au>,
	lkml <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@osdl.org>,
	"Arjan van de Ven" <arjan@infradead.org>,
	"Nicolas Pitre" <nico@cam.org>,
	"Jes Sorensen" <jes@trained-monkey.org>,
	"Al Viro" <viro@ftp.linux.org.uk>,
	"Oleg Nesterov" <oleg@tv-sign.ru>,
	"David Howells" <dhowells@redhat.com>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	"Christoph Hellwig" <hch@infradead.org>,
	"Andi Kleen" <ak@suse.de>,
	"Russell King" <rmk+lkml@arm.linux.org.uk>
Subject: Re: [patch 08/19] mutex subsystem, core
Date: Tue, 03 Jan 2006 23:58:29 +0800	[thread overview]
Message-ID: <20060103155829.998327B386@ws5-10.us4.outblaze.com> (raw)

Hello,
can we run the semaphores from the console if we do it with mutex instead of interrupt context? in this case will the mutex codes be interrupted?
base a image run pid kernel/printk.c?
Best Regards,

----- Original Message -----
From: "Linus Torvalds" <torvalds@osdl.org>
To: "Ingo Molnar" <mingo@elte.hu>
Subject: Re: [patch 08/19] mutex subsystem, core
Date: 	Tue, 3 Jan 2006 07:38:41 -0800 (PST)

> 
> 
> 
> On Tue, 3 Jan 2006, Ingo Molnar wrote:
> > > > Is this an interrupt deadlock, or do you not allow interrupt 
> > contexts > to even trylock a mutex?
> >
> > correct, no irq contexts are allowed. This is also checked for if 
> > CONFIG_DEBUG_MUTEXES is enabled.
> 
> Note that semaphores are definitely used from interrupt context, and as
> such you can't replace them with mutexes if you do this.
> 
> The prime example is the console semaphore. See kernel/printk.c, look for
> "down_trylock()", and realize that they are all about interrupts.
> 
> 			Linus
> -

+-+-+-+ BEGIN PGP SIGNATURE +-+-+-+
Version: GnuPG v1.4.2 (GNU/Linux)
   .-.      .-.    _              
   : :      : :   :_;             
 .-' : .--. : `-. .-. .--.  ,-.,-.
' .; :' '_.'' .; :: :' .; ; : ,. :
`.__.'`.__.'`.__.':_;`.__,_;:_;:_;

Kai "Ozgur" Geek
Network Engineer
PGP ID: B1B63B6E
+-+-+-+ END PGP SIGNATURE +-+-+-+

-- 
_______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.

Powered by Outblaze

             reply	other threads:[~2006-01-03 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 15:58 Kai Geek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-03 16:46 Ingo Molnar
2006-01-03 10:08 Ingo Molnar
2006-01-03 13:15 ` Nick Piggin
2006-01-03 15:05   ` Ingo Molnar
2006-01-03 15:38     ` Linus Torvalds
2006-01-03 15:42       ` Ingo Molnar
2006-01-03 18:00 ` Oleg Nesterov
2006-01-03 16:49   ` Ingo Molnar
2006-01-02 16:34 Ingo Molnar

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=20060103155829.998327B386@ws5-10.us4.outblaze.com \
    --to=kaigeek@linuxmail.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jes@trained-monkey.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=nico@cam.org \
    --cc=oleg@tv-sign.ru \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.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

all inboxes | Powered by JetHome®