#
…

2022-06-18

00:56nafod has quit [Quit: Ping timeout (120 seconds)]
00:56nafod has joined #asahi-dev
01:00DragoonAethis has joined #asahi-dev
01:04DarkShadow44 has joined #asahi-dev
01:20Emantor has joined #asahi-dev
02:27PhilippvK has joined #asahi-dev
03:15nico_32 has joined #asahi-dev
05:20the_lanetly_052 has joined #asahi-dev
06:49Astra[m] has joined #asahi-dev
07:32MajorBiscuit has joined #asahi-dev
08:52MajorBiscuit has quit [Quit: WeeChat 3.5]
09:28saintstellaris[m] has joined #asahi-dev
09:29svenhuh, on the latest main the hv vuart is incredibly slow for me. anyone noticed something similar?
09:29sven(incredibly slow as in takes minutes to get through the guest m1n1)
09:31j`eyjannau: was seeing similar
09:37svenbisected to 9c795fbdbf445d144d331ff2a19a0f42fe0fc190
09:39j`eythat has been changed in 816388325262e5c7dd681c8ac6392248b6ca9f0e
09:41svenhrm, it's still broken with that for me
09:41svenbut if I remove the "wfe" in there it seems to be fine again
09:47svenweird. that wfe definitely makes everything slow here
10:06j`eysven: in your spin_unlock disassembly, is it using `stlr` to store -1 to the lock?
10:07sven 25538: 08 00 80 92 mov x8, #-1
10:07sven 2553c: 08 fc 9f c8 stlr x8, [x0]
10:10svenlooks like it actually starts getting slower after "SMP mode to WFE" in the guest
10:10sven*"Setting SMP mode to WFE"
10:16j`eydont see how that interacts with the spinlocks.. hm
10:16svencould also be coincidence ofc
10:17jannaujudging from my uart output I'd say it starts getting slow when the chainloaded m1n1 disables the MMU
10:17alethkitIs there in-depth documentation on the memory model/architecture behind Apple Silicon? At the moment, I have the impression that it is heterogeneous, with asymmetric multiprocessing, but with UMA (and I presume, cache coherence) instead of x86-like NUMA?
10:19svenhm... so for me it already prints the "setting mode to wft" pretty slowly and that happens before the MMU is disabled I think
10:21jannaukernel gets back to normal speed shortly after initializing aic but I believe before it initializes the the secondary CPUs
10:21sveni've not been patient enough to wait for that :D
10:22svenalright, it slowed down just after "Setting SMP mode to WFE..." again
10:22jannauis it consistently slow for you? it's random for me. I'd say with 10% probablity of glacially slow
10:22svenyeah, pretty much
10:23svenif I leave the wfe in it's always glacially slow
10:23svenlooks like it's even stuck at printing the next line after that smp mode now
10:24svenI don't think it'll ever get to the kernel here fwiw
10:25svenstill stuck at that next line
10:25jannaustrange, when it's not glacially slow for me it's 50% okay-ish and 50% clearly slow but not that slow that I reboot the HV
10:25sventhis is on a m1 mini fwiw
10:26svenI don't think it'll get any further
10:26svenI can't even ctrl+c to the shell, I have to do a hard reboot
10:27jannauI see it on m1 and m1 max
10:28jannauif it's glacially slow it can take a few seconds until crtl+c get's me to the shell
10:28svenbeen waiting for two minutes now and nothing happens
10:33jannauit might been that slow for me once or twice and I rebooted. ~3 minutes for booting the kernel is what I call glacially slow
10:36jannauand I can't reproduce it at the moemt but it's much faster without the wfe
10:43svenwithout that wfe everything works fine for me
10:46jannauwith an explicit 'sev' in spin_unlock everything is fast as well but the store release is supposed to send an event
10:49j`eythats why I was wondering if it had somehow compiled without 'stlr'..
10:54svenyup, with an sev in spin_unlock it's also fast here
10:54j`eyis the mmu off at this point for you?
10:54svenit becomes slow for me before the mmu is off afaict
10:57j`eythere's some stuff about atomics and needing the SCTLR_ELx C (cacheable) bit set, that I dont quite understand. but if the mmu is still on then its not that
10:59svenit does disable the MMU a bit later and there could be a delay in the messages arriving over USB
11:15jannauj`ey: doesn't the store need be exclusive for the event trigger? i.e. either stlxr or stxr?
11:16jannauso the explicit sev in spin_unlock should be correct when armv8.1-a atomics are used
11:18j`eytf-a just uses stlr..
11:26jannauB2.9.2 has a note which suggests the global monitor needs setup to work with address translation disabled
11:27j`eyyeah that's the bit ive been looking at
11:28svenadding that sev to the unlock has completely fixed it here fwiw
11:37chadmed has quit [Ping timeout: 480 seconds]
11:41jannauyeah, here too. had I bothered to check a non regressed build I would have looked earlier for the cause. even my ok-ish speed is very slow compared sev in spin_unlock
11:41sven<3 git bisect :-)
11:42chadmed has joined #asahi-dev
11:46chadmed has quit []
12:02jannauonly question is if we can still hit the ordering issue from 9c795fbdbf445d with the mmu disabled
12:20derzahl has quit [Remote host closed the connection]
12:29the_lanetly_052__ has joined #asahi-dev
12:35the_lanetly_052 has quit [Ping timeout: 480 seconds]
12:44the_lanetly_052__ has quit [Remote host closed the connection]
13:12svenhuh, it's actually the smp wfe mode thing that makes it slow here
13:21jannauit is indeed, so it's just spurious events from the spin_unlock which makes it fast
14:06MajorBiscuit has joined #asahi-dev
14:06MajorBiscuit has quit []
14:13MajorBiscuit has joined #asahi-dev
14:42MajorBiscuit has quit [Ping timeout: 480 seconds]
14:58gjekdkdjjr[m] has joined #asahi-dev
15:20MajorBiscuit has joined #asahi-dev
15:51MajorBiscuit has quit [Ping timeout: 480 seconds]
15:57MajorBiscuit has joined #asahi-dev
16:03MajorBiscuit has quit [Quit: WeeChat 3.5]
16:14jnn has joined #asahi-dev
16:43nicolas17 has joined #asahi-dev
17:01c10l has quit [Quit: Bye o/]
17:05c10l has joined #asahi-dev
17:14Gaspare has joined #asahi-dev
17:59___nick___ has joined #asahi-dev
17:59___nick___ has quit []
18:01___nick___ has joined #asahi-dev
18:14zzywysm has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:17nico_32 has quit [Ping timeout: 480 seconds]
18:21c10l has quit [Quit: Bye o/]
18:25c10l has joined #asahi-dev
18:27zzywysm has joined #asahi-dev
18:29Gaspare has quit [Quit: Gaspare]
19:14nico_32 has joined #asahi-dev
19:46jannauhas anyone booted v5.19-rc2 (or rc1) on the mini? it doesn't detect a usb mass storage device on either usb-a port. the xhci itself is found
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:47jakebot6 has joined #asahi-dev
22:17nsklaus_ has joined #asahi-dev
23:00jakebot6 has quit [Quit: The Lounge - https://thelounge.chat]
23:16jakebot6 has joined #asahi-dev
…