[PATCH][RFC] NAND subpage read feature. Take 2.

Jörn Engel joern at logfs.org
Tue May 6 02:15:31 EDT 2008


On Tue, 6 May 2008 10:15:15 +1000, Hamish Moffatt wrote:
> 
> Caching only makes sense when you can read extra data at no cost.

Not true.  Caching makes sense when the benefits outweigh the costs,
just like everything else.  "No cost" is just a special case where even
minimal benefits suffice.

Nand already does caching, it just limits itself to a single page.  If
two consecutive reads hit the single page, it is only read once.  Which
easily fits your definition and just as easily helps single-threaded
users.  But two threads bouncing back and forth can already nullify the
gains.  It would be useful to keep as much old data around as there is
DRAM for.

However DRAM page granularity is bigger, therefore some data will be
read and not used.  In the case of ubi attach that is a lot of data.
And there are no benefits in caching the ubi headers, as they are read
only once.  So the solution is to have NAND page granularity or so for
the cache, which means buggerheads.

[ Also, even ubi attach may benefit from caching under special
circumstances.  If you have just written an image and have enough ram,
there is no reason to go back to flash.  But that hardly matters in real
life. ]

Jörn

-- 
tglx1 thinks that joern should get a (TM) for "Thinking Is Hard"
-- Thomas Gleixner



More information about the linux-mtd mailing list