Re: Slow USB storage device?

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

 




On Mon, 18 Jan 2010, Linus Torvalds wrote:
> 
> So how I get
> 
> 	[root@EeePC misc-utils]# time ./blkid /dev/sdc1
> 	/dev/sdc1: SEC_TYPE="msdos" TYPE="vfat" 
> 
> 	real	0m1.342s
> 	user	0m0.015s
> 	sys	0m0.033s
> 
> which is a _lot_ better, and quite acceptable. It's not the 8kB read that 
> you claimed, but it's fine.
> 
> This improves the full-disk case too, but not enough:
> 
> 	[root@EeePC misc-utils]# time ./blkid /dev/sdc
> 
> 	real	0m4.968s
> 	user	0m0.023s
> 	sys	0m0.047s
> 
> I think it's still unacceptable to take five seconds to notice that it's 
> just a regular DOS partition thing, but it is certainly a lot faster than 
> it used to be.

Interestingly, with the faster probe, the disk now also shows up on the 
desktop. It seems that devkit (or something else) has some timeout thing, 
so excesively slow device discovery is not just a performance problem, 
it's literally a _correctness_ problem!

But it still takes 10+ seconds all told, I suspect there is some other 
thing going on than just devid. But if that whole-disk case can be tweaked 
down to the one-second range too, it would all be quite useable, if not 
exactly "snappy".

Anyway, I think I can give you guys a disk image, since this literally is 
a totally empty vfat filesystem (so there are no copyright issues or 
anything). The disk dump is funny:

	[root@EeePC ~]# od -x diskdump 
	0000000 0000 0000 0000 0000 0000 0000 0000 0000
	*
	0000660 0000 0000 0000 0000 0000 0000 0000 0080
	0000700 0000 0001 0000 0020 0000 03db 0000 0000
	0000720 0000 0000 0000 0000 0000 0000 0000 0000
	*
	0000760 0000 0000 0000 0000 0000 0000 0000 aa55
	0001000 0000 0000 0000 0000 0000 0000 0000 0000
	*
	0040000 3ceb 2990 277b 6a60 4849 0043 0802 0001
	0040020 0002 db02 f803 0001 003f 00ff 0020 0000
	0040040 0000 0000 0080 0029 0000 4e00 204f 414e
	0040060 454d 2020 2020 4146 3154 2032 2020 0000
	0040100 0000 0000 0000 0000 0000 0000 0000 0000
	*
	0040760 0000 0000 0000 0000 0000 0000 0000 aa55
	0041000 0000 0000 0000 0000 0000 0000 0000 0000
	*
	1734000

ie it really is just almost all zeroes, except for the minimal DOS 
partition table, and the minimal VFAT info. It literally compresses down 
to 153 bytes of bz2 data, so I'm attaching 'diskdump.bz2' here as a 
test-case.

That way you have a 505kB image you can play with, and maybe even have a 
test-case for it reading the minimal amount of data.

			Linus

Attachment: diskdump.bz2
Description: BZip2 compressed data


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux