public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: qianfan Zhao <qianfanguijin@163.com>,
	Sean Anderson <sean.anderson@seco.com>,
	Guillaume La Roque <glaroque@baylibre.com>,
	Gary Bisson <gary.bisson@boundarydevices.com>,
	Troy Kisky <troy.kisky@boundarydevices.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v2] lib: sparse: allocate FASTBOOT_MAX_BLK_WRITE instead of small number
Date: Tue, 25 Jul 2023 17:12:52 -0400	[thread overview]
Message-ID: <20230725211252.GI3630934@bill-the-cat> (raw)
In-Reply-To: <20230616-sparse-flash-fix-v2-1-25717e6cbb27@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]

On Fri, Jul 07, 2023 at 10:13:34AM +0200, Mattijs Korpershoek wrote:

> Commit 62649165cb02 ("lib: sparse: Make CHUNK_TYPE_RAW buffer aligned")
> fixed cache alignment for systems with a D-CACHE.
> 
> However it introduced some performance regressions [1] on system
> flashing huge images, such as Android.
> 
> On AM62x SK EVM, we also observe such performance penalty:
> Sending sparse 'super' 1/2 (768793 KB)             OKAY [ 23.954s]
> Writing 'super'                                    OKAY [ 75.926s]
> Sending sparse 'super' 2/2 (629819 KB)             OKAY [ 19.641s]
> Writing 'super'                                    OKAY [ 62.849s]
> Finished. Total time: 182.474s
> 
> The reason for this is that we use an arbitrary small buffer
> (info->blksz * 100) for transferring.
> 
> Fix it by using a bigger buffer (info->blksz * FASTBOOT_MAX_BLK_WRITE)
> as suggested in the original's patch review [2].
> 
> With this patch, performance impact is mitigated:
> Sending sparse 'super' 1/2 (768793 KB)             OKAY [ 23.912s]
> Writing 'super'                                    OKAY [ 15.780s]
> Sending sparse 'super' 2/2 (629819 KB)             OKAY [ 19.581s]
> Writing 'super'                                    OKAY [ 17.192s]
> Finished. Total time: 76.569s
> 
> [1] https://lore.kernel.org/r/20221118121323.4009193-1-gary.bisson@boundarydevices.com
> [2] https://lore.kernel.org/r/all/43e4c17c-4483-ec8e-f843-9b4c5569bd18@seco.com/
> 
> Fixes: 62649165cb02 ("lib: sparse: Make CHUNK_TYPE_RAW buffer aligned")
> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      parent reply	other threads:[~2023-07-25 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  8:13 [PATCH v2] lib: sparse: allocate FASTBOOT_MAX_BLK_WRITE instead of small number Mattijs Korpershoek
2023-07-07 10:54 ` qianfan
2023-07-07 14:01   ` Mattijs Korpershoek
2023-07-25 21:12 ` Tom Rini [this message]

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=20230725211252.GI3630934@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=gary.bisson@boundarydevices.com \
    --cc=glaroque@baylibre.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=qianfanguijin@163.com \
    --cc=sean.anderson@seco.com \
    --cc=troy.kisky@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    /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