Re: tty: ctrl-c not always echoed, especially under load

From: Joe Peterson
Date: Mon Aug 04 2008 - 19:36:57 EST


Alan Cox wrote:
> If the output buffer is full then echoed characters/^C etc will vanish the
> way n_tty implements its buffering internally. It's always worked that
> way.

But since the flush is done just prior, shouldn't the buffer be empty
just before the ^C is written? Or are you saying that the buffer could
refill in the meantime (between the flush and the ^C) if the chars are
comming in too fast?

What about the order of flush?... Currently, it is:

n_tty_flush_buffer(tty); (ldisc buf)
tty_driver_flush_buffer(tty); (driver buf)

Would it be better to reverse this order, flushing the driver buffer
first so characters do not then refill the ldisc buffer before the
driver buffer can be flushed?

-Thanks, Joe
--
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/