nand_update_bbt fix

Artem Bityutskiy dedekind1 at gmail.com
Thu Aug 13 01:48:06 EDT 2009


On Wed, 2009-08-12 at 10:37 -0700, David Brownell wrote:
> On Tuesday 11 August 2009, Artem Bityutskiy wrote:
> > My position is:
> >    * vmalloc is a problem because it prevents DMA
> >    * kmalloc is a problem because large allocations of contiguous memory
> >      are impossible
> > 
> > Thus, I think people should invent some nice solution for the whole issue
> > instead of turning vmalloc's into kmallocks and back and forth.
> 
> BBT is a constrained sub-problem, but not the only one.
> 
> (Another BBT issue:  I've thought that with MLC chips and their
> small limits on number-of-erases, the current waste of BBT pages
> deserves more attention.  On a 2 GByte chip with 4KB pages and
> blocks at 256KB, each block could hold 64 BBT versions, with
> newer ones after older ones, even at one-per-page.  But today's
> BBT code is dumb:  one-per-block.  That's a lot of needless and
> extra erasures for BBT blocks...)

Agree. IMO, today's MTD is fits the "ancient crap" classification, and
badly needs some brave knight who would improve it.

> > I'm CCing 
> > David Brownell because AFAIR he was discussing similar things on lkml some
> > time ago.
> 
> The MTD stack is DMA-unfriendly today.
> 
> The issue I saw was with SPI flash chips, where the underlying
> SPI master controller often uses DMA ... causing trouble for
> certain code paths through MTD (or was it just JFFS2?).

UBI / UBIFS also send vmalloc'ed buffers :-)

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list