Speed up DeviceKit device probing on really slow devices

Linus Torvalds torvalds at linux-foundation.org
Tue Jan 19 14:54:35 PST 2010



On Tue, 19 Jan 2010, David Zeuthen wrote:
> 
> As Kay said on the util-linux-ng list, the plan is to use blkid for this
> in the future - so at some point udisks-part-id will go away.

I hope that blkid will be less of a pig by then. It looks like the 
partition probing of blkid is (once more) overly complete at the expense 
of simplicity and performance. 

After looking at blkid IO patterns, it was a pleasure to see 
udisks-part-id just care about the normal case.

> (see e.g. http://people.freedesktop.org/~david/gdu-edit-partition.png 
> for how this information is used)

So that's a bit scary, if the detection program needs to do all of that. I 
already object to the fact that the kernel took time to settle the device 
and scan the partitions (which defaults to a horrible five-second settling 
time - although fixing it to be 1s was trivial), but then that partition 
scan was ignored, and when I started this whole saga, blkid + DeviceKit 
took a total of one _minute_ to scan that embroidery device.

Now it's down to 15 seconds, which is better. But it's still an annoyingly 
long time.

Mentally do this: imagine inserting a USB device, and then count slowly to 
fifteen to simulate how long it is before the desktop reacts to your 
device insertion. Doesn't feel so great.

			Linus


More information about the devkit-devel mailing list