xavierxwang
Re:Put a ring on it: a lock-free MPMC ring buffer
on Tuesday December 16, 2025 @05:18PM (#46295398)
After a quick glance, it seems that you don’t maintain the reading/writing status in the shared memory. That means you have to make a syacall in every read/write call. You could look into the kaze-core for an alternative implementation, which doesn’t require any syscall if possible.
Btw, kaze-core uses a `used` atomic variable, to avoid reading both readPos/writePos in routine - they are not atomic at all.
Re:Put a ring on it: a lock-free MPMC ring buffer
on Tuesday December 16, 2025 @10:01AM (#46289349)
Is there any chance to modify Vyukov's MPMC queue implement (https://www.1024cores.net/home/lock-free-algorithms/queues/b...) to support drop handler? That work doesn't need 128 bit CAS.
Re:Put a ring on it: a lock-free MPMC ring buffer
on Tuesday December 16, 2025 @10:00AM (#46289331)
FYI: I have made a SPSC circular buffer for swap data in a pair of process: https://github.com/starwing/kaze-core
maybe that is what you want.
Re:Building Musubi: A diagnostic renderer ported from Rust to C with L...
on Tuesday December 16, 2025 @08:57AM (#46288527)
I spent a month porting Rust's Ariadne diagnostic renderer to C,
with Claude as a pair programming partner. The project taught me
a lot about working with LLMs on real system programming tasks -
what works, what doesn't, and where human expertise still matters.