RE: [PATCH 1/1] usb: lpm: add boot flag to disable lpm

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

 



On Thu, 14 Apr 2016, Matthew Giassa wrote:

> I should also note that these "control" r/w calls are made very
> frequently. A thread is spawned for each camera that periodically polls
> for things like exposure levels, average brightness, etc, to update a
> metrics cache and UI display for said metrics.

That sounds like a disastrous recipe.

Instead of using a mutex, you should consider creating a dedicated
thread for each camera to handle the control interface.  Anybody else
that wants to use the control interface should ask the dedicated thread
to carry out the I/O on their behalf.  That way your program wouldn't
constantly be claiming and releasing interfaces.

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