Skip to content

[2/N][Feat] Add zero-copy aligned buffer odirect#2573

Merged
DongDongJu merged 50 commits intoLMCache:devfrom
DongDongJu:add-aligned-buffer-odirect
Feb 24, 2026
Merged

[2/N][Feat] Add zero-copy aligned buffer odirect#2573
DongDongJu merged 50 commits intoLMCache:devfrom
DongDongJu:add-aligned-buffer-odirect

Conversation

@DongDongJu
Copy link
Copy Markdown
Collaborator

@DongDongJu DongDongJu commented Feb 9, 2026

What this PR does / why we need it:

This PR improves the Rust raw block backend O_DIRECT path and keeps scope focused on zero-copy behavior and correctness.

Main changes:

  • Add/keep zero-copy-friendly O_DIRECT path in Rust + Python integration:
    • direct use of aligned Python/CPU buffer memory where possible
    • hybrid tail handling (direct aligned prefix + bounce only tail block)
  • Improve allocator alignment plumbing for O_DIRECT compatibility:
    • LocalCPUBackend uses rust raw block alignment knobs (rust_raw_block.block_align, rust_raw_block.align_local_cpu_allocator)
    • explicit override supported via local_cpu.pinned_align_bytes
  • Fix benchmark reliability/accuracy:
    • skip truncate() for real block device path
    • unique manifest per run to avoid stale-index reuse
    • bounded wait/fallback to avoid benchmark hangs
  • Update docs with zero-copy data path diagram and benchmark summary tables
  • Add reviewer-focused comments in Rust I/O code paths for maintainability

Special notes for your reviewers:

  • Scope is intentionally narrow:
    • no io_uring
    • no multi-io-worker implementation
    • no metadata architecture refactor
  • Focus is correctness + zero-copy O_DIRECT path + benchmark reproducibility.

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>
- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>
- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>
- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: DongDongJu <commisori28@gmail.com>
Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Collaborator

@maobaolong maobaolong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DongDongJu DongDongJu enabled auto-merge (squash) February 22, 2026 07:03
@DongDongJu DongDongJu disabled auto-merge February 22, 2026 08:16
@DongDongJu DongDongJu enabled auto-merge (squash) February 22, 2026 08:39
@DongDongJu DongDongJu disabled auto-merge February 22, 2026 15:11
@DongDongJu DongDongJu enabled auto-merge (squash) February 22, 2026 15:11
@DongDongJu DongDongJu closed this Feb 22, 2026
auto-merge was automatically disabled February 22, 2026 17:25

Pull request was closed

@DongDongJu DongDongJu reopened this Feb 22, 2026
@DongDongJu DongDongJu enabled auto-merge (squash) February 22, 2026 17:25
@sammshen sammshen added the full Run comprehensive tests on this PR label Feb 22, 2026
Copy link
Copy Markdown
Collaborator

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM., thanks @DongDongJu

Comment thread rust/raw_block/README.md
@DongDongJu DongDongJu disabled auto-merge February 23, 2026 14:19
@DongDongJu DongDongJu enabled auto-merge (squash) February 23, 2026 14:20
@github-actions github-actions Bot removed the full Run comprehensive tests on this PR label Feb 23, 2026
@DongDongJu
Copy link
Copy Markdown
Collaborator Author

Hello @Shaoting-Feng, IDK what happened for buildkite/vllm-integration-tests. Could you help me to debug this?

@sammshen sammshen added the full Run comprehensive tests on this PR label Feb 24, 2026
@DongDongJu DongDongJu merged commit 0c6e062 into LMCache:dev Feb 24, 2026
24 checks passed
sammshen pushed a commit to sammshen/LMCache that referenced this pull request Mar 1, 2026
* feat: Add simplified Rust Raw Block Backend

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* fix: Improve storage plugin launcher error handling

Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* feat: Add Rust raw block I/O extension

This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* test: Add tests for Rust Raw Block Backend

This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Improve error handling in Rust Raw Block Backend

- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Simplify Rust raw block I/O: remove unused features

- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Clean up comments and remove unused code in RustRawBlockBackend

- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Fix style issues and add Rust style checks

- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [CI] Allow crates.io egress for Rust Clippy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Fix] Defer inflight slot reuse to avoid corruption

Signed-off-by: DongDongJu <commisori28@gmail.com>

* fix style error

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Test] Update raw block tests for new metadata

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Add Rust raw block I/O guide

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix rustfmt alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Update raw block README usage

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Clarify raw block I/O behavior

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add storage backend I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add sample results for I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Allow output directory for JSON results

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Document output-dir sanity run

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Use same filesystem for raw block fallback

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix ruff line length in benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Wrap benchmark description string

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Align buffers for O_DIRECT comparison

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Enable O_DIRECT zero-copy fast path for rust raw backend

