StagingBuff: support both Mlock & IOUring pin; Use in IoUAssmEngn

We use io_uring_register_buffers() for IoUringAssemblyEngine instead
of using mlock(). This __appears__ to have reduced CPU utilization on
the Dell laptop. Could also be that we recently upgraded total RAM
from 8GiB to 32GiB.
This commit is contained in:
2026-04-02 03:51:22 -04:00
parent 26dd686ebf
commit 1d64ce0c7e
11 changed files with 257 additions and 61 deletions
@@ -21,6 +21,7 @@
#include <spinscale/callback.h>
#include <spinscale/spinLock.h>
#include <user/frameAssemblyDesc.h>
#include <user/stagingBuffer.h>
#define IOURINGASSM_ENGN_FRAME_ASSEM_TIMEOUT_MS \
(CONFIG_STIMBUFF_FRAME_PERIOD_MS / 2)
@@ -73,6 +74,7 @@ private:
uint64_t eventfd_value; // Buffer for async_read_some
// Point cloud data socket descriptor
std::shared_ptr<boost::asio::posix::stream_descriptor> pcloudDataFdDesc;
std::unique_ptr<StagingBuffer::IoUringPinner> assemblyBufferIoUringPinner;
// Stall detection timer
boost::asio::deadline_timer stallTimer;
@@ -122,4 +124,3 @@ public:
#endif // _LIVOX_GEN1_IOURING_ASSEMBLY_ENGINE_H