Conversation
Add new UBLK_DEV_F_MLOCK_IO_BUFFER flag to lock IO buffer pages in memory, preventing them from being swapped to disk for predictable IO latency. Key changes: - Add UBLK_DEV_F_MLOCK_IO_BUFFER flag to UblkFlags - Enhance IoBuf with mlock/munlock support via new_with_mlock() - Add feature compatibility validation (incompatible with USER_COPY, AUTO_BUF_REG, and SUPPORT_ZERO_COPY) - Integrate mlock support in UblkDev::alloc_queue_io_bufs() - Add comprehensive test coverage for mlock functionality - Don't discard io buffer pages in case of UBLK_DEV_F_MLOCK_IO_BUFFER - Update loop example with --mlock-io-buffer command line option - Document CAP_IPC_LOCK capability requirement The feature requires CAP_IPC_LOCK capability and can be granted with: sudo setcap cap_ipc_lock=eip $UBLK_EXECUTABLE Signed-off-by: Ming Lei <tom.leiming@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add new UBLK_DEV_F_MLOCK_IO_BUFFER flag to lock IO buffer pages in memory, preventing them from being swapped to disk for predictable IO latency.
Key changes:
The feature requires CAP_IPC_LOCK capability and can be granted with: sudo setcap cap_ipc_lock=eip $UBLK_EXECUTABLE