tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Question about atomic FIFO/LIFO queues



> Date: Fri, 25 Sep 2020 17:58:41 -0400
> From: Ruslan Nikolaev <nruslan_devel%yahoo.com@localhost>
> 
> I came across this page 
> https://wiki.netbsd.org/projects/project/atomic_fifo_lifo_queues/
> 
> Recently, we have designed a high-performant (and what is also very 
> important -- truly lock-free -- not just "lockless") and memory 
> efficient FIFO queue based on ring buffers that use FAA (fetch-and-add) 
> and traditional M&S queue as an outer layer (for unbounded queues).

Cool!

I don't actually know what the author of that project description had
in mind, and he's no longer around, so we should probably just take
that page down unless someone else remembers and it's still relevant.
Parts of the network stack use pcq(9) for inter-CPU packet queueing,
although in new code (and incrementally for old code) we generally try
to minimize inter-CPU communication except to distribute load.

https://man.NetBSD.org/pcq.9
https://nxr.NetBSD.org/xref/src/sys/kern/subr_pcq.c


Home | Main Index | Thread Index | Old Index