From: Andrew Morton <andrewm@uow.edu.au>
To: James Simmons <jsimmons@suse.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
FrameBuffer List <linux-fbdev@vuser.vu.union.edu>,
Linux console project <linuxconsole-dev@lists.sourceforge.net>
Subject: Re: console spin_lock
Date: Thu, 18 Jan 2001 23:42:59 +1100 [thread overview]
Message-ID: <3A66E4D3.B2BEFCBB@uow.edu.au> (raw)
In-Reply-To: <Pine.LNX.4.21.0101171514050.266-100000@euclid.oak.suse.com>
James Simmons wrote:
> ...
> By you saying couldn't be acquired from interrupt context do you mean
> from a process context or do you mean it failed to aquire it while in
> the interrupt context?
Actually, printk() must always use __down_trylock().
> > - Get rid of console_tasklet. Do it in process context callback
> > or just do it synchronously.
>
> What about multidesktop systems? I have vgacon and mdacon working fine
> along each other. Each one has their own tasklet to allow them to work
> independent of each other. Meaning no race condition when both VC switch
> at the same time.
Ah. Thanks. That stuff was actually design-from-memory :) I'll take
a closer look when I have something other than a clockwork computer.
> > Assumption:
> > - Once the system is up and running, it's always safe to
> > call down() when in_interrupt() returns false - probably
> > not the case in parts of the exit path - tough.
>
> Don't forget the idle_task case as well. exit path?
This statement of mine was grade-A bollocks. printk cannot of
course call down(). It needs to use __down_trylock and buffer
it up if it fails. (faster, too!)
The subtler problem will be interrupt-capable drivers which
do a bare spin_lock() to serialise wrt their interrupt routines,
relying upon interrupts being disabled. They'll be deadlocky
and will need changing. That's trivial to find and fix though.
Anyway, this was just a heads-up that I'll be looking at
this stuff. Please allow me a week or so to provide
some substance. I read that the fbdev developers have
been seeking a fix for this for some time, so it seems
worth some effort.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-18 12:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-17 0:05 James Simmons
2001-01-17 13:49 ` Andrew Morton
2001-01-17 18:22 ` Roman Zippel
2001-01-17 23:40 ` James Simmons
2001-01-18 12:42 ` Andrew Morton [this message]
2001-01-18 21:50 ` Russell King
2001-01-19 1:23 ` James Simmons
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=3A66E4D3.B2BEFCBB@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=jsimmons@suse.com \
--cc=linux-fbdev@vuser.vu.union.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxconsole-dev@lists.sourceforge.net \
/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®