2. PCIe Gen4 x16 on all cards in about 35 s
Russian: 02-pcie-gen4-fast.ru.md
The method and the tools are darkmaniac7's (cmp170hx-8gb-vfi-tools tools/pcie, cmp170hx-10gb-pcie-gen4) and are
documented on cmp.wiki ("PCIe Gen4 on a burned 8 GB card"). Gen4 is volatile: it is brought up on every boot.
Per card the sequence is: walk Gen1 -> Gen2 -> Gen3 through RM (cmp-rmwalk), seven E1 PHY writes in BAR0
(cmp-e1steps), one retrain to Gen4 (cmp-gen4retrain).
What we added
The stock cmp-pcie-boot handles cards one after another with long settle times: 12-13 minutes for 8 cards.
cmp-pcie-fast: the same steps for all cards at once, 10 s settle at Gen3 and 10 s at Gen4. Measured: 8 cards at 16 GT/s x16 in 35-36 s.cmp-gen4retrain-fast: darkmaniac7'scmp-gen4retrainwith the settle shortened from 60 s to 10 s. Nothing else changed.cmp-pcie-pre, two fixes for the Gigabyte G292-Z20:- the switch ports above the cards come up with a sticky AER bit (UE
0x00100000, Unsupported Request). The platform owns AER and never clears it;cmp-e1stepsthen stops with rc 4. We clear the status registers. - without
gen2.servicethe cards boot at Gen1 whilecmp-rmwalkexpects Gen2. We raise them withcmp-pcie-speed 2.
Wiring: a systemd drop-in replaces ExecStart of cmp-pcie-boot.service with cmp-pcie-fast
(server/systemd/cmp-pcie-boot.service.d/local.conf).
Safety net
inflight-fastis written to/var/lib/cmp-pcie-boot/before the parallel pass and removed after it. If the host hangs during the pass, the next boot renames it toslowand runs the stock sequential script from then on. Back to fast:rm /var/lib/cmp-pcie-boot/slow.- A clean shutdown during the pass removes the marker (trap on TERM/INT). Before we added the trap, powering the server off mid-pass cost one slow boot.
- A card that is lost at the Gen4 step gets
disabled-g4-<bus>and stays at Gen3 on later boots. - Flags:
off(do nothing),off-g4(stop at Gen3),disabled-<bus>,disabled-g4-<bus>. - Logs:
/var/log/cmp-pcie/fast-*,journalctl -u cmp-pcie-boot -b.
Checking
for d in /sys/bus/pci/devices/*; do [ "$(cat $d/device 2>/dev/null)" = 0x20c2 ] && \
echo "$(basename $d) $(cat $d/current_link_speed) x$(cat $d/current_link_width)"; done
nvidia-smi reports "gen max 3" here; trust sysfs or lspci.
Limits
- Start your inference or mining units after
cmp-pcie-boot.service: the walk refuses a card with a compute process. - At Gen4 do not unbind/rebind the driver (Xid 140 per our notes). Reboot cold instead.
- Tested on one server, 8 cards, with switch-to-CPU links that were already 16 GT/s x16. The 10 s settle is our choice for this hardware, not a general recommendation; it has held through memory tests, a 10-minute burn and inference.