linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@nokia.com>
To: "Tudor.Ambarus@microchip.com" <Tudor.Ambarus@microchip.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Cc: "marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"richard@nod.at" <richard@nod.at>,
	"bbrezillon@kernel.org" <bbrezillon@kernel.org>
Subject: Re: [PATCH 2/2] mtd: spi-nor: Always use biggest erase size
Date: Fri, 1 Mar 2019 09:50:30 +0000	[thread overview]
Message-ID: <e286d6bf-99a1-eedc-7b9f-a082603b0946@nokia.com> (raw)
In-Reply-To: <08858201-eebb-b9c0-a94d-9eec9106d23b@microchip.com>

Hi Tudor,

On 28/02/2019 18:00, Tudor.Ambarus@microchip.com 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/

  reply	other threads:[~2019-03-01  9:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 11:20 [PATCH 0/2] spi-nor: Drop uniform erase Sverdlin, Alexander (Nokia - DE/Ulm)
2019-01-24 11:21 ` [PATCH 1/2] mtd: spi-nor: Fix comment of spi_nor_find_best_erase_type() Sverdlin, Alexander (Nokia - DE/Ulm)
2019-03-19 16:29   ` Tudor.Ambarus
2019-03-19 16:57     ` [PATCH 0/2] spi-nor: Drop uniform erase Sverdlin, Alexander (Nokia - DE/Ulm)
2019-03-19 16:57       ` [PATCH 1/2] mtd: spi-nor: Fix comment of spi_nor_find_best_erase_type() Sverdlin, Alexander (Nokia - DE/Ulm)
2019-03-20  6:52         ` Tudor.Ambarus
2019-03-21 16:47         ` Tudor.Ambarus
2019-03-19 16:57       ` [PATCH 2/2] mtd: spi-nor: Always use biggest erase size Sverdlin, Alexander (Nokia - DE/Ulm)
2019-01-24 11:21 ` Sverdlin, Alexander (Nokia - DE/Ulm)
2019-02-28 17:00   ` Tudor.Ambarus
2019-03-01  9:50     ` Sverdlin, Alexander (Nokia - DE/Ulm) [this message]
2020-01-13 15:34       ` Alexander Sverdlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e286d6bf-99a1-eedc-7b9f-a082603b0946@nokia.com \
    --to=alexander.sverdlin@nokia.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).