[En-Nut-Discussion] Improvement for faster mounting of large SD cards

Ulrich Prinz uprinz2 at netscape.net
Wed Jan 20 08:34:29 CET 2010


Hi guys! 
 
On Tue, 19 Jan 2010 09:33:52 +0100, "Rob van Lieshout \(PragmaLab\)" 
<info at pragmalab.nl> wrote: 
> Hello Malte 
>  
>> I am using a 4GB SD card together with Nut/OS. Unfortunately, mounting 
>> a volume took several minutes.  
>  
> Using up to 8GB SD-HC cards, we have to same problem regarding the long 
> mounting time. Since the number of free clusters is only needed when you 
> start  write operations, I slightly modified the code so that the free 
> clusters are not counted during the mount process (that now takes less 
than 
> a second on a 14.57 MHz Mega256). The first time the card is asked to 
write 
> data, the clusters are counted, which indeed takes a long time with large 
> capacity cards. It's not really an optimization, just a way to make 
things 
> less annoying for the user. 
>  
[...] 
 
An optimization that may be put into Nut/OS could be to control the free 
cluster counting via ioctl(). If we could implement a control that 
configures for counting clusters or not before mounting would be a nice 
idea. 
 
That would improve speed for all using the card for read only.  
 
Then we should try an improvement for those who need to write a card. 
I don't see that counting free clusters in background is an improvement, as 
one needs to wait for that information before writing, regardless if it's 
calculated in your task or in a parallel one. 
 
Best regards, Ulrich 




More information about the En-Nut-Discussion mailing list