- add direct aligned O_DIRECT read/write path in Rust extension with bounce fallback
- wire LocalCPUBackend allocator alignment to rust_raw_block O_DIRECT settings
- add allocator alignment tests and update raw_block README

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Fix mypy typing issues in allocator alignment changes

- fix MixedMemoryAllocator paging alignment typing
- avoid mixed-type kwargs path for MixedMemoryAllocator construction
- keep tests formatted after isort/pre-commit

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* local_cpu: remove experimental lazy allocator path and simplify alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* bench: harden storage backend benchmark execution

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: update benchmark results and raw block zero-copy notes

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust/raw_block: add reviewer-focused comments for io paths

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: add async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: remove async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: remove fixed benchmark numbers and keep reproducible NVMe comparison steps

Signed-off-by: DongDongJu <commisori28@gmail.com>

* bench: scale local_disk timeout with num_ops for long runs

Signed-off-by: DongDongJu <commisori28@gmail.com>

---------

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
hlin99 pushed a commit to hlin99/LMCache that referenced this pull request Mar 2, 2026
* feat: Add simplified Rust Raw Block Backend

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* fix: Improve storage plugin launcher error handling

Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* feat: Add Rust raw block I/O extension

This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* test: Add tests for Rust Raw Block Backend

This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Improve error handling in Rust Raw Block Backend

- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Simplify Rust raw block I/O: remove unused features

- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Clean up comments and remove unused code in RustRawBlockBackend

- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Fix style issues and add Rust style checks

- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [CI] Allow crates.io egress for Rust Clippy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Fix] Defer inflight slot reuse to avoid corruption

Signed-off-by: DongDongJu <commisori28@gmail.com>

* fix style error

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Test] Update raw block tests for new metadata

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Add Rust raw block I/O guide

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix rustfmt alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Update raw block README usage

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Clarify raw block I/O behavior

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add storage backend I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add sample results for I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Allow output directory for JSON results

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Document output-dir sanity run

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Use same filesystem for raw block fallback

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix ruff line length in benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Wrap benchmark description string

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Align buffers for O_DIRECT comparison

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Enable O_DIRECT zero-copy fast path for rust raw backend

- add direct aligned O_DIRECT read/write path in Rust extension with bounce fallback
- wire LocalCPUBackend allocator alignment to rust_raw_block O_DIRECT settings
- add allocator alignment tests and update raw_block README

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Fix mypy typing issues in allocator alignment changes

- fix MixedMemoryAllocator paging alignment typing
- avoid mixed-type kwargs path for MixedMemoryAllocator construction
- keep tests formatted after isort/pre-commit

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* local_cpu: remove experimental lazy allocator path and simplify alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* bench: harden storage backend benchmark execution

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: update benchmark results and raw block zero-copy notes

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust/raw_block: add reviewer-focused comments for io paths

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: add async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: remove async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: remove fixed benchmark numbers and keep reproducible NVMe comparison steps

Signed-off-by: DongDongJu <commisori28@gmail.com>

* bench: scale local_disk timeout with num_ops for long runs

Signed-off-by: DongDongJu <commisori28@gmail.com>

---------

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
mauryaavinash95 pushed a commit to mauryaavinash95/LMCache that referenced this pull request Mar 7, 2026
* feat: Add simplified Rust Raw Block Backend

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* fix: Improve storage plugin launcher error handling

Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* feat: Add Rust raw block I/O extension

This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* test: Add tests for Rust Raw Block Backend

This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Improve error handling in Rust Raw Block Backend

- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Simplify Rust raw block I/O: remove unused features

- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Clean up comments and remove unused code in RustRawBlockBackend

- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Fix style issues and add Rust style checks

- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [CI] Allow crates.io egress for Rust Clippy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Fix] Defer inflight slot reuse to avoid corruption

Signed-off-by: DongDongJu <commisori28@gmail.com>

* fix style error

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Test] Update raw block tests for new metadata

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Add Rust raw block I/O guide

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix rustfmt alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Update raw block README usage

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Clarify raw block I/O behavior

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add storage backend I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add sample results for I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Allow output directory for JSON results

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Document output-dir sanity run

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Use same filesystem for raw block fallback

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix ruff line length in benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Wrap benchmark description string

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Align buffers for O_DIRECT comparison

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Enable O_DIRECT zero-copy fast path for rust raw backend

