public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* struct tty_driver
@ 2003-02-11 14:44 Andries.Brouwer
  2003-02-12 18:52 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Andries.Brouwer @ 2003-02-11 14:44 UTC (permalink / raw)
  To: tytso; +Cc: linux-kernel

Ted, I wondered:

Looking at 2.5.60 I see

struct tty_struct {
	int     magic;
	struct tty_driver driver;
...

and it looks like this struct tty_driver is never modified.
Since it is rather large, why not replace it by
	struct tty_driver *driver;
?

As it is now, the initialization in init_dev() does
	tty->driver = *driver;
just duplicating constant data.

Is this a historical relict, or does this duplication have a function?

Andries

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: struct tty_driver
  2003-02-11 14:44 struct tty_driver Andries.Brouwer
@ 2003-02-12 18:52 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2003-02-12 18:52 UTC (permalink / raw)
  To: Andries.Brouwer; +Cc: linux-kernel

On Tue, Feb 11, 2003 at 03:44:07PM +0100, Andries.Brouwer@cwi.nl wrote:
> Ted, I wondered:
> 
> Looking at 2.5.60 I see
> 
> struct tty_struct {
> 	int     magic;
> 	struct tty_driver driver;
> ...
> 
> and it looks like this struct tty_driver is never modified.
> Since it is rather large, why not replace it by
> 	struct tty_driver *driver;
> ?
> 
> As it is now, the initialization in init_dev() does
> 	tty->driver = *driver;
> just duplicating constant data.
> 
> Is this a historical relict, or does this duplication have a function?

Nope.  The tty->ldisc should also be made into a pointer as well.
It's a historic relict; it's been a very, very long time since there's
been any variable data in the driver or ldisc structures.  

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-12 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-11 14:44 struct tty_driver Andries.Brouwer
2003-02-12 18:52 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox