[PATCH] mtd: spi-nor: add Kconfig option to disable 4K sectors

Kevin Cernekee cernekee at gmail.com
Sat Aug 16 14:06:35 PDT 2014


On Sat, Aug 16, 2014 at 1:17 PM, Rafał Miłecki <zajec5 at gmail.com> wrote:
> +config MTD_SPI_NOR_USE_4K_SECTORS
> +       bool "Use small 4096 B erase sectors"
> +       default y
> +       help
> +         Many flash memories support erasing small (4096 B) sectors. Depending
> +         on the usage this feature may provide performance gain in comparison
> +         to erasing whole blocks (32/64 KiB).

I would also note that on some SPI-NOR devices, erasing 16x 4K sectors
is significantly slower than erasing 1x 64K block.  There is also the
question of balancing filesystem overhead versus internal
fragmentation.

It probably does make sense to let the user weigh the tradeoffs and
make the right decision for his application instead of hardcoding the
policy into the driver.



More information about the linux-mtd mailing list