linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Cached NAND reads and UBIFS
@ 2016-07-13 12:30 Richard Weinberger
  2016-07-13 12:43 ` Boris Brezillon
  2016-07-13 16:54 ` Brian Norris
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Weinberger @ 2016-07-13 12:30 UTC (permalink / raw)
  To: Artem Bityutskiy, Brian Norris, Boris Brezillon
  Cc: linux-mtd@lists.infradead.org

Hi!

As discussed on IRC, Boris and I figured that on our target UBIFS is sometimes
very slow.
i.e. deleting a 1GiB file right after a reboot takes more than 30 seconds.

When deleting a file with a cold TNC UBIFS has to lookup a lot of znodes
on the flash.
For every single znode lookup UBIFS requests a few bytes from the flash.
This is slow.

After some investigation we found out that the NAND read cache is disabled
when the NAND driver supports reading subpages.
So we removed the NAND_SUBPAGE_READ flag from the driver and suddenly
lookups were fast. Really fast. Deleting a 1GiB took less than 5 seconds.
Since on our MLC NAND a page is 16KiB many znodes can be read very fast
directly out of the NAND read cache.
The read cache helps here a lot because in the regular case UBIFS' index
nodes are linearly stored in a LEB.

The TNC seems to assume that it can do a lot of short reads since the NAND
read cache will help.
But as soon subpage reads are possible this assumption is no longer true.

Now we're not sure what do do, should we implement bulk reading in the TNC
code or improve NAND read caching?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-15  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 12:30 Cached NAND reads and UBIFS Richard Weinberger
2016-07-13 12:43 ` Boris Brezillon
2016-07-13 13:13   ` Artem Bityutskiy
2016-07-14  7:58     ` Boris Brezillon
2016-07-13 16:54 ` Brian Norris
2016-07-14  8:33   ` Boris Brezillon
2016-07-14 13:06     ` Richard Weinberger
2016-07-15  8:30       ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).