arm: reduce .bss section clear time
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/3] arm: reduce .bss section clear time
Hello,
Quoted 76 lines · Pantelis Antoniou
Hi Przemyslaw,
Quoted 74 lines · Przemyslaw Marczak
Hello,
Quoted 68 lines · Pantelis Antoniou
Hi Przemyslaw,
Quoted 55 lines · Przemyslaw Marczak
Hello Stefan,
Quoted 33 lines · Stefan Roese
Hi Przemyslaw,
Quoted 25 lines · Przemyslaw Marczak
This patchset reduces the boot time for ARM architecture, Exynos boards, and boards with DFU enabled(ARM).
For tested Trats2 device, this was done in three steps.
First was enable the arch memcpy and memset.
The second step was enable memset for .bss clear.
The third step for reduce this operation is to keep .bss section small as possible.The .bss section will grow if we have a lot of static variables. This section is cleared before jump to the relocated U-Boot, and it's done word by word. To reduce the time for this step, we can enable arch memset, which uses multiple ARM registers.
For configs with DFU enabled, we can find the dfu buffer in this section, which has at least 8MB (32MB for trats2). This is a lot of useless data, which is not required for standard boot. So this buffer should be dynamic allocated.
Przemyslaw Marczak (3):
exynos: config: enable arch memcpy and arch memset
arm: relocation: clear .bss section with arch memset if defined
dfu: mmc: file buffer: remove static allocationQuoted 4 lines
arch/arm/lib/crt0.S | 10 +++++++++- drivers/dfu/dfu_mmc.c | 25 ++++++++++++++++++++++--- include/configs/exynos-common.h | 3 +++ 3 files changed, 34 insertions(+), 4 deletions(-)Quoted 8 lines
Looking at the commit messages of this patchset I can conclude that your overall boot time reduction is:
from ~1527ms
to ~464msThis is amazing! Congrats. :)
Thank you. I was also amazed.
The time results are taken with from the clock cycle counter, I think it's reliable. Some day I would like to check it using the oscilloscope.
Quoted 4 lines
We really should in general make more use of the optimized functions and take care that the buffers (e.g. the DFU buffer in this case) are used in a sane way.
Quoted 7 lines
Quoted 4 lines
Thanks,
StefanYes you're right, I thought that Exynos config has enabled arch memcpy/set lib, before I checked this?
Those numbers are indeed incredible; I suppose the caches are disabled?
Quoted 8 lines
Quoted 2 lines
The caches are enabled after the relocation, in one of
board_init_rcalls.How big is this .bss section? We?re talking about something that takes 1.5secs to clear a few MBs of memory? This is horrible.
Even at the optimized case .5secs is too much.
The .bss section was about 32.3 MB, where the 32MB were required for dfu file buf. With the third patch, the .bss section is about 300k. I'm not saying, that this is fast booting. But the achieved improvement is really good for this config
Quoted 20 lines
Quoted 13 lines
Quoted 7 lines
Quoted 6 lines
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.comQuoted 5 lines
Regards
? Pantelis
Quoted 6 lines
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Quoted 4 lines
Regards
? Pantelis
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com