Thread (19 messages) flat view 19 messages, 5 authors, 2014-07-11

Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

From: One Thousand Gnomes <hidden>
Date: 2014-07-10 15:50:41
Also in: lkml

On Thu, 10 Jul 2014 14:37:37 +0000
David Laight [off-list ref] wrote:
From: Olivier Sobrie
...
quoted
The function put_rxbuf_data() is called from the urb completion handler.
It puts the data of the urb transfer in the tty buffer with
tty_insert_flip_string_flags() and schedules a work queue in order to
push the data to the ldisc.
Problem is that we are in a urb completion handler so we can't wait
until there is room in the tty buffer.
The tty provides the input queue, if the queue is full then just chuck
the data in the bitbucket.  hso is trying to be far too clever.

If hso is fast enough that the buffering isn't sufficient on the tty side
then we need to fix the tty buffer size.

Arguably what we need are tty fastpaths for non N_TTY but thats rather
more work. There's no fundamental reason that hso can't throw the buffer
at buffer straight at the PPP ldisc and straight into the network stack -
just that 

1. The tty mid layer glue is standing in the way
2. The change of line discipline code has to lock against it

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help