Re: [RFC/PATCH 1/2] usb: gadget: u_char: introduce chardev abstraction layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 09, 2010 at 06:54:30AM -0800, Greg KH wrote:
> Why is this needed?  Why not just use the serial driver instead?  That
> should provide you with exactly the same end result, right?

we experienced several problems with tty layer. The biggest of them is
a race between flush_to_ldisc() and ->receiv_buf() which makes the line
discipline (I guess only n_tty) loose bytes in some circumstances.

On top of that there's also the performance issues with tty. the
u_serial.c forces us to push each bMaxPacketSize packet to the
controller driver which prevents us from actually getting some good deal
out of the DMA engine. With u_char.c we are unloading based on what's in
the kfifo right now (maybe we should use PAGE_SIZE transfers since our
kfifo is allocated using vmalloc()), and we can easily optimize that on
a per-product basis.

Performance is a key concept here; specially when we need to flash
hundreds of thousands of devices in a production line. Every milisecond
counts.

I tried to explain this as much as possible on the PATCH 0/2 mail, but
it seems I wasn't clear enough, sorry for that.

-- 
balbi

--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux