From: Theodore Ts'o <ty...@va...> - 2000-08-22 15:32:06
|
Date: Tue, 22 Aug 2000 13:48:23 +0200 (MET DST) From: Bjorn Wesen <bj...@sp...> Forget the circular buffer and use a chain of buffers instead on the incoming queue. A circular buffer is just a fixed buffer-chain of 1-byte elements, but with an overflow headache and a flipping problem.. Trust me, you don't want to re-invent BSD clists. They are a performance disaster. A line discipline doing raw tty I/O can do zero-copy, in the sense that the serial driver on the receiving end gives away its received buffers to the upper levels. Just like in the network stack. I verymuch doubt that given all of setup overhead and general hair/complexity necessary for zero-copy, that this would be useful *at* *all* in any real-life application. The code is already optimized for single-copy; given the relative speeds of serial transfer rates versus memory copy speeds, this is a pointless optimization. - Ted |