tty: Enable configurable tty flip buffer limit

Allow driver to configure its maximum flip buffer memory
consumption/limit. This is necessary for very-high speed line
rates (in excess of 10MB/sec) because the flip buffers can
be saturated before the line discipline has a chance to
throttle the input.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley
2013-11-22 12:09:55 -05:00
committed by Greg Kroah-Hartman
parent 82f91fe092
commit 4d18e6eff8
3 changed files with 23 additions and 3 deletions

View File

@@ -61,6 +61,7 @@ struct tty_bufhead {
struct tty_buffer sentinel;
struct llist_head free; /* Free queue head */
atomic_t memory_used; /* In-use buffers excluding free list */
int mem_limit;
struct tty_buffer *tail; /* Active buffer */
};
/*