[PATCH] [MTD] NAND: Lazily BBT construction

Vitaly Wool vwool at ru.mvista.com
Fri Nov 24 08:11:06 EST 2006


Artem Bityutskiy wrote:
> On Fri, 2006-11-24 at 15:42 +0300, Konstantin Baydarov wrote:
>   
>> This is the implementation of lazy BBT construction. It introduces
>> a new config option that allows to construct BBT(bad block table)
>> lazily for NAND chips with memory based BBT.
>> The main goal of the feature introduced is to decrease boot time.
>> How it works: BBT is filled only when we check if block is bad. NAND
>> is
>> scanned and BBT entries is constructed from topmost unscanned block to
>> requested.
>> By default BBT is constructed during boot. To enable lazily
>> construction NAND_LAZY_BBT bit should be set in options field of
>> structure nand_chip. 
>>     
>
> The idea looks nice. But I still have 2 questions.
>
> 1. Why don't you instead spawn a scanning kernel thread and do not build
> BBT in background. After the flash is scanned you just kill the thread.
> Also you block any task which accesses an unscanned eraseblock till the
> scanning thread scanned this eraseblock.
>   
I was poking around this idea a bit and it turned out that the boot time 
is longer for most flashes.

Vitaly




More information about the linux-mtd mailing list