[PATCH v2] UBI: only read necessary size when reading the VID header

Brian Norris computersforpeace at gmail.com
Tue Jun 28 10:43:04 PDT 2016


Hi Artem,

I'll comment on the other branches of this thread, but one thing here:

On Tue, Jun 28, 2016 at 04:00:29PM +0300, Artem Bityutskiy wrote:
> Therefore, unless I misunderstood this patch - it introduces a
> regression to those old setups at least (forces MTD to use an
> intermediate buffer rather than copy data from NAND directly to the
> buffer supplied by UBI)

It's really a balance between speed of the flash and speed of the
memcpy(). I believe Boris may have benchmarked some of this recently,
but I'm really inclined to believe that reading several times as much as
you need from flash is much worse than doing some extra memcpy(). So
even if we introduce an extra memcpy(), it might still be worth it to
save the extra wait-for-flash time.

Intuitively, I expect that these days, the I/O time is much more
significant than any memcpy().

Brian



More information about the linux-mtd mailing list