- add direct aligned O_DIRECT read/write path in Rust extension with bounce fallback
- wire LocalCPUBackend allocator alignment to rust_raw_block O_DIRECT settings
- add allocator alignment tests and update raw_block README

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Fix mypy typing issues in allocator alignment changes

- fix MixedMemoryAllocator paging alignment typing
- avoid mixed-type kwargs path for MixedMemoryAllocator construction
- keep tests formatted after isort/pre-commit

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* local_cpu: remove experimental lazy allocator path and simplify alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* bench: harden storage backend benchmark execution

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: update benchmark results and raw block zero-copy notes

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust/raw_block: add reviewer-focused comments for io paths

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: add async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: remove async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: remove fixed benchmark numbers and keep reproducible NVMe comparison steps

Signed-off-by: DongDongJu <commisori28@gmail.com>

* bench: scale local_disk timeout with num_ops for long runs

Signed-off-by: DongDongJu <commisori28@gmail.com>

---------

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
shaoxiawjc pushed a commit to shaoxiawjc/LMCache that referenced this pull request Mar 11, 2026
* feat: Add simplified Rust Raw Block Backend

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* fix: Improve storage plugin launcher error handling

Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* feat: Add Rust raw block I/O extension

This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* test: Add tests for Rust Raw Block Backend

This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Improve error handling in Rust Raw Block Backend

- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Simplify Rust raw block I/O: remove unused features

- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Clean up comments and remove unused code in RustRawBlockBackend

- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Fix style issues and add Rust style checks

- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [CI] Allow crates.io egress for Rust Clippy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Fix] Defer inflight slot reuse to avoid corruption

Signed-off-by: DongDongJu <commisori28@gmail.com>

* fix style error

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Test] Update raw block tests for new metadata

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Add Rust raw block I/O guide

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix rustfmt alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Update raw block README usage

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Clarify raw block I/O behavior

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add storage backend I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add sample results for I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Allow output directory for JSON results

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Document output-dir sanity run

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Use same filesystem for raw block fallback

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix ruff line length in benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Wrap benchmark description string

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Align buffers for O_DIRECT comparison

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Enable O_DIRECT zero-copy fast path for rust raw backend

- add direct aligned O_DIRECT read/write path in Rust extension with bounce fallback
- wire LocalCPUBackend allocator alignment to rust_raw_block O_DIRECT settings
- add allocator alignment tests and update raw_block README

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Fix mypy typing issues in allocator alignment changes

- fix MixedMemoryAllocator paging alignment typing
- avoid mixed-type kwargs path for MixedMemoryAllocator construction
- keep tests formatted after isort/pre-commit

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* local_cpu: remove experimental lazy allocator path and simplify alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* bench: harden storage backend benchmark execution

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: update benchmark results and raw block zero-copy notes

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust/raw_block: add reviewer-focused comments for io paths

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: add async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: remove async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: remove fixed benchmark numbers and keep reproducible NVMe comparison steps

Signed-off-by: DongDongJu <commisori28@gmail.com>

* bench: scale local_disk timeout with num_ops for long runs

Signed-off-by: DongDongJu <commisori28@gmail.com>

---------

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
Signed-off-by: shaoxiawjc <wjc2800@163.com>
realAaronWu pushed a commit to realAaronWu/LMCache that referenced this pull request Mar 20, 2026
* feat: Add simplified Rust Raw Block Backend

This commit introduces a simplified Rust Raw Block Backend implementation
that focuses on core read/write functionality without complex scheduling
or multi-queue features.

Key features:
- Direct block device I/O via Rust extension (RawBlockDevice)
- O_DIRECT support for bypassing page cache
- Manifest persistence for crash recovery
- LRU eviction policy
- Single device support (no multi-FD pools)
- Async write operations using asyncio.to_thread
- Blocking read operations via pread_into

The implementation is simplified compared to previous versions:
- No RawBlockScheduler or RawBlockDevicePool
- No prefetch implementation (batched_get_non_blocking returns empty list)
- Single device handle per backend instance
- Minimal configuration (no io_fds, io_workers parameters)

This backend currently supports TP=1 (single GPU) deployments only.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* fix: Improve storage plugin launcher error handling

Add warning when storage_plugins is configured but extra_config is empty,
providing clearer guidance to users about required configuration.

This helps prevent silent failures when storage plugins are specified
but not properly configured.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* feat: Add Rust raw block I/O extension

This commit adds the core Rust extension module for direct block device
I/O operations used by the Rust Raw Block Backend.

