2009-06-24 02:32:33     the performance of the gadget_file-backed_storage

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-24 02:32:33     the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 76216   

 

hi, i met a problem on the usb gadget file-backed storage

 

the version of uclinux distribution is uclinux-dist-trunk-svn-7715, and the version of Linux kernel is 2.6.28.3

 

 

 

according to the docs of the gadget_file-backed_storage, i created a file-backed storage(Vfat) on my nand flash.

 

connecting it to my PC(windows xp) by usb device was also successful.

 

BUT when i copied some files to the usb device, the tty console often printed some kernel info like:

 

[17179723.420000] g_file_storage gadget: high speed config #1

[17179733.412000] g_file_storage gadget: high speed config #1

[17179744.404000] g_file_storage gadget: high speed config #1

[17179754.368000] g_file_storage gadget: high speed config #1

[17179765.364000] g_file_storage gadget: high speed config #1

[17179775.356000] g_file_storage gadget: high speed config #1

 

 

AND i found that if the console print this info, the copy progress will lag for a while.

 

for example, if i copyed a file about 5MB size to the storage, it would lag many times and totally took me one or two minutes.

QuoteReplyEditDelete

 

 

2009-06-24 03:24:30     Re: the performance of the gadget_file-backed_storage

Yi Li (CHINA)

Message: 76218   

 

Print messages on serial console is slow. How about adjust your log level ( using "klogd -c" or change kernel boot options).

 

-YI

QuoteReplyEditDelete

 

 

2009-06-24 03:58:21     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 76220   

 

thank you for your reply.

 

but you mean the print will affect the performance of gadget...and let me shutdown these print?

 

i did it but it did not seam to work better....

 

 

 

And the lag i said always took more than 5 seconds. A print may not take such long time....

 

i guess it just like some error occurs to the gadget driver, and the driver reset its config(so print that kernel info).

 

 

 

There is a another phenomenon that if i connect a usb port to my PC,the console will also print these info and the usb device(for example,"removable disk (F:)") will appear on the PC after a long time about 20-30 seconds.

QuoteReplyEditDelete

 

 

2009-06-24 07:49:38     Re: the performance of the gadget_file-backed_storage

Mike Frysinger (UNITED STATES)

Message: 76236   

 

you're using old versions of software.  you should be using the *latest* 2009R1 svn branches.

QuoteReplyEditDelete

 

 

2009-06-25 00:14:45     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 76288   

 

hi mike, has the lastest version resolved this problem?

 

i found the last version of the kernel is 2.6.30.  there are lots of differnce between these two versions. my older device drivers may not be able to run on the newer one directly. so updating to a newer version kernel may take me much time.

 

if this problem also exists in ther newer one, i may not consider to update to the newer version right now.

 

 

 

thank you.

QuoteReplyEditDelete

 

 

2009-06-25 01:35:05     Re: the performance of the gadget_file-backed_storage

Mike Frysinger (UNITED STATES)

Message: 76290   

 

do not use trunk, use the 2009R1 branch like i already said

QuoteReplyEditDelete

 

 

2009-06-25 05:44:43     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 76318   

 

thank you,mike

 

i got ./drivers/usb dir from the branch(version 2.6.28.10).

 

because i need the other drivers to start my system,  i only updated the usb dir.

 

but it seams to be much slower.......and if i copy a big file(5MB) to the gadget storage, it always become copying failed.   win xp shows the msg--"Cannot copy: parameter incorrect".

 

 

 

our testing engineer show me another phenomenon.  sometimes he copys some files to the gadget storage, but the uclinux cant find these files.

 

only after reboot the board, they can appear in the nand flash.

 

it seams to be some bug at the file nodes' refreshing.

QuoteReplyEditDelete

 

 

2009-06-25 10:30:27     Re: the performance of the gadget_file-backed_storage

Robin Getz (UNITED STATES)

Message: 76333   

 

Nicole:

 

Which USB solution are you using? & What Blackfin part?

 

-Robin

QuoteReplyEditDelete

 

 

2009-06-27 00:42:01     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 76417   

 

hi ,robin

 

i'm using bf527 usb OTG.

 

 

 

thank you

QuoteReplyEditDelete

 

 

2009-07-21 22:09:45     Re: the performance of the gadget_file-backed_storage

Sonic Zhang (CHINA)

Message: 77796   

 

Try to use a faster USB memory stick and ext2 fs rather than fat.

 

Fat is very slow.

QuoteReplyEditDelete

 

 

2009-07-21 23:35:16     Re: the performance of the gadget_file-backed_storage

Yi Li (CHINA)

Message: 77802   

 

Please follow the steps in :   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:usb-gadget:file-backed_storage#use_nand_flash_on_bf548-ezkit_as_usb_mass_storage

 

Use yaffs2 (if you are using 2009R1 branch), or use UBIFS, then mount a VFAT image (if you have to use VFAT). Using VFAT directly on nand is very slow.

 

-Yi

QuoteReplyEditDelete

 

 

2009-07-22 20:58:12     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 77894   

 

thankyou sonic,thank you yi.

 

@sonic

 

can the ext2 fs be recognized by windows xp/vista directly? i think it may need some software like fs2explorer?

 

 

 

@Yi

 

i'm now using the file-backed vfat fs on yaffs2

 

and i mount the vfat image to a directory.

 

i'm not using vfat directly.....

QuoteReplyEditDelete

 

 

2009-07-22 23:03:17     Re: the performance of the gadget_file-backed_storage

Sonic Zhang (CHINA)

Message: 77897   

 

Yes, there is a 3rd party drive for xp/vista to support ext2. But, you actually should mount a loop fat file system on top of a file in the ext2 partition for windows.

QuoteReplyEditDelete

 

 

2009-07-23 01:25:23     Re: the performance of the gadget_file-backed_storage

Nicole Otsuka (CHINA)

Message: 77900   

 

it may be used by windows users and i think it's better not to let them install an additional driver....

 

"mount a loop fat file system on top of a file in the ext2 partition for windows", does it mean that windows can recognize this partition as a vfat filesystem?

 

it sounds good.....can you give me a doc or a example like something Yi gave me above?

 

Thank you

QuoteReplyEditDelete

 

 

2009-07-23 04:45:58     Re: the performance of the gadget_file-backed_storage

Sonic Zhang (CHINA)

Message: 77940   

 

See the same doc mentioned by Li Yi. Only replace the yaffs file system by ext2 on your USB memory stick.

Attachments

    Outcomes