From 1a3fbe51210f0b54fe4109da75572ff421753be2 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 25 Aug 2026 01:31:19 -0400 Subject: [PATCH] 2060186437820010850 --- ...nt-have-to-be-like-this-but-the-new-dma.md | 63 +++++++++++++++ ...to-see-how-the-gpu-side-audio-turns-out.md | 39 +++++++++ ...-seemingly-incorrect-due-to-its-use-for.md | 37 +++++++++ .../index.md | 80 +++++++++++++++++++ archive/threads/NOTimothyLottes/index.md | 2 +- ...ause-based-arch-was-interesting-in-many.md | 2 +- 6 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-29-the_geeko1-this-doesnt-have-to-be-like-this-but-the-new-dma.md create mode 100644 archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-30-nicbarkeragain-very-keen-to-see-how-the-gpu-side-audio-turns-out.md create mode 100644 archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-06-27-mrsteyk1-its-seemingly-incorrect-due-to-its-use-for.md create mode 100644 archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/index.md diff --git a/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-29-the_geeko1-this-doesnt-have-to-be-like-this-but-the-new-dma.md b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-29-the_geeko1-this-doesnt-have-to-be-like-this-but-the-new-dma.md new file mode 100644 index 0000000..092a9d4 --- /dev/null +++ b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-29-the_geeko1-this-doesnt-have-to-be-like-this-but-the-new-dma.md @@ -0,0 +1,63 @@ +--- +title: "@NOTimothyLottes this doesn't have to be like this .." +type: archive +source: twitter +source_url: "https://x.com/the_geeko1/status/2060203539775869114" +author: "عَبْدُالهَادِي" +handle: the_geeko1 +post_id: "2060203539775869114" +date: 2026-05-29 +archived: 2026-08-25 +draft: false +tags: + - archive + - twitter + - NOTimothyLottes +description: "@NOTimothyLottes this doesn't have to be like this .." +in_reply_to: "" +parent_post_id: "2060198133905199300" +--- + +## Source + +- URL: https://x.com/the_geeko1/status/2060203539775869114 +- Author: عَبْدُالهَادِي (@the_geeko1) +- Posted: 2026-05-29 03:36:15 + +## Branch + +**1/** + +@NOTimothyLottes this doesn't have to be like this .. but the new DMA-buf changes are not upstreamed yet on linux .. if that's done I would love to upstream my changes to the AMD KMD so u can have actual physical addresses of VRAM exported. + +**2/** + +@NOTimothyLottes on the other side u could assign vfio-pci driver to the other device and write the drivers on user-space on both CPU/GPU and cut out the kernel drivers out the picture which is quite nice. + +**3/** + +@the_geeko1 This reminds me, I don't actually know how GPU audio (HDMI out) works, but I've always assumed it was a private onboard memory where regular shader load/store doesn't have access. The bandwidth though is tiny, so that round trip through the CPU is mostly just a latency concern + +**4/** + +@the_geeko1 And by latency, it's mostly a question of how to get a consistent small workload through the GPU at a periodic schedule (feed the data to the CPU right before it's needed for the copy back to the GPU) + +**5/** + +@the_geeko1 Networking is interesting, in that one could do a SALU/SMEM approach to processing packets, or one could do something like work with only fixed size UDP packets and process them using VALU/VMEM, in which case the CPU could interleave/deinterleave the dwords for good GPU access + +**6/** + +@the_geeko1 With the SALU/SMEM approach, having direct communication with the network card could be nice, but I doubt the linux folks want to allow raw UDP header/payload DMA scatter/gather bypassing all the OS layers + +**7/** + +@NOTimothyLottes It's always an option to drop the kernel driver and assign the vfio-pci driver and write a custom driver on user space .. also there some NICs with a programmable chip on them .. they could be programmed to DMA some packets into CPU memory like normal and some into the GPU + +**8/** + +@NOTimothyLottes Nvidia calls them DPU I think ? those are also useful for GPUs to share data if on the same network .. and I think that is the main driver behind Nvidia's work on restructuring how the DMA-bufs work on linux. + +## Related + +- Spine: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home]] diff --git a/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-30-nicbarkeragain-very-keen-to-see-how-the-gpu-side-audio-turns-out.md b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-30-nicbarkeragain-very-keen-to-see-how-the-gpu-side-audio-turns-out.md new file mode 100644 index 0000000..76db116 --- /dev/null +++ b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-30-nicbarkeragain-very-keen-to-see-how-the-gpu-side-audio-turns-out.md @@ -0,0 +1,39 @@ +--- +title: "@NOTimothyLottes Very keen to see how the GPU side audio turns out!" +type: archive +source: twitter +source_url: "https://x.com/nicbarkeragain/status/2060515066919936097" +author: "Nic Barker" +handle: nicbarkeragain +post_id: "2060515066919936097" +date: 2026-05-30 +archived: 2026-08-25 +draft: false +tags: + - archive + - twitter + - NOTimothyLottes +description: "@NOTimothyLottes Very keen to see how the GPU side audio turns out!" +in_reply_to: "" +parent_post_id: "2060186437820010850" +--- + +## Source + +- URL: https://x.com/nicbarkeragain/status/2060515066919936097 +- Author: Nic Barker (@nicbarkeragain) +- Posted: 2026-05-30 00:14:09 + +## Branch + +**1/** + +@NOTimothyLottes Very keen to see how the GPU side audio turns out! + +**2/** + +@nicbarkeragain To get the low latency Im looking for will require chunking up all work on the GPU and interleaving slots for audio processing. Lower bound on processing granularity is 32 stereo samples in a 64 wave, so less than a millisecond of representative time + +## Related + +- Spine: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home]] diff --git a/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-06-27-mrsteyk1-its-seemingly-incorrect-due-to-its-use-for.md b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-06-27-mrsteyk1-its-seemingly-incorrect-due-to-its-use-for.md new file mode 100644 index 0000000..1a30e14 --- /dev/null +++ b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-06-27-mrsteyk1-its-seemingly-incorrect-due-to-its-use-for.md @@ -0,0 +1,37 @@ +--- +title: "@NOTimothyLottes It's seemingly incorrect due to it's use for NtWaitForAlertByThreadId." +type: archive +source: twitter +source_url: "https://x.com/mrsteyk1/status/2070892786065482185" +author: "mrsteyk" +handle: mrsteyk1 +post_id: "2070892786065482185" +date: 2026-06-27 +archived: 2026-08-25 +draft: false +tags: + - archive + - twitter + - NOTimothyLottes +description: "@NOTimothyLottes It's seemingly incorrect due to it's use for NtWaitForAlertByThreadId." +in_reply_to: "" +parent_post_id: "2060190230838223346" +--- + +## Source + +- URL: https://x.com/mrsteyk1/status/2070892786065482185 +- Author: mrsteyk (@mrsteyk1) +- Posted: 2026-06-27 15:31:30 + +## Branch + +**1/** + +@NOTimothyLottes It's seemingly incorrect due to it's use for NtWaitForAlertByThreadId. Internal implementation is a hash table [128] indexed by (a1>>5)&0x7f inside PEB. Default spin value (v4) for my build is 10240 shared for similar type of functions (SRWLocks etc). + +![](https://pbs.twimg.com/media/HL1JKE7bIAAHEGc?format=png&name=orig) + +## Related + +- Spine: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home]] diff --git a/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/index.md b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/index.md new file mode 100644 index 0000000..2101697 --- /dev/null +++ b/archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/index.md @@ -0,0 +1,80 @@ +--- +title: "Took perhaps a 5 month vacation from at home programming, but getting back in the grove with 1hr/day." +type: archive +source: twitter +source_url: "https://x.com/NOTimothyLottes/status/2060186437820010850" +author: "NOTimothyLottes" +handle: NOTimothyLottes +post_id: "2060186437820010850" +date: 2026-05-29 +archived: 2026-08-25 +draft: false +tags: + - archive + - twitter + - NOTimothyLottes +description: "Took perhaps a 5 month vacation from at home programming, but getting back in the grove with 1hr/day." +in_reply_to: "" +--- + +## Source + +- URL: https://x.com/NOTimothyLottes/status/2060186437820010850 +- Author: NOTimothyLottes (@NOTimothyLottes) +- Posted: 2026-05-29 02:28:17 + +## Thread + +**1/** + +Took perhaps a 5 month vacation from at home programming, but getting back in the grove with 1hr/day. Polishing up my WIN32 and Linux system call interfaces. Perhaps working towards a demo of GPU-side audio and network processing. + +Branches: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-30-nicbarkeragain-very-keen-to-see-how-the-gpu-side-audio-turns-out]] + +**2/** + +Today's topic was Sleep [crap] vs NtDelayExecution [good], does seem useful to be able to NtAlertThread while a thread is sleeping (an analog to signaling while nanosleeping on Linux). + +**3/** + +Futex users, there is the WakeByAddressAll and WaitOnAddress in Windows. But why use those when you can just directly call https://ntdoc.m417z.com/rtlwaitonaddress - but haven't tried that yet, and are the docs correct, why PLARGE_INTEGER for ms, when NtDelayExecution does the 100ns unit thing? + +Branches: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-06-27-mrsteyk1-its-seemingly-incorrect-due-to-its-use-for]] + +**4/** + +https://trickybitsblog.github.io/2024/02/25/timestamps.html is a nice related read, also I'm a little late to the https://ntdoc.m417z.com/system_hypervisor_user_shared_data party, but will have that sorted soon as well + +**5/** + +Other thought, I typically mmap an extra LOG file, and write via atomic to grab a fixed width line. No stdout. The log wraps around and exists for multiple executions or even parallel processes. It's the way to do it ... BUT ... + +**6/** + +... I think I'm going to just move the LOG file into the first N KiB of the CART file. So mmap'ed on CPU and GPU, and I can just bank on how "less" doesn't actually load the entire file while printing, so I can still see output on a console if needed for debug. + +**7/** + +And another random thought, can you force de-power the CPU by abusing the https://www.felixcloutier.com/x86/pause instruction for things that are not spin-loops :) Going to have to try this one at some point. + +**8/** + +Pushing data to GPU is really a no-brainer (write-combined stores), minus possibility of non-atomic write visibility, so I do simple stuff like always having a ring buffer of packets available where the GPU can validate each entry with a HASH, taking the latest valid one to use + +**9/** + +Also AMD exports non-cached memory in VK, so it's possible to poll on data the CPU pushes (via write combined stores to VRAM) on AMD a few times per frame even. + +**10/** + +The workaround for NVIDIA is if one wants to read N times per frame, then the CPU needs to duplicate the packet ring to N separate lines. Then the GPU is free to poll, but using separate cachelines each time. + +**11/** + +The route back for IO that needs to be routed through the CPU {audio out, network out} is a lot more unfun. AMD again has the nice uncached memory support, so that part is easy. NVIDIA well, would have to take the crappy mid-frame L2 writeback (likely) making CPU-read available + +Branches: [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home/2026-05-29-the_geeko1-this-doesnt-have-to-be-like-this-but-the-new-dma]] + +**12/** + +Those who have tread here before with driver side logic (DMA transfers/etc) got screwed, Win+Linux driver idiots and their CPU interrupt based scheduling = completely useless. So getting the driver out of the picture is the way to go diff --git a/archive/threads/NOTimothyLottes/index.md b/archive/threads/NOTimothyLottes/index.md index 0736d88..c1d2d84 100644 --- a/archive/threads/NOTimothyLottes/index.md +++ b/archive/threads/NOTimothyLottes/index.md @@ -55,7 +55,7 @@ tags: - [[archive/threads/NOTimothyLottes/2026-01-14-can-do-that-but-at-least-these-kinds-of-systems]] - [[archive/threads/NOTimothyLottes/2026-03-08-ill-add-one-conspiracy-theory-for-everyone]] - [[archive/threads/NOTimothyLottes/2026-05-23-most-crap-o-grammers-today-in-the-user-space-c]] -- [[archive/threads/NOTimothyLottes/2026-05-29-https-trickybitsblog-github-io-2024-02-25]] +- [[archive/threads/NOTimothyLottes/2026-05-29-took-perhaps-a-5-month-vacation-from-at-home]] - [[archive/threads/NOTimothyLottes/2026-05-30-renovating-cpu-clock-code-im-assuming-x86-64-tsc]] - [[archive/threads/NOTimothyLottes/2026-05-31-hits-the-easy-to-debug-cpu-or-gpu-stuff-in-the]] - [[archive/threads/NOTimothyLottes/2026-05-31-no-debugger-debug-console-printf-style-prior]] diff --git a/archive/threads/Triang3l/2026-08-05-writes-have-write-only-caches-that-are/2026-08-05-NOTimothyLottes-that-clause-based-arch-was-interesting-in-many.md b/archive/threads/Triang3l/2026-08-05-writes-have-write-only-caches-that-are/2026-08-05-NOTimothyLottes-that-clause-based-arch-was-interesting-in-many.md index 568840f..2c51378 100644 --- a/archive/threads/Triang3l/2026-08-05-writes-have-write-only-caches-that-are/2026-08-05-NOTimothyLottes-that-clause-based-arch-was-interesting-in-many.md +++ b/archive/threads/Triang3l/2026-08-05-writes-have-write-only-caches-that-are/2026-08-05-NOTimothyLottes-that-clause-based-arch-was-interesting-in-many.md @@ -8,7 +8,7 @@ handle: NOTimothyLottes post_id: "2084996454175612983" date: 2026-08-05 archived: 2026-08-25 -draft: true +draft: false tags: - archive - twitter