Re: Question about dummy_hcd

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

 



On Fri, 17 May 2013, Jean-Edouard Lejosne wrote:

> Hi,
> 
> I'm Jed, I'm currently using dummy_hcd and g_hid to fake a USB HID 
> device, and I'm struggling with a problem.
> 
> I'm sorry to bother you by e-mail. If I should ask my question on an IRC 
> channel, could you please point me to the right one?

No; email is appropriate.  But discussions like this should be carried 
out on the public mailing list.

> Anyway, here it is. Everything works right now, my device is up and 
> running. It is just awfully slow! I'm simulating an 8 fingers touch 
> device, but the gadget can't keep up with more than 2.
> After a lot of debugging, I realized that dummy_hcd seems to send only 
> one packet every 50 msec, instead of flushing the endpoint queue. It 
> even looks like it is by design...

dummy-hcd is supposed to run at roughly the same rate as a real host
controller.  But it has not been updated to use hrtimers, so it is 
limited by the resolution of the timer tick.  And it doesn't take the 
timer resolution into account in the proper way.

> My question is: is there a reason for that? What would be a good way to 
> make it faster?
> I know kernel programming, I'm just new to USB, especially gadgets...

What is HZ configured to be on your system?  If you set it to 1000,
does that help?  (Note the FIXME comment on line 1684 of dummy_hcd.c.)

Alan Stern

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