#
#asahi-dev · 2023-03-04 12:31
jannauI still have found no way to reset pcie ports
#asahi-dev · 2023-03-04 12:30
jannauthose function-pcie_port_control contain just two phandles, to the pcie controller and to the port (pcie-bridge)
#asahi-dev · 2023-03-04 12:02
chadmedthe interfaces exist and we know they work (see https://gist.github.com/chadmed/e889ea905876db29cbebb7265039f5a8) so we should be using them
#asahi-dev · 2023-03-04 12:00
chadmedbut basically the only way to fix this is for userspace to start communicating its needs to the scheduler in a more precise way than not at all
#asahi-dev · 2023-03-04 11:55
chadmedwell, i say "very" in the sense that its noticeably slower but its still snappier than any other machine ive owned
#asahi-dev · 2023-03-04 11:53
chadmedthe detrimental effect of EAS is very noticeable on m1 pro since the two ecores just end up crammed with tasks
#asahi-dev · 2023-03-04 11:52
chadmedid like to see what kind of effect EAS has on interactivity on socs with 4 ecores, since theres double the ecore capacity
#asahi-dev · 2023-03-04 11:51
chadmedso the scheduler goes "eh good enough" and throws everything at them
#asahi-dev · 2023-03-04 11:51
chadmedtypically you see ecores at ~half the performance of the pcores but we retain ~70% of the performance
#asahi-dev · 2023-03-04 11:51
chadmedi also think we're an interesting case in that our cores arent _that_ asymmetrical in terms of performace but are in terms of power consumption
#asahi-dev · 2023-03-04 11:42
chadmedmaybe we should talk to the kde eco folks, this seems like something theyd be interested in
#asahi-dev · 2023-03-04 11:41
chadmedbut one i think is absolutely unacceptable when we have mitigation tools that are yet to be exhausted
#asahi-dev · 2023-03-04 11:41
chadmedamd are brute forcing their way around this on windows with a driver that just makes non-vcache clusters unavailable when it thinks youre running cache-heavy loads and vice versa which is... an interesting approach
#asahi-dev · 2023-03-04 11:39
chadmedre schedutil interactivity i dont think there are any real gains to be had anymore just by tweaking CFS and schedutil. the last "big" thing was arm working on util_est to help offset the effects of util decay
#asahi-dev · 2023-03-04 05:53
alyssa(and by "just works" I mean "I knew it was coming and architectured a chunk of the driver accordingly which was a PITA to get right but now that's there and indirect dispatch is nice and easy!")
#asahi-dev · 2023-03-04 05:51
alyssait's nice working with decent hardware for a change :D
#asahi-dev · 2023-03-04 05:51
alyssaworks like a charm
#asahi-dev · 2023-03-04 05:51
alyssawired up indirect dispatch
#asahi-dev · 2023-03-04 05:31
TellowKrinkleIndeed. I guess I should look into how to run the offline compiler that targets systems that aren't yours
#asahi-dev · 2023-03-04 05:31
alyssaIDK if this is accurate
#asahi-dev · 2023-03-04 05:31
alyssahttps://github.com/dougallj/applegpu/pull/25#issuecomment-1440976836
#asahi-dev · 2023-03-04 05:31
alyssaTellowKrinkle: someone on github seems to think it's added in M2
#asahi-dev · 2023-03-04 05:23
TellowKrinklechadmed: Metal currently supports exactly one int64 atomic operation (min/max), and it ICE's the M1 shader compiler. The MSL spec says "check the feature support doc for information on what GPUs support this operation" and the feature support doc doesn't mention anything about int64 atomics.
#asahi-dev · 2023-03-04 04:21
alyssait's not something you can emulate like that
#asahi-dev · 2023-03-04 04:21
alyssa(t likely)
#asahi-dev · 2023-03-04 04:21
alyssano
#asahi-dev · 2023-03-04 04:20
chadmedis that something youd be able to catch by writing a metal shader that _should_ use a cmpxchg and then decompiling it to see what it's doing?
#asahi-dev · 2023-03-04 04:15
alyssa(obviously can't prove a negative but yeah)
#asahi-dev · 2023-03-04 03:59
alyssadisappointing that Apple didn't throw in an int64 cmpxchg instruction
#asahi-dev · 2023-03-04 03:57
alyssanot needed for DXVK at least
#asahi-dev · 2023-03-04 03:55
alyssaSM 6.6, bleh
#asahi-dev · 2023-03-04 03:54
alyssayeah I don't feel good about emulating this. is shaderInt64Atomics actually needed? :(
#asahi-dev · 2023-03-04 03:54
alyssafor full Vulkan shaderInt64 i'd have to check the spec
#asahi-dev · 2023-03-04 03:54
alyssaMSL cheats here
#asahi-dev · 2023-03-04 03:53
alyssaoh but ugh the other issue there is going to be concurrent non-atomic loads
#asahi-dev · 2023-03-04 03:51
alyssaseems like there's prior art for doing that anyway
#asahi-dev · 2023-03-04 03:50
alyssaOr, a bit more generously, hash the address and index into an array of locks accordingly
#asahi-dev · 2023-03-04 03:50
alyssai.e. it would correct (if terribly inefficient) to have one big global lock to update any int64 atomic
#asahi-dev · 2023-03-04 03:49
alyssa"ok" in the sense of "sound", at the cost of performance obviously
#asahi-dev · 2023-03-04 03:49
alyssaalthough, again assuming the divergence rules work out so you don't deadlock, it should be ok to reuse locks for multiple pieces of memory
#asahi-dev · 2023-03-04 03:48
alyssaand since in general you can do atomics on any memory you want.. you need a general mapping of memory to lock
#asahi-dev · 2023-03-04 03:47
alyssauff, but you need to have a common bit of memory associated with the atomic memory to actually spin on
#asahi-dev · 2023-03-04 02:09
alyssa(correctly implementing mutexes on GPUs is tricky -- it's really easy to get deadlocks due to the divergence handling -- but not impossible)
#asahi-dev · 2023-03-04 02:08
alyssathis is presumably the logic Apple has in exposing float atomics on M1 as a convenience too
#asahi-dev · 2023-03-04 02:08
alyssaquite frankly atomics can be expected to be so slow (everywhere) that if they're even slower ... meh ...
#asahi-dev · 2023-03-04 02:03
alyssaif we do want to emulate.. I mean, do a mutex... it sucks, but
#asahi-dev · 2023-03-04 02:03
alyssaand optional in VK
#asahi-dev · 2023-03-04 02:03
alyssanot in GL, optional in CL, fwiw
#asahi-dev · 2023-03-04 02:03
alyssaTellowKrinkle: that's definitely an area of silliness yes
#asahi-dev · 2023-03-04 02:03
TellowKrinkle64-bit atomics might be pretty painful

plus ›