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:
@@ -44,6 +44,7 @@ public:
|
||||
inputEngineConstraints,
|
||||
outputEngineConstraints,
|
||||
static_cast<size_t>(histbuffMs / CONFIG_STIMBUFF_FRAME_PERIOD_MS)),
|
||||
stagingBufferPinner(stagingBuffer.makeMlockPinner()),
|
||||
ringBuffer(
|
||||
static_cast<std::shared_ptr<FrameAssemblyDesc>>(stagingBuffer),
|
||||
callbacks, flags)
|
||||
@@ -51,17 +52,18 @@ public:
|
||||
|
||||
virtual ~StimulusBuffer() = default;
|
||||
|
||||
// Non-copyable, movable
|
||||
// Non-copyable, non-movable: pinner lifetime is tied to this instance
|
||||
StimulusBuffer(const StimulusBuffer&) = delete;
|
||||
StimulusBuffer& operator=(const StimulusBuffer&) = delete;
|
||||
StimulusBuffer(StimulusBuffer&&) = default;
|
||||
StimulusBuffer& operator=(StimulusBuffer&&) = default;
|
||||
StimulusBuffer(StimulusBuffer&&) = delete;
|
||||
StimulusBuffer& operator=(StimulusBuffer&&) = delete;
|
||||
|
||||
public:
|
||||
StimulusProducer& parent;
|
||||
std::shared_ptr<device::DeviceAttachmentSpec> deviceAttachmentSpec;
|
||||
int histbuffMs;
|
||||
StagingBuffer stagingBuffer;
|
||||
std::unique_ptr<StagingBuffer::MlockPinner> stagingBufferPinner;
|
||||
SpMcRingBuffer ringBuffer;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user