Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster load #110

Merged
Merged

Conversation

SergiiDmytruk
Copy link
Member

As a side effect of trying to do things concurrently, code was measured and it became evident that it can run faster after small reorganization: polling at higher frequency, starting things in parallel or after removing superfluous delays.

The slowest part currently is building MVPD (13 seconds, 9 for building MVPD of the second CPU), reading cached version from PNOR should take just 50 milliseconds.

Copy link
Contributor

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may rebase this into current develop and merge it independently of FIT->ELF transition.

This currently gives ~2.5s boot time reduction (loglevel=debug, initial ECC scrubbing off, rebased on current develop so no ELF):

root@debian:~/coreboot# diff --side-by-side -W160 fast.log slow.log 
21 entries total:								21 entries total:

   0:1st timestamp                                     3,000,748	      |	   0:1st timestamp                                     3,000,567
   1:start of romstage                                 3,001,184 (435)	      |	   1:start of romstage                                 3,000,568 (0)
   2:before RAM initialization                         20,996,765 (17,995,580 |	   2:before RAM initialization                         22,043,972 (19,043,404
   3:after RAM initialization                          24,606,683 (3,609,917) |	   3:after RAM initialization                          27,097,874 (5,053,901)
   4:end of romstage                                   24,608,525 (1,842)     |	   4:end of romstage                                   27,099,663 (1,789)
   8:starting to load ramstage                         24,608,525 (0)	      |	   8:starting to load ramstage                         27,099,663 (0)
  15:starting LZMA decompress (ignore for x86)         24,631,283 (22,757)    |	  15:starting LZMA decompress (ignore for x86)         27,122,545 (22,881)
  16:finished LZMA decompress (ignore for x86)         24,641,781 (10,498)    |	  16:finished LZMA decompress (ignore for x86)         27,132,856 (10,311)
   9:finished loading ramstage                         24,650,704 (8,922)     |	   9:finished loading ramstage                         27,143,057 (10,201)
  10:start of ramstage                                 24,651,429 (724)	      |	  10:start of ramstage                                 27,143,781 (724)
  30:device enumeration                                24,651,430 (1)	      |	  30:device enumeration                                27,143,783 (1)
  40:device configuration                              26,533,018 (1,881,587) |	  40:device configuration                              29,025,468 (1,881,685)
  50:device enable                                     26,535,087 (2,068)     |	  50:device enable                                     29,026,959 (1,490)
  60:device initialization                             26,535,209 (122)	      |	  60:device initialization                             29,027,139 (180)
  70:device setup done                                 26,584,641 (49,431)    |	  70:device setup done                                 29,084,746 (57,607)
  75:cbmem post                                        26,584,642 (0)	      |	  75:cbmem post                                        29,084,747 (0)
  80:write tables                                      26,584,642 (0)	      |	  80:write tables                                      29,084,747 (0)
  85:finalize chips                                    26,591,353 (6,710)     |	  85:finalize chips                                    29,091,186 (6,438)
  90:load payload                                      26,591,643 (290)	      |	  90:load payload                                      29,091,439 (253)
1102:starting kernel decompression/relocation          27,532,411 (940,767)   |	1102:starting kernel decompression/relocation          30,029,914 (938,475)
1101:jumping to kernel                                 27,534,464 (2,052)     |	1101:jumping to kernel                                 30,032,074 (2,159)
  99:selfboot jump                                     27,535,057 (593)	      |	  99:selfboot jump                                     30,032,842 (768)

Total Time: 24,534,296							      |	Total Time: 27,032,267

@SergiiDmytruk SergiiDmytruk force-pushed the raptor-cs_talos-2/elf_payload branch 3 times, most recently from 8800f36 to 236fe66 Compare April 8, 2022 14:00
Base automatically changed from raptor-cs_talos-2/elf_payload to raptor-cs_talos-2/develop April 8, 2022 19:28
This is to allow running MCBISTs of multiple chips in parallel.

Change-Id: I66301c47becd83042957872da8d8267670285188
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
That is start it on all MCs of all chips and then wait for all of them.

Change-Id: Icff125bfec563c2a7da74b16b9563ff993ae9e19
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This allows the istep to finish faster.

Change-Id: I36077a66deb263e46c23fc9005e81bba3cd18f9c
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Id6d5631f35346860549439dfcd823eb311e6f1c2
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Ic453fbdecd9740bc13196a5c967b482ead685ceb
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This makes delays in console output easier to understand.

Change-Id: I7c3c14e2f8ec7446708211aad7e7a8b04519e599
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: I2b2e35c8ad90d1d900194c4722478b8200dbff43
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@krystian-hebel krystian-hebel merged commit 7c8a8cb into raptor-cs_talos-2/develop Apr 8, 2022
@krystian-hebel krystian-hebel deleted the raptor-cs_talos-2/faster_load branch April 8, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants