[build] Add various options to optimize boot startup times #2071
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR sets the stage for measuring and improving boot startup times using the following options:
mfs addfs
option allowing for adding files separately from standardmfs genfs -a
filesystem generation@Mellvik, this is the first pass at optimizations talked about in Mellvik/TLVC#88 (comment).
The IODELAY floppy delay emulation should now accurately emulate track and sector read and seek times for both 1440k and 360k floppies, although it currently assumes 1440k in drive 0 and 360k in drive 1, which is not finalized.
Testing is ongoing, with all options default turned OFF for now. However, early testing is showing a 10 second boot time being halved to just 4.8 seconds for 1440k floppies using
Image.all
to specify startup files andMake.devices
optimization of /dev creation. Note image creation optimization is currently only implemented for MINIX filesystem generation. 360k floppy boots seem to be improved from 7.2s to 5.5s, although I think the measurements were using 1440k floppy delays. I am also finding that adding TRACK_SPLIT_BLK and SPLIT_BLK (BIOS driver only for now), is not actually helping boot times. More on all that coming. Tests are not runningnet start
as I'm trying to compare 1440k and 360k floppy boots at the moment.The
image/Image.all
file contains a list of directories and files that when turned on via uncommenting the following line in image/Make.images causes the almost 50% speed improvement:This mechanism works by seperating the previous
mfs genfs
operation into three -mfs mkfs
,mfs addfs
, andmfs genfs -a
, to create, add optimized files, and add all files, respectively to the images.The eventual implementation will allow for separately-configurable directory and files lists for floppy images; the current
Image.all
will work for any (all) floppy images: