#
✕ nick:lina
#asahi-gpu · 2023-11-12 07:45
linaIf you need to consider the "nothing submitted on this sync" case as unsignaled, you need to track that in userspace (that rule is for sync objects from the point of view of the kernel interface).
#asahi-gpu · 2023-11-12 07:44
linai509vcb: Sync objects are always either signaled or will be signaled by an ongoing GPU submission. It's not legal for a sync object to be non-signaled for an indefinite amount of time, which is why a "fresh" sync object is always signaled on creation. It becomes unsignaled when you use it to submit work, until that work completes.
#asahi-gpu · 2023-09-12 19:16
linaI have some PR too~ https://www.youtube.com/shorts/ToulgVAofw8
#asahi-gpu · 2023-09-09 01:35
linaSpeaking of VMs! https://vt.social/@slp@fosstodon.org/111031628757483320 ^^
#asahi-gpu · 2023-09-09 01:35
linaApple don't have SVM so they don't care with 4K processes
#asahi-gpu · 2023-09-09 01:34
linaalyssa: I'm not sure how SVM would even work inside a VM exactly but yeah
#asahi-gpu · 2023-09-08 17:33
linajannau: I'll read it later but that would be nice ^^
#asahi-gpu · 2023-09-08 17:33
linaAnyway really, nn ^^
#asahi-gpu · 2023-09-08 17:33
linaLike my broken shm hack to get order-2 allocs
#asahi-gpu · 2023-09-08 17:32
linaThere are probably a bunch of weird specific solutions ^^
#asahi-gpu · 2023-09-08 17:32
linaThere's no general solution to this problem
#asahi-gpu · 2023-09-08 17:32
linaIt would work with hugepages w
#asahi-gpu · 2023-09-08 17:31
lina(That's already how it works on 4K kernels if you try to give it unaligned BOs ^^)
#asahi-gpu · 2023-09-08 17:30
lina4K is just for gamers anyway ^^
#asahi-gpu · 2023-09-08 17:29
linaAnyway, nn Â^^
#asahi-gpu · 2023-09-08 17:29
linaYeah, no SVM on 4K
#asahi-gpu · 2023-09-08 17:29
linaSo yeah that's never going to work
#asahi-gpu · 2023-09-08 17:29
linaAnd can't be made contiguous reliably even if you have weird migration stuff
#asahi-gpu · 2023-09-08 17:28
linaYeah, which won't be contiguous
#asahi-gpu · 2023-09-08 17:28
linaThe GPU pages are 16K so good luck mapping arbitrary CPU 4K pages...
#asahi-gpu · 2023-09-08 17:28
linaI mean on AGX
#asahi-gpu · 2023-09-08 17:27
lina(That's never going to work on 4K...)
#asahi-gpu · 2023-09-08 17:27
linaYeah, userptr... as long as you're on a 16K kernel ^^
#asahi-gpu · 2023-09-08 17:25
linaI should sleep ^^
#asahi-gpu · 2023-09-08 17:25
linaAnyway I don't know how this really works, I just want to make sure I understand what we can do ^^
#asahi-gpu · 2023-09-08 17:25
linaYeah...
#asahi-gpu · 2023-09-08 17:24
linaBut I mean, we could have an SVM mode which syncs the CPU page tables like I think nouveau has?
#asahi-gpu · 2023-09-08 17:24
linaIt's the VM_BIND thing
#asahi-gpu · 2023-09-08 17:23
linakarolherbst: Userspace, except the carveout for kernel BOs
#asahi-gpu · 2023-09-08 14:17
linaWhich is the best we can do for SVM
#asahi-gpu · 2023-09-08 14:16
linaI guess we should move the magic page to the top at 0x7fffff8000 and then just say we "almost" have 40 bits of address space for userspace to allocate however it wants
#asahi-gpu · 2023-09-08 14:16
linaI don't think any of the others are used for anything, so we can probably ignore those globals and let userspace define those addresses
#asahi-gpu · 2023-09-08 14:16
linaOK, the "magic page" address at 0x6fffff8000 is written to a hardware register, so that one does something...
#asahi-gpu · 2023-09-08 14:06
linano
#asahi-gpu · 2023-09-08 13:59
linaI guess I should grep the firmware a bit, see if I can confirm or deny any of it
#asahi-gpu · 2023-09-08 13:59
linaThe globals that mention these addresses annoy me, but for all we know the firmware never uses them...
#asahi-gpu · 2023-09-08 13:58
linaWe probably want some code in mesa to rand() the carveouts to an extent, to prove this actually works
#asahi-gpu · 2023-09-08 13:57
linaThis will be another UAPI break once I flip it around
#asahi-gpu · 2023-09-08 13:55
lina*reason
#asahi-gpu · 2023-09-08 13:55
lina(I donÂ't know how they deal with that but if they do, no raeason not to try here too)
#asahi-gpu · 2023-09-08 13:55
lina(with GPU AS < CPU AS)
#asahi-gpu · 2023-09-08 13:55
linaNo, that's what this is for. Apparently Nvidia has the same problem and somehow they make it work?
#asahi-gpu · 2023-09-08 13:54
linaFrom what I heard we want to try to de-hardcode most of this address space stuff, so eventually it might be closer to the full 512GiB lower half (full AS is 40 bits / 1 TiB but half is kernel land)
#asahi-gpu · 2023-09-08 13:53
linaUser address space right now is 256GiB (half of the 512GiB half since the rest is reserved for other purposes) and Apple don't sell machines with that much RAM, so something based on RAM size probably makes more sense if you want a "useful" value
#asahi-gpu · 2023-09-08 13:51
linaYeah
#asahi-gpu · 2023-09-08 13:51
linaWhat's the value right now?
#asahi-gpu · 2023-09-08 13:50
linaNot "any buffer"
#asahi-gpu · 2023-09-08 13:50
linaThis is a very specific mesh/geom emu buffer thing
#asahi-gpu · 2023-09-08 13:50
linaThat has nothing to do with this
#asahi-gpu · 2023-09-08 13:49
linaI mean if we need to allocate at ioctl time it's not much harder to have it allocate-or-expand and take the buffer size from userspace

plus ›