Skip to content
Snippets Groups Projects
Commit af4053eb authored by Adam Wujek's avatar Adam Wujek :speech_balloon:
Browse files

patches/kernel: disable BBT for the nand flash

Disable the Bad Block Table (BBT) because the BBT uses the 4 last PEBs of
nand flash, which overwrites UBIFS.
BBT was disabled in the old kernel. There is not so much performance penalty
due to that (see the last sentence in the citation below). There is no impact
on the reliability of a flash because this is just a table of bad blocks which
is otherwise recreated in the ram at every boot.

The MTD layer supplies upper layers (including UBI) with information about bad
PEBs. It keeps so-called bad block table in RAM, which is usually 1 bit per PEB.
When the driver initializes, it has to build this table by scanning whole flash
media, which normally includes reading OOB area of 1st NAND page of each PEB.
This takes time and may be improved by using on-flash BBT (bad block table).
In this case the bad PEB map is stored on flash and MTD does not have to do any
scanning. See the NAND_USE_FLASH_BBT constant in the Linux source codes. But
note, bad PEB scanning is usually minor comparing to the UBI scan time, so
on-flash BBT is not probably going to give much.
(http://www.linux-mtd.infradead.org/faq/ubi.html#L_attach_faster

)

Signed-off-by: default avatarAdam Wujek <adam.wujek@cern.ch>
parent 063aca02
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment