ChanServ changed the topic of #asahi-re to: Asahi Linux: porting Linux to Apple Silicon macs | Hardware / boot process / firmware interface reverse engineering | WARNING: this channel (only) may contain binary reverse engineering discussion | RE policy: https://alx.sh/re (MANDATORY READ) | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-re
chadmed has joined #asahi-re
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doggkruse has joined #asahi-re
phiologe has joined #asahi-re
PhilippvK has quit [Ping timeout: 480 seconds]
janithpet[m] has joined #asahi-re
the_lanetly_052 has joined #asahi-re
nicolas17 has quit [Ping timeout: 480 seconds]
sven has quit [Remote host closed the connection]
sven has joined #asahi-re
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
the_lanetly_052 has joined #asahi-re
the_lanetly_052 has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-re
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
kameks has joined #asahi-re
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
pzcz has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
jakebot has quit [Read error: Connection reset by peer]
jakebot has joined #asahi-re
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
<YichaoYu[m]> I noticed that a failed cas instruction seems to be about 2-10x slower than successful ones, depending on the memory order on the m1. And I don't see this on intel.
<YichaoYu[m]> it also generates many more counts on the counters that I suspect related to uops issued.
alcazar has joined #asahi-re
<YichaoYu[m]> I don't really know how people implement atomics these days but is it possible that these atomic operations are actually ucoded and internally it's still using something similar to llsc?
<YichaoYu[m]> and this difference is especially pronouced with more relaxed ordering, and especially on the P cores
<TellowKrinkle[m]> I remember seeing on the Swift forums that Apple CPUs have no performance penalty for uncontested atomic refcounting (which Swift used CAS for), so they definitely optimized the success case
<TellowKrinkle[m]> Whether that was to the detriment of the failure case I don't know
<YichaoYu[m]> note that I'm talking about single thread here
<YichaoYu[m]> I was basically doing a cas with the wrong compare value with no contention.
<_jannau_> do you target armv8-a. or armv8.1-a (or later)
<YichaoYu[m]> and yes, successful weak ordering cas is really cheap
<YichaoYu[m]> yes when I cross-checked it in julia, and for my original test it's hand written assembly
<_jannau_> the first will give you load/store exclusive atomics the later has explicit atomic instructions
<YichaoYu[m]> and the fail case ~20 lines below
<YichaoYu[m]> (hand writen -> script generated...)
alcazar has quit [Ping timeout: 480 seconds]
<YichaoYu[m]> for a successful relaxed ordered cas with no contention, the loop takes 3 cycles on the P core (compared to ~1 cycle if it was a simple store).
<YichaoYu[m]> if the comparison failed, still with no contention, it takes 58 cycles per loop on the p core
alcazar has joined #asahi-re
<YichaoYu[m]> on a related note, a failed cas does generate a count on the counter where a failed stxr does (180/0xb4)
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
yuyichao has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
kameks has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
nyx_o has quit [Quit: WeeChat 3.4]
nyx_o has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-re
alcazar has joined #asahi-re
nicolas17 has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
doggkruse has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
MajorBiscuit has quit [Ping timeout: 480 seconds]
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-re
alcazar has joined #asahi-re
MajorBiscuit has quit [Ping timeout: 480 seconds]
HardWall has joined #asahi-re
HardWall has quit []
herbas_ has joined #asahi-re
HardWall has joined #asahi-re
HardWall has quit []
HardWall has joined #asahi-re
HardWall has quit []
alcazar has quit [Ping timeout: 480 seconds]
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-re
alcazar has joined #asahi-re
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alcazar has quit [Ping timeout: 480 seconds]
herbas_ has quit [Remote host closed the connection]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
IonutLazurca[m] has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
r0ni has joined #asahi-re
atsalyuk has joined #asahi-re
alcazar has joined #asahi-re
MajorBiscuit has joined #asahi-re
yuyichao has quit [Quit: Konversation terminated!]
yuyichao has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-re
boardwalk has joined #asahi-re
MajorBiscuit has quit []
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
atsalyuk has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
atsalyuk has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alexsv has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
alcazar has quit [Ping timeout: 480 seconds]
alcazar has joined #asahi-re
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]