From: Stuart Henderson Subject: Re: Mostly-Inverted CPU-Core ordering To: Theo Buehler Cc: Stefan Fritsch , Mark Kettenis , gsgs7878@proton.me, tech@openbsd.org, visa@openbsd.org Date: Fri, 6 Mar 2026 17:24:23 +0000 On 2026/03/06 09:49, Theo Buehler wrote: > On Wed, Jan 14, 2026 at 03:47:15PM +0100, Stefan Fritsch wrote: > > [...] > > > > > Updated diff below that should fix all architectures. sparc64 already has > > > > the correct ordering. Boot tested on amd64, i386, arm64. > > > > > > On arm64, the slow cores are typically (but not always) listed before > > > the fast cores. Don't think that is a good reason not to change the > > > order of the list to be more sensible. > > > > Does this mean that the boot cpu is then a slow core, too? > > > > In the long term, one probably wants to have some field in cpu_info that > > denotes the core type and then make intrmap_create() use that info to > > prefer the fastest cores. > > > > As noted by tb@, the previous diff broke !MULTIPROCESSOR configurations. > > New diff attached. > > Not my area. Should this be committed? fwiw, no change in cpu order on my m2 mini. OpenBSD 7.8-current (GENERIC.MP) #1: Fri Mar 6 16:57:19 GMT 2026 sthen@m27:/sys/arch/arm64/compile/GENERIC.MP real mem = 8065933312 (7692MB) avail mem = 7688204288 (7332MB) random: good seed from bootblocks mainbus0 at root: Apple Mac mini (M2, 2023) efi0 at mainbus0: UEFI 2.10 efi0: Das U-Boot rev 0x20240100 cpu0 at mainbus0 mpidr 0: Apple Blizzard r1p0 cpu0: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu0: 4096KB 128b/line 16-way L2 cache cpu0: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,I8MM,BF16,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+EPAC2+FPAC,DPB+DCCVADP,ECV,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,IDS,AT,CSV3,CSV2,DIT,RAS,AdvSIMD+HP,FP+HP,BT,SSBS+MSR cpu1 at mainbus0 mpidr 1: Apple Blizzard r1p0 cpu1: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu1: 4096KB 128b/line 16-way L2 cache cpu2 at mainbus0 mpidr 2: Apple Blizzard r1p0 cpu2: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu2: 4096KB 128b/line 16-way L2 cache cpu3 at mainbus0 mpidr 3: Apple Blizzard r1p0 cpu3: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu3: 4096KB 128b/line 16-way L2 cache cpu4 at mainbus0 mpidr 10100: Apple Avalanche r1p0 cpu4: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu4: 16384KB 128b/line 16-way L2 cache cpu5 at mainbus0 mpidr 10101: Apple Avalanche r1p0 cpu5: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu5: 16384KB 128b/line 16-way L2 cache cpu6 at mainbus0 mpidr 10102: Apple Avalanche r1p0 cpu6: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu6: 16384KB 128b/line 16-way L2 cache cpu7 at mainbus0 mpidr 10103: Apple Avalanche r1p0 cpu7: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu7: 16384KB 128b/line 16-way L2 cache "framebuffer" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "flash" at mainbus0 not configured "flash" at mainbus0 not configured "uat-handoff" at mainbus0 not configured "uat-pagetables" at mainbus0 not configured "uat-ttbs" at mainbus0 not configured apm0 at mainbus0 "smbios" at mainbus0 not configured "opp-table-0" at mainbus0 not configured "opp-table-1" at mainbus0 not configured "opp-table-gpu" at mainbus0 not configured agtimer0 at mainbus0: 24000 kHz "pmu-e" at mainbus0 not configured "pmu-p" at mainbus0 not configured "clock-ref" at mainbus0 not configured "clock-ref-nco" at mainbus0 not configured "clock-disp0" at mainbus0 not configured "clock-dispext0" at mainbus0 not configured "clock-200m" at mainbus0 not configured simplebus0 at mainbus0: "soc" aplpmgr0 at simplebus0 aplpmgr1 at simplebus0 aplmbox0 at simplebus0 apldart0 at simplebus0 rev 1.1: 36 bits, locked aplmbox1 at simplebus0 apldart1 at simplebus0 rev 1.1: 32 bits, bypass aplintc0 at simplebus0 nirq 1152 ndie 1 aplpinctrl0 at simplebus0 aplpinctrl1 at simplebus0 apldog0 at simplebus0 aplefuse0 at simplebus0 aplmbox2 at simplebus0 aplpinctrl2 at simplebus0 aplpinctrl3 at simplebus0 apldart2 at simplebus0 rev 1.1: 36 bits, locked apldart3 at simplebus0 rev 1.1: 36 bits, locked aplmbox3 at simplebus0 aplmbox4 at simplebus0 apldart4 at simplebus0 rev 1.1: 32 bits, bypass apldart5 at simplebus0 rev 1.1: 32 bits, bypass apldart6 at simplebus0 rev 1.1: 32 bits, bypass apldart7 at simplebus0 rev 1.1: 32 bits, bypass apldart8 at simplebus0 rev 1.1: 32 bits apldart9 at simplebus0 rev 1.1: 32 bits apldart10 at simplebus0 rev 1.1: 32 bits "gpu" at simplebus0 not configured aplcpu0 at simplebus0 aplcpu1 at simplebus0 apldrm0 at simplebus0 drm0 at apldrm0 apliic0 at simplebus0 iic0 at apliic0 tipd0 at iic0 addr 0x38 tipd1 at iic0 addr 0x3f apliic1 at simplebus0 iic1 at apliic1 sncodec0 at iic1 addr 0x38 "cirrus,cs42l84" at iic1 addr 0x4b not configured apliic2 at simplebus0 iic2 at apliic2 aplspi0 at simplebus0 exuart0 at simplebus0: console exuart1 at simplebus0 apldma0 at simplebus0 aplmca0 at simplebus0 aplnco0 at simplebus0 "phy" at simplebus0 not configured aplspmi0 at simplebus0 aplpmu0 at aplspmi0 sid 0xe aplsmc0 at simplebus0 apldcp0 at simplebus0 aplsart0 at simplebus0 aplns0 at simplebus0 nvme0 at aplns0: NVMe 1.1 nvme0: APPLE SSD AP0512Z, firmware 499.0.9, serial 0ba020cba408ce42 scsibus0 at nvme0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: sd0: 477102MB, 4096 bytes/sector, 122138133 sectors xhci0 at simplebus0, xHCI 1.10 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1 "phy" at simplebus0 not configured xhci1 at simplebus0, xHCI 1.10 usb1 at xhci1: USB revision 3.0 uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1 "phy" at simplebus0 not configured aplpcie0 at simplebus0 pci0 at aplpcie0 ppb0 at pci0 dev 0 function 0 "Apple M1 PCIe" rev 0x01 pci1 at ppb0 bus 1 "Broadcom BCM4388" rev 0x04 at pci1 dev 0 function 0 not configured vendor "Broadcom", unknown product 0x5f72 (class network subclass miscellaneous, rev 0x04) at pci1 dev 0 function 1 not configured ppb1 at pci0 dev 1 function 0 "Apple M1 PCIe" rev 0x01 pci2 at ppb1 bus 2 xhci2 at pci2 dev 0 function 0 "ASMedia ASM2142 xHCI" rev 0x00: msix, xHCI 1.10 usb2 at xhci2: USB revision 3.0 uhub2 at usb2 configuration 1 interface 0 "ASMedia xHCI root hub" rev 3.00/1.00 addr 1 ppb2 at pci0 dev 2 function 0 "Apple M1 PCIe" rev 0x01 pci3 at ppb2 bus 3 bge0 at pci3 dev 0 function 0 "Broadcom BCM57762" rev 0x00, BCM57766 A0 (0x57766000): msi, address 5c:1b:f4:e1:50:70 brgphy0 at bge0 phy 1: BCM57765, rev. 0 aplaudio0 at mainbus0 audio0 at aplaudio0 vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (8164568be82d55e4.a) swap on sd0b dump on sd0b apldrm0: 1024x768, 32bpp wsdisplay0 at apldrm0 mux 1 wsdisplay0: screen 0-5 added (std, vt100 emulation) "framebuffer" at mainbus0 not configured