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

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

 



I like that approach, and considered going that route. The problem is
that it would either require my interface library to be re-written as a
system service/daemon/resmgr, or I'd have to re-write a substantial
portion of it to check for a singleton instance of the library at load
time, and it seems to me a nightmare to handle all the different ways it
could be (mis)used. The library also runs on multiple operating systems
(WinXp through Win10, Linux on arm/arm64/x86/x64, etc), and I can't
justify such a large re-write for one subsystem (ie: linux USB).

One other person who commented earlier, Oliver Neukum, noted this might
be a useful debug feature (disable LPM). It's a heavy hammer to throw at
the problem, but it does get the job done. Is the primary concern
against it mainly to prevent an excessive number of boot parameters
growing with time?

============================================================
Matthew Giassa, MASc, BASc, EIT
Security and Embedded Systems Specialist
linkedin: https://ca.linkedin.com/in/giassa
e-mail:   matthew@xxxxxxxxxx
website:  www.giassa.net

> -------- Original Message --------
> Subject: RE: [PATCH 1/1] usb: lpm: add boot flag to disable lpm
> From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Date: Thu, April 14, 2016 8:56 am
> To: Matthew Giassa <matthew@xxxxxxxxxx>
> Cc: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>,     Greg KH
> <gregkh@xxxxxxxxxxxxxxxxxxx>,  <linux-usb@xxxxxxxxxxxxxxx>
> 
> 
> 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