News for hackers. Stuff that matters.
Re:FreeBSD spends 7% of its boot time running a bubblesort o... by 0x457 on Friday May 19, 2023 @01:33PM (#36004624)
Well, FreeBSD has other issues too. I had re-cable all of my USB devices because it was taking forever (linux and windows booted a lot faster).
Re:FreeBSD spends 7% of its boot time running a bubblesort o... by ilyt on Friday May 19, 2023 @01:48PM (#36004808)
Huh ? Were they resetting under FreeBSD or something ?
Re:FreeBSD spends 7% of its boot time running a bubblesort o... by 0x457 on Friday May 19, 2023 @03:25PM (#36005857)
I had it setup like this: some devices plugged into PC directly, KVM plugged into the PC, hub plugged into PC, hub on monitor plugged into hub and a bunch of things plugged into hubs.

Half of the devices were just powered by USB and not using any data, but only needed to be ON when the PC is ON.

The way it worked:

- FreeBSD would scan all USB devices

- get held up on some for no reason

- find a hub

- scan everything on a hub

- find another hub

- scan everything on that hub as well

Anytime during the scan it could run into a device that takes longer (no clue which or why, only happened on FreeBSD and never on Linux or Windows)

I'm sure windows and linux did the same thing, but both shapely continued booting while FreeBSD waited and waited and waited and waited.

Bias light on a monitor would sometimes completely stop the process until unplugged.

USB stack on FreeBSD is forever cursed, I still remember kernel panics when you unplug a keyboard or a mouse.

Re:FreeBSD spends 7% of its boot time running a bubblesort o... by toast0 on Friday May 19, 2023 @03:40PM (#36005985)
> I'm sure windows and linux did the same thing, but both shapely continued booting while FreeBSD waited and waited and waited and waited.

My understanding is FreeBSD will by default wait until it's found all the fixed disks before it figures out which one to mount as root. This could be a USB drive, so it needs to enumerate all the USB first. Adding hw.usb.no_boot_wait=1 to /boot/loader.conf.local or thereabouts if you don't need that will skip that wait and speed up the boot process a lot (especially on hardware where USB is slow to finish enumeration).

Re:FreeBSD spends 7% of its boot time running a bubblesort o... by ilyt on Friday May 19, 2023 @06:39PM (#36007581)
IIRC most linux distros just get what they need to boot from initrd/fstab and only complain if something from there is missing
Re:FreeBSD spends 7% of its boot time running a bubblesort o... by 0x457 on Monday May 22, 2023 @06:26PM (#36037476)
Huh, didn't know about that option. Yeah, by default, FreeBSD fully initializes before surrendering to the user.