[PATCH] cafe_nand: remove busy-wait loop

Mitch Bradley wmb at laptop.org
Tue Dec 9 12:19:01 EST 2008


Tomeu Vizoso wrote:
> On Tue, Dec 9, 2008 at 6:05 PM, Mitch Bradley <wmb at laptop.org> wrote:
>   
>> Nice!
>>
>> One quick test, for starters, is to do some file accesses to large files
>> (dd or tar or whatever) and use the "time" command to look at the system
>> and user times.  With the patch, the system time should drop to a
>> fraction of the real time.
>>     
>
> Wow! This should apply as well to writes?
>
> I reported some time ago that downloads from the LAN were limited by
> cpu time, but I think to remember that it was due to the
> autocompression.
>   

In principle, for longish writes the compression of the next chunk could 
be overlapped with the write-back of the current chunk.  It will be 
interesting to see if that actually occurs, or if additional work is 
needed to unlock the potential parallelism.

At any rate, even for short writes, the userland program should be able 
to get the CPU back as soon as the write to NAND is initiated, thus 
saving 100 usec of otherwise-wasted time.

> Regards,
>
> Tomeu
>
>   
>> Daniel Drake wrote:
>>     
>>> This patch enables interrupts for DMA and command completion events, and
>>> uses them to determine when commands and transfers have completed.
>>>
>>> This avoids a busy-wait loop which was a waste of CPU time.
>>>
>>> Signed-off-by: Daniel Drake <dsd at laptop.org>
>>>
>>> ---
>>> Where do we go with this? Who's adventurous enough to test it? Dare we
>>> put it in joyride? Any suggestions for how to measure performance
>>> difference?
>>>
>>>       
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.laptop.org
>> http://lists.laptop.org/listinfo/devel
>>
>>     




More information about the Devel mailing list