|
From: <la...@no...> - 2011-01-25 03:29:31
|
Hi Linus,
Thanks. Since adding '02' is ok and do not incur performance decrease, that's fine for us. Thanks.
Regards,
Lan Liu
-----Original Message-----
From: ext Linus Walleij [mailto:lin...@gm...]
Sent: Tuesday, January 25, 2011 2:57 AM
To: lib...@li...
Cc: Li Feng.5 (Nokia-MS/Beijing); Tarvainen Miska (Nokia-MS/Beijing); Quadros Roger (Nokia-MS/Helsinki); Wang Hongyu (Nokia-MS/Beijing)
Subject: Re: [Libmtp-discuss] udev and libmtp: detect a new mtp device based on its USB interface descriptor
2011/1/24 <la...@no...>:
> Adding '02' to the 'ATTR{bDeviceClass}' of above rule would be a direct solution to this.
I've added this in the latest git...
> But if we are worried that querying an interface descriptor of a device, would affect
> the device bootup time, esp, when this device has multi interfaces, we can firstly
> resort to the information under sysfs, without operating with this device, to check
> if it is a mtp device. If this check failed, then invoke 'mtp-probe' to do further check.
The time problem is not with the probing of the interfaces, this is fast.
The problem is invoking the program, mtp-probe, which is ~9 KB
(two pages) of code needing to be paged in from the file system/cache.
IIRC the previous approach for checking the interface invoked a shell,
which is (bash) 877 KB.
The shell is usually paged into memory though, so I dunno. If you can
benchmark it, it'd be great.
Linus
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Libmtp-discuss mailing list
Lib...@li...
https://lists.sourceforge.net/lists/listinfo/libmtp-discuss
|