ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
Forty-Bot has quit [Ping timeout: 248 seconds]
Lucanis0 has joined #armlinux
Lucanis0 has quit [Changing host]
Lucanis0 has joined #armlinux
Lucanis has quit [Quit: Leaving]
Forty-Bot has joined #armlinux
Lucanis0 has quit [Quit: Leaving]
Lucanis has joined #armlinux
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #armlinux
tachoknight has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nact has joined #armlinux
prabhakarlad has quit [Quit: Client closed]
justJingo has quit [Quit: ZNC 1.8.2 - https://znc.in]
justache has joined #armlinux
Misotauros has quit [Ping timeout: 268 seconds]
<HdkR> Is SVE VL part of the ABI? wondering if it ends up changing depending on library usage
Misotauros has joined #armlinux
cbeznea has joined #armlinux
amitk has joined #armlinux
Misotauros has quit [Remote host closed the connection]
Misotauros has joined #armlinux
Misotauros has quit [Max SendQ exceeded]
Misotauros has joined #armlinux
amitk has quit [Ping timeout: 260 seconds]
Pali has joined #armlinux
Misotauros has quit [Ping timeout: 268 seconds]
headless has joined #armlinux
Misotauros has joined #armlinux
headless has quit [Quit: Konversation terminated!]
Misotauros has quit [Ping timeout: 260 seconds]
plappermaul has joined #armlinux
elastic_dog has quit [Ping timeout: 244 seconds]
Misotauros has joined #armlinux
elastic_dog has joined #armlinux
elastic_dog has quit [Client Quit]
elastic_dog has joined #armlinux
naoki has quit [Quit: naoki]
apritzel has joined #armlinux
amitk has joined #armlinux
guillaume_g has joined #armlinux
guillaume_g has quit [Quit: Konversation terminated!]
cbeznea has quit [Quit: Leaving.]
amitk has quit [Ping timeout: 252 seconds]
Misotauros has quit [Ping timeout: 248 seconds]
Misotauros has joined #armlinux
plappermaul has quit [Quit: Client closed]
headless has joined #armlinux
elastic_dog has quit [Ping timeout: 244 seconds]
elastic_dog has joined #armlinux
apritzel has quit [Remote host closed the connection]
<broonie> HdkR: The ABI is VL agnostic.
<broonie> You're not supposed to change VL after thread startup, though there's nothing stopping you - if you do anything else which has stored SVE state is going to get upset. The standard ABI is that none of the SVE state is valid after a function call - there is also a SVE specific calling convention.
<HdkR> I see
<broonie> Anything that does use SVE will need to check the VL when allocating storage (there's a RDVL instruction for this), otherwise you should pretty much be able to ignore the VL in code.
<HdkR> I guess I'll need to burn some predicate registers for 128-bit and 256-bit wide or call arch_prctl after leaving the JIT space and coming back
<HdkR> Does VL change when a fault occurs or does it stay the same for when userspace catches it?
<broonie> I'm missing some context here...
<broonie> The VL will be the same in a signal handler as it is outside a signal handler, and we don't currently support changing VL through signal return.
<HdkR> alright, good to know. Concern was knowing current VL through a fault. If it had reset to 512bit but originally was 256-bit it could have been a concern
<broonie> The VL is part of the signal context so if you're in a signal handler looking at the signal frame you can look at that.
<broonie> If you return from a signal handler the SVE state should be restored identically unless the signal handler fiddles with the signal frame.
<HdkR> Good to know that VL is in it. Guess it is necessary for not consuming unnecessary stack space if VL is smaller than hardware max?
<HdkR> Since I'll be using it for the same purpose
<broonie> For SME when you get to having an implementation of that available we exit streaming mode when taking a signal but otherwise everything works the same (SM is part of the signal context so will be restored whne returning from the signal handler).
<broonie> The VL is in there since ideally we should support changing the VL through signal return - in theory this is something something using userspace threads done via sigreturn could use if threads have different VLs. I don't know why this wasn't supported when SVE was merged TBH.
<broonie> In practice it's unclear if people are likely to have threads with different VLs in the same process.
<HdkR> I'll definitely be doing that
<broonie> Mixing VLs? What's the use case OOI?
<HdkR> Primary threads will be limiting themselves to 128-bit or 256-bit *depending* and then tertiary threads will just be running at max length
<broonie> I'm still missing context here - what are you implementing here?
<broonie> And what's a primary/tertiary thread?
<HdkR> This is just an x86 emulator implementing AVX using SVE. Helping threads don't need to limit their vector length
<broonie> Ah, so you're matching the VL to the VL of the thing you're emulating?
<HdkR> aye
<broonie> Right, that makes total sense.
<broonie> And are you using lightweight threads for this (ie, changing "thread" via sigreturn)?
<HdkR> nah, using real threads. Just have a concern if any host library changes VL
chipxxx has joined #armlinux
<broonie> I'd be really surprised if anything does that without restoring before return, it'll cause all kinds of breakage if things are using SVE.
<HdkR> You never know what libGL/libVulkan and other "high-performance" things end up doing :P
<broonie> changing VL is at a minimum a syscall, and will trigger a full discard of SVE state and backing storage plus a trap to reallocate which should discourage doing anything clever in calling context.
<broonie> You'd be more likely to create a worker thread and set the VL you wanted in there.
<HdkR> Indeed. I'll be setting the VL on thread start where it is expected. But since it isn't a full system VM I can't quite control the world. Need to hope libraries don't pull the rug out from under me
<HdkR> userspace syscall dispatch would likely let me capture anything trying to do this. Once that feature is available anyway
chipxxx has quit [Read error: Connection reset by peer]
<broonie> Like I say that's a totally reasonable expectation for libraries, anything that fiddles with the VL without coordinating with the rest of the thread is going to break things.
<HdkR> I'll move forward with the expectation that libraries won't heck with VL. Then I can handle the pain once/if it happens.
headless has quit [Ping timeout: 244 seconds]
headless has joined #armlinux
apritzel has joined #armlinux
naoki has joined #armlinux
headless has quit [Quit: Konversation terminated!]
alpernebbi has quit [Ping timeout: 244 seconds]
alpernebbi has joined #armlinux
Tokamak has quit [Read error: Connection reset by peer]
Tokamak has joined #armlinux