Key components:
- RawBlockDevice: Single-FD synchronous block device interface
  - Direct pwrite/pread operations with O_DIRECT support
  - Zero-copy buffer protocol integration
  - Aligned buffer allocation for O_DIRECT I/O
- RawBlockDevicePool: Multi-FD pool for parallel I/O
  - Per-CPU FD selection for parallelism
  - Multiple file descriptors per device
- RawBlockScheduler: Async I/O scheduler with worker threads
  - Priority-based task queues (High/Medium/Low)
  - Worker threads with CPU pinning
  - Completion queue with GIL-safe processing

The Rust extension provides:
- Direct block device access via libc pwrite/pread
- O_DIRECT support with automatic alignment handling
- Python buffer protocol integration for zero-copy operations
- Thread-safe I/O operations with proper GIL management
- Error handling with proper Python exception propagation

This is the core I/O layer that the Python backend uses for all
block device operations.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* test: Add tests for Rust Raw Block Backend

This commit adds comprehensive tests for the Rust Raw Block Backend
implementation.

Test coverage includes:
- Basic store and retrieve operations
- Manifest persistence and recovery
- LRU eviction behavior
- O_DIRECT alignment handling
- Error handling for invalid configurations
- Edge cases (empty writes, large chunks)

The tests verify both functional correctness and integration with
the Rust extension module.

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Improve error handling in Rust Raw Block Backend

- Add try-except blocks for I/O operations with proper error logging
- Fix test code to use correct API (torch.Size and pwrite_from_buffer)

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Simplify Rust raw block I/O: remove unused features

- Remove RawBlockDevicePool (multi-FD pool)
- Remove RawBlockScheduler (async I/O scheduler)
- Remove batch operations and priority queue features
- Keep only RawBlockDevice with basic pwrite_from_buffer and pread_into

This simplifies the codebase to only include features actually used by
the Python backend.

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Clean up comments and remove unused code in RustRawBlockBackend

- Fix misleading 'zero-copy' comment (actually uses bounce buffers for O_DIRECT)
- Remove unused _decode_header method
- Remove unimplemented batched_get_non_blocking method
- Update remove() method comment to reflect actual behavior
- Improve docstrings for accuracy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Fix style issues and add Rust style checks

- Fix ruff E501 line length errors in docstrings
- Format Rust code with cargo fmt
- Fix clippy warnings (unused mut, dead code, manual_div_ceil)
- Add Rust fmt and clippy checks to pre-commit hooks

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [CI] Allow crates.io egress for Rust Clippy

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Fix] Defer inflight slot reuse to avoid corruption

Signed-off-by: DongDongJu <commisori28@gmail.com>

* fix style error

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Test] Update raw block tests for new metadata

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Add Rust raw block I/O guide

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix rustfmt alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Update raw block README usage

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Docs] Clarify raw block I/O behavior

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add storage backend I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Add sample results for I/O benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Allow output directory for JSON results

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Document output-dir sanity run

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Use same filesystem for raw block fallback

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Fix ruff line length in benchmark

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Style] Wrap benchmark description string

Signed-off-by: DongDongJu <commisori28@gmail.com>

* [Bench] Align buffers for O_DIRECT comparison

Signed-off-by: DongDongJu <commisori28@gmail.com>

* Enable O_DIRECT zero-copy fast path for rust raw backend

- add direct aligned O_DIRECT read/write path in Rust extension with bounce fallback
- wire LocalCPUBackend allocator alignment to rust_raw_block O_DIRECT settings
- add allocator alignment tests and update raw_block README

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* Fix mypy typing issues in allocator alignment changes

- fix MixedMemoryAllocator paging alignment typing
- avoid mixed-type kwargs path for MixedMemoryAllocator construction
- keep tests formatted after isort/pre-commit

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* local_cpu: remove experimental lazy allocator path and simplify alignment

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* bench: harden storage backend benchmark execution

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: update benchmark results and raw block zero-copy notes

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust/raw_block: add reviewer-focused comments for io paths

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: add async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* rust_raw_block: remove async batch submission mode

Signed-off-by: DongDongJu <commisori28@gmail.com>

Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>

* docs: remove fixed benchmark numbers and keep reproducible NVMe comparison steps

Signed-off-by: DongDongJu <commisori28@gmail.com>

* bench: scale local_disk timeout with num_ops for long runs

Signed-off-by: DongDongJu <commisori28@gmail.com>

---------

Signed-off-by: DongDongJu <commisori28@gmail.com>
Signed-off-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
Signed-off-by: Aaron Wu <aaron.wu@dell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants