4 ms·
Kernel parameters are usually documented in the kernel-parameters.txt file in the source. See https://github.com/torvalds/linux/blob/master/Documentation/admin
by jeromenerf 4y ago
Kernel parameters are usually documented in the kernel-parameters.txt file in the source.
See https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt#L4295 https://github.com/torvalds/linux/blob/master/Documentation/...:
hpbussize=nn The minimum amount of additional bus numbers
reserved for buses below a hotplug bridge.
Default is 1.
The way to get from the error "No bus number available for hot-added bridge" at https://github.com/torvalds/linux/blob/master/drivers/pci/probe.c#L3343 https://github.com/torvalds/linux/blob/master/drivers/pci/pr... to this specific kernel param is still a bit involved.
- zokier 4y agoThat doc string raises so many questions. First, it says minimum which to me implies that in some cases larger value is used, but no clue when. Secondly, why is the default 1 and what is the allowed range of values? Being 1 implies to me that there is some cost associated with the reservations, otherwise the default would be much higher? Is the 0x33 from the article completely random, would 2 worked just as well? What are the implications of using high value here?
- alkonaut 4y agoWhat's the approach used by OSes that "just work" for things like this? Is this due to the more monolithic kernel of Linux making more things required to be known up front than e.g. in Windows?
- jeffbee 4y agoIs there one? I know that unplugging a Thunderbolt peer will crash my MacBook Pro (bridgeOS, not macOS, panics). Disappearing buses is an edge case that is little-tested on most operating systems.
- kalleboo 4y agoHot-plugging Thunderbolt devices is hardly an edge-case on Macs, it's a heavily advertised feature. I had about weekly kernel panics or machine freezes (would not wake from sleep) while unplugging my Thunderbolt dock (with displays and lots of devices) all throughout the USB-C Intel Mac era, but they all went away when I got an M1 Pro machine, so I wonder how much is down to OS design vs drivers vs hardware (vs how specific hardware influences driver design).
- jeffbee 4y agoM1 machines don’t have bridgeOS at all, right?
- bombcar 4y agoIf it can panic apparently they do have it. https://en.wikipedia.org/wiki/BridgeOS https://en.wikipedia.org/wiki/BridgeOS says it runs the Touch Bar.
- jeffbee 4y agoThe M1 lacks the T-series coprocessor altogether and all its functions are inside the main SoC. Whether that means that bridgeOS still runs on non-architectural cores inside the SoC, or its responsibilities have been rolled into macOS, I have no idea. I do know that only my T2-having MacBook suffers from these panics.
- aiwv 4y agoRaises the question whether or not anyone writing this kind of software actually uses it.
- kalleboo 4y agoAccording to another comment (https://news.ycombinator.com/item?id=34013844 https://news.ycombinator.com/item?id=34013844), macOS will pause, reallocate, and un-pause the bus.
- alexpotato 4y agoI always like this story about MacOs. - Most OSes do a full dhcp look up when they connect to a network even if they have connected to the network before. Wifi saved networks is a good example of a network where you have some historical information on the connection - MacOs however keeps track of the IP addresses that it saw for each of the networks it has connected to recently. If it sees a network it's been on before, it first tries to just use the old IP address. This is under the assumption that the lease is still tied to the user's laptop. - In the best case, the laptop gets a working IP very quickly and in the worst case, you just do dhcp again - From a user's perspective, if they walk into a meeting with a bunch of folks with non Mac laptops, it will seem like the Mac connects much faster than everyone else's machine When I read this story, the author pointed out that many people say "Macs just feel like they work better!" and used this as an example. Granted, this partly comes from owning the ENTIRE stack from hardware to drivers to OS etc which is something only Mac can do.
- riskable 4y ago...and the network intrusion detection system throws up all sorts of alarm bells about IPs being spoofed and duplicate IPs in use. I assume MacOS actually only re-uses IPs if it sees the lease hasn't already expired but it might be dumber than that.
- lloeki 4y agoIIRC it does, and otherwise throws out (or used to) an ARP check (or something like that) to see if any one on the local link is using the IP. A properly behaved DHCP server would not hand the IP again to someone else if the lease hasn't expired.
- nielsole 4y ago> properly behaved DHCP server One of the common issues with this is that home routers don't usually persist leases across power cycles.
- Fnoord 4y ago