Re: [RFC][PATCH] TTY flip buffer SMP changes
From: Alan Cox
Date: Thu Oct 07 2004 - 16:11:39 EST
(Sorry not quoting but if you will use attachments 8))
Problem 1:
Agree. Using a common function is definitely needed, lets at least have
all the bugs in one place.
Problem 2:
Known. See the comment in the Documentation/tty.txt
Add:
Problem 3:
The buffering model is useless for virtualised devices or high speeds.
I've been pondering taking a very small performance hit to fix the
entire flipping mess (pardon the pun) and also to speed up the actual
common critical path (ppp) in the process.
Now that networking is not a kernel option it seems slightly dumb that
the tty layer doesn't just use the sk_buff model (probably not code).
kmalloc is very fast and it kills TTY_DONT_FLIP because every buffer is
owned by _one_ person at a time. (sk_buff's dont direclty fit too well
because we push both error and bits per byte and don't last time I
checked support recycling).
Another nice effect is simplifying the ldisc and driver level locking.
Drivers queue buffers, ldiscs eat buffers. If the driver queues a buffer
and there is temporarily no ldisc it does not get lost.
This also saves us memory - most tty's spend most of their time idle.
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/