All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@redhat.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: Alan Cox <alan@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	James Simmons <jsimmons@infradead.org>,
	Jeff Dike <jdike@addtoit.com>
Subject: Re: TTY layer locking design
Date: Fri, 17 Nov 2006 18:15:43 -0500	[thread overview]
Message-ID: <20061117231543.GE20362@devserv.devel.redhat.com> (raw)
In-Reply-To: <200611172311.38744.blaisorblade@yahoo.it>

On Sat, Nov 18, 2006 at 12:11:38AM +0200, Blaisorblade wrote:
> *) who is maintaining this aspect of code ? The only name found in MAINTAINERS 
> and CREDITS is the one of James Simmons.

There is no one maintainer. I did some of the documentation and buffering
abstraction. Paul Fulghum wrote the SMP aware and clever locking bits
for the buffer handling. Since then other people have worked on the 
reference locking and the current->tty races and fixed those
 
> *) is the current design reputed solid? I'm not only talking about the big 
> kernel lock, but also about whether drivers need to reinvent (incorrectly) 
> the wheel for their locking. UML drivers are very bad on this, but I've found 
> difficulty both at reading the code and at finding documentation.

As of 2.6.19-rc I think the majority of the big issues are sorted

> *) there is no generic way to handle tty's which are also consoles, except 
> drivers/char/vt.c - that code is written as if it were the only case where 
> that applies. Instead, UML drivers are an exception to this - UML cannot use 
> virtual terminals.

Untrue - many serial drivers support being consoles

> I'm trying to establish whether it is possible, for instance, for ->close to 
> be called in parallel to ->write and such; in other driver layer this is 

Close/Write cannot occur in parallel. The VFS guarantees this

> Also, since write must use a spinlock because it must protect from interrupt 
> races, and open cannot, must we use both a mutex and a spinlock in ->write 
> and similar methods? This can be avoided in other drivers.

See the existing drivers. Open can use spinlocks


      reply	other threads:[~2006-11-17 23:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17 22:11 TTY layer locking design Blaisorblade
2006-11-17 23:15 ` Alan Cox [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=20061117231543.GE20362@devserv.devel.redhat.com \
    --to=alan@redhat.com \
    --cc=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.