From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Theodore Tso <tytso@mit.edu>, Jon Smirl <jonsmirl@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: tty's use of file_list_lock and file_move
Date: Tue, 11 Jul 2006 20:44:57 +0100 [thread overview]
Message-ID: <20060711194456.GA3677@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060711012904.GD30332@thunk.org>
On Mon, Jul 10, 2006 at 09:29:04PM -0400, Theodore Tso wrote:
> On Mon, Jul 10, 2006 at 07:49:31PM -0400, Jon Smirl wrote:
> > How about the use of lock/unlock_kernel(). Is there some hidden global
> > synchronization going on? Every time lock/unlock_kernel() is used
> > there is a tty_struct available. My first thought would be to turn
> > this into a per tty spinlock. Looking at where it is used it looks
> > like it was added to protect all of the VFS calls. I see no obvious
> > coordination with other ttys that isn't handled by other locks.
>
> No, it was just a case of not being worth it to get rid of the BKL for
> the tty subsystem, since opening and closing tty's isn't exactly a
> common event. Switching it to use a per-tty spinlock makes sense if
> we're going to rototill the code, but to be honest it's probably not
> going to make a noticeable difference on any benchmark and most
> workloads.
It's not that simple - remember that you must be able to open a tty
in non-blocking mode while someone else is opening the same tty in
blocking mode, _and_ succeed. (iow, the getty waiting for call-in
and you want to dial out case.)
If we go for merely replacing BKL with some other lock, each tty
driver has to be able to drop that lock when it decides to sleep due
to no carrier in its open method... which is kind'a yuck.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2006-07-11 19:45 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 15:10 tty's use of file_list_lock and file_move Jon Smirl
2006-07-10 17:33 ` Alan Cox
2006-07-10 17:27 ` Jon Smirl
2006-07-10 18:05 ` Alan Cox
2006-07-10 18:09 ` Jon Smirl
2006-07-10 23:18 ` Alan Cox
2006-07-10 22:35 ` Jon Smirl
2006-07-10 23:15 ` Alan Cox
2006-07-10 23:04 ` Jon Smirl
2006-07-10 23:49 ` Jon Smirl
2006-07-11 1:29 ` Theodore Tso
2006-07-11 2:16 ` Jon Smirl
2006-07-11 10:12 ` Alan Cox
2006-07-11 12:28 ` Jon Smirl
2006-07-11 13:15 ` Paulo Marques
2006-07-11 13:42 ` Jon Smirl
2006-07-11 3:33 ` Jon Smirl
2006-07-11 19:52 ` Russell King
2006-07-11 19:44 ` Russell King [this message]
2006-07-11 22:08 ` Jon Smirl
2006-07-11 22:37 ` Alan Cox
2006-07-11 23:28 ` Paul Fulghum
2006-07-12 0:00 ` Jon Smirl
2006-07-11 23:50 ` Jon Smirl
2006-07-12 3:55 ` Jon Smirl
2006-07-12 11:37 ` Alan Cox
2006-07-10 23:39 ` Theodore Tso
2006-07-11 0:25 ` Jon Smirl
2006-07-12 6:27 ` Pekka Enberg
2006-07-12 11:19 ` Alan Cox
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=20060711194456.GA3677@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jonsmirl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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