Re: [PATCH 2/2] mtd: spi-nor: Always use biggest erase size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tudor,

On 28/02/2019 18:00, Tudor.Ambarus@xxxxxxxxxxxxx wrote:
> On 01/24/2019 01:21 PM, Sverdlin, Alexander (Nokia - DE/Ulm) wrote:
>> Optimize erase time by always using biggest erase size for given erase
>> request. Do it by removing "sector"-at-a-time erase code.
>> spi_nor_erase_multi_sectors() seems to be mature enough to handle all
>> the cases better.
> 
> Did you check if the upper mtd layers are affected by this change?

For now I just change static function, I didn't want to remote
spi_nor_has_uniform_erase() infrastructure in the first step.

So I personally see no problems with my patch. It's also quite well
tested up to now.

>> For the above to work backwards-compatible regarding 4-bytes commands
>> spi_nor_set_4byte_opcodes() has to prepare them always, independent of
>> spi_nor_has_uniform_erase() flag.
>>
>> Remainder check in spi_nor_erase() becomes superfluous because
>> spi_nor_erase_multi_sectors() performs it anyway.
>>
>> The trigger for this change was n25q128a13: enabling SECT_4K increased
>> erase time of 128k block from 1.763s to 11.335s.
> 
> When needed, one can disable the 4K sectors with the MTD_SPI_NOR_USE_4K_SECTORS
> kconfig option. Does this help you?

This very same kernel runs on different boards with different flashes.
Seems that more modern flashes are not so slow when 4K sectors are used.

Moreover, I truly believe this was a dead code and want to be convinced
otherwise before real problems start :)

-- 
Best regards,
Alexander Sverdlin.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux