5 ms·
OS should save all serial numbers of devices and after they are all found continue. we should make it declarative or how do you want to call it. also why cant
by EuropeOverlords 3y ago
OS should save all serial numbers of devices and after they are all found continue.
we should make it declarative or how do you want to call it.
also why cant freaking boot process be optimized after first boot?
bsd is essentialy sorting SAME thing every boot, THAT is ridiculous.
sort once, save order ( list, sysinit000000000000 ), boot fast next time.
hardware or other change or failed boot, can trigger start sorting bull for safety.
you know what youre booting into, so sort it once then run it from saved order next time. how many times you change hardware on computer ? and if you do, you can just restart with grub flag, toggle switch in control panel before restart, etc
- exmadscientist 3y agoThe code to manage "do I sort or do I cache" is probably worse than the code to just sort it unconditionally. And you really want to do this automatically, with no manual anything, because (among other reasons) if you need to swap a part on a broken machine, you do not want that to needlessly break the software. So you're sorting regardless, and so you might as well just be unconditional about it.
- EuropeOverlords 3y agoon my machine TPM is checking state of machine for security reasons, so if this runs ANYWAY then why not use that for one more useful thing ... ( it runs before even machine thinks about booting anything ) you can define shutdown flag for hardware change: shutdown -rF XD, some things are hot swappable and for that there has to be logic (in kernel) to know you have new hardware... if you have total hardware failure that can be detected too, on next boot...
- Denvercoder9 3y ago> toggle switch in control panel before restart Ah yes, let's brick the OS when hardware fails and has to be replaced without advance notice.
- EuropeOverlords 3y agoim not saying remove all existing code, im saying you can have two pathways, ( decision which route to choose is almost zero cost ) first - when you boot correctly, you can save information that you booted correctly. second - if you do not find information about safe boot, you go old route, quicksort route. ( YES. you can do that, in a way you do not have loops of boot process because you are reading boot is ok even if it is not. just dont be lazy like linux kernel developers were, when i was telling them this exact thing few years back. )
- kaba0 3y agoBut why? You have a very manageable number of devices, O(nlogn) over that on a modern processor is absolutely zero time.
- ilyt 3y agoThat's nice way to add fuckloads of useless code while wasting memory and making now-read-only process into read-write process (kernel have no place to write cache before userspace initializes and sets up mounts and filesystems). ...vs just putting quicksort in
- EuropeOverlords 3y ago[flagged]
- AdamH12113 3y agoWindows XP had a tool called BootVis[1] that would try to optimize the startup sequence. Supposedly newer versions of windows do this sort of thing automatically. I suspect much of the delay comes from the nature of plug-and-play. The OS has to poll every bus and every port to find every device, then query those devices to determine what they are, then load a driver and actually configure them. It simply can't rely on the hardware being exactly the same from one boot to the next. [1] https://en.wikipedia.org/wiki/BootVis https://en.wikipedia.org/wiki/BootVis
- shpx 3y agoPhones take a long time to boot (12 seconds on an iPhone SE) even though their hardware stays the same.