On May 12, 2009, at 12:24 PM, Alan Cox wrote:
easily have misunderstood how it fits together. Is it a problem in
the line discipline, my driver, or me?
The ldisc
My first thought would be to make the throttle() path in n_tty do
something conceptually like:
if(test_and_set_bit()) {
ldisc->throttle();
if (!test_bit())
ldisc->unthrottle();
}
That would mean we relaxed the previous (intended) behaviour of
matched
pairs but avoids adding a lot of locking horrors and scaling fun.
Despite what I said in my first message, the atomic flag that
currently causes the throttling and unthrottling to be done in matched
pairs is in the tty core rather than the line discipline. So it
sounds like you're suggesting a change in tty_ioctl.c rather than in
n_tty.c, which presumably means it would affect other line
disciplines. I believe it would fix the badness I'm seeing: I'll give
it a try.
Rob.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html