Skip to contentSkip to conversation

re your change to the low_latency flag in the hso driver in 2.6.29-rc1

DISCUSSION Denis Joseph Barrow 2 participants 2 messages Jan 12, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Alan,
I remember removing the low_latency flag to 0 once & if I recall correctly performance was severely impacted & there may have been other problems which I don't recall. even worse I believe the code can now hang the kernel, the fix is simple, in put_rxbuf_data I'm dependent on the TTY_THROTTLED bit to exit the loop.
Now tty_insert_flip_string can return 0 bytes leading to an infinite loop if tty buffers are full, as write_length_remaining never goes to zero as I am dependent on the line discipline being called from tty_flip_buffer_push to set TTY_THROTTLED by calling flush_to_ldisc checking if curr_write_len=0 from tty_insert_flip_string might fix the problem Please look at put_rxbuf_data carefully, there might be other gremlins. The serial port is supposed to be high performance this fix will impact this

Signature · 13 lines
best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
[email protected]
www.option.com

Disclaimer:
http://www.option.com/company/disclaimer.shtml

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 2 lines

I remember removing the low_latency flag to 0 once & if I recall correctly performance was severely impacted & there may have been other problems which I don't recall.

The modern buffering and old buffering are rather different so that shouldn't be a problem.

Quoted 3 lines

Now tty_insert_flip_string can return 0 bytes leading to an infinite loop if tty buffers are full, as write_length_remaining never goes to zero as I am dependent on the line discipline being called from tty_flip_buffer_push to set TTY_THROTTLED by calling flush_to_ldisc

In all cases tty_insert_flip_string may return 0 for other reasons (eg out of memory).

Quoted 3 lines

checking if curr_write_len=0 from tty_insert_flip_string might fix the problem Please look at put_rxbuf_data carefully, there might be other gremlins. The serial port is supposed to be high performance this fix will impact this

Will do, but it should have no impact at all on throughput - in fact it ought to improve it. You can't call tty_flip_buffer_push() from an IRQ handler with tty->low_latency set anyway...

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html