Raw Block — 열린 PR Landscape & 미착수 Gap (2026-06-05)
기존 [[raw_block_priority]] / [[raw-block-perf-findings_vs_pr3274]] 는 commit 29bbd553(05-28) 기준이라 어느 항목이 PR 로 떠 있는지 추적이 없다. 이 노트는 upstream/dev 34de7177 기준, 2026-06-05 시점 열린 PR 과 우선순위 항목을 매핑하고 아직 PR 없는 빈틈을 추린다.
1. 2026-06-05 현재 열린 raw_block 관련 PR
| PR | 제목 | 영역 | 비고 |
|---|---|---|---|
| #3274 | Missing io_uring changes + nvme io_uring_cmd (passthrough) | I/O 계층 | _write_buffers/_read_buffers dispatcher, register_fixed_buffers_from_allocator, use_uring_cmd(/dev/ngXnY), MDTS split. DRAFT 아님 |
| #3526 | [Perf][RawBlock] Reduce put_many lock count from 4N to 2N | 락 | 우리 팀 (perf/reduce-lock-put-many) = L1 |
| #3494 | [perf] Reduce lock contention in batched_remove | 락 | 우리 팀 (perf/raw-block-batched-remove) |
| #3480 | [Fix] TOCTOU accounting bug in delete() (was_indexed) | 정합성 | = T1 |
| #3527 | [Core] Restore LRU eviction for rust raw-block backend | eviction | priv/dg |
| #3523 | [Fix] Tighten raw-block alignment validation | 정합성 | |
| #3519 | [Feat][RawBlock] Add BLKDISCARD startup support | NVMe TRIM | discard() + blkdiscard_on_init |
| #3449 | raw_block: compress checkpoint payload | 체크포인트 | = D1 계열 |
| #3226 | raw_block: incremental base+delta checkpoint format | 체크포인트 | = D1/D2 계열 |
| #3305 | Add raw-block payload checksum validation | 정합성 | priv/dg, DRAFT |
| #3154 | Add Rust BlkioBlockDevice backend (libblkio I/O) | I/O 대체엔진 | io_engine="libblkio" |
| #3272 | [Tool] flame-graph profiling into bench l2 adapter | 측정 도구 | io_uring 벤치 확장 |
2. 우선순위 항목(raw_block_priority) ↔ PR 매핑
| 항목 | 정의 | 진행 PR | 상태 |
|---|---|---|---|
| T1 | delete() TOCTOU 과대계상 | #3480 | ✅ PR 있음 |
| L1 | put_many key당 4→2 lock | #3526 | ✅ PR 있음 (우리 팀) |
| L2 | legacy batched_submit_put_task N-key 배치 분해 | — (priv/ny/legacy_batch_put) | 🔧 로컬 구현됨, upstream PR 미제출 |
| L3 | RustRawBlockBackend.batched_remove 락 N→1 | #3494 | ✅ PR 있음 (우리 팀) |
| P3 | Rust batch API → io_uring SQ 완전 활용 | #3274 (부분) | ⚠️ dispatcher 만 도입, 호출자가 길이-1 list |
| D1/D2 | checkpoint 용량/threshold | #3449, #3226 | ✅ PR 있음 |
| B2+P2 | _free_slots deque+set | — | ⏸ 미착수 |
| P1 | _snapshot_state lock 내 copy 분리 | — | ⏸ 미착수 |
| D3 | 단일 글로벌 lock 분리 | — | ⏸ 미착수 |
| L4/B1/T2 | latent 정리 | — | ⏸ 미착수 (낮음) |
3. #3274 가 "거의 다" 가져간 것 (중복 주의)
io_uring/NVMe 관점에서 새로 제안하려던 것 대부분이 #3274 에 이미 있음:
- ✅ write 배치 (
_write_buffers→batched_write+wait_iouring) - ✅ read dispatcher (
load_many_into→_read_buffers→batched_read) - ✅ fixed-buffer zero-copy 등록 (
register_fixed_buffers_from_allocator) — plugin 경로만 - ✅ NVMe passthrough/queue depth (
use_uring_cmd, sysfsmax_hw_sectors_kb, MDTS split)
→ 단, 한계가 남음 (상세 근거는 [[raw-block-perf-findings_vs_pr3274]] §2.4):
- 🆕 dispatcher 호출자 대다수가 길이-1 list →
batched_*의 의미 소실 (P3 여전히 P0) - 🆕
_read_uring_cmd_buffers는 chunk 마다 동기read_uring(batched_read 안 씀) - 🆕 MP/L2 경로(
RawBlockL2Adapter)는 fixed buffer 등록 안 함 — 경고만, zero-copy 미적용
4. #3274 와 겹치지 않는 진짜 미착수 Gap
I/O 계층(=#3274 영역)이 아닌 인덱스/락 계층은 손 안 탐:
| Gap | 내용 | 근거 | 난이도 | #3274 와 독립? |
|---|---|---|---|---|
| G1 | put_many 배치 슬롯 일괄 할당 (_allocate_slots_locked(n)) | core.py:467-516 키마다 lock | 낮음 | ✅ (L1=#3526 다음 단계) |
| G2 | dispatcher 호출자를 다중 키 단위로 (P3 핵심) | load_many_into/put_many 가 키 1개씩 _read_buffers/_write_buffers 호출 | 중간 | ✅ (#3274 의 follow-up) |
| G3 | MP/L2 경로 fixed-buffer 등록 hook | raw_block_l2_adapter.py:343 경고만 | 중간 | ✅ |
| G4 | 단일 _lock N-way 샤딩 (멀티큐 병렬) | core.py:240 = D3 | 높음 (체크포인트/복구까지) | ✅ |
※ L2(legacy batched_submit_put_task 배치)는 이미 priv/ny/legacy_batch_put 에 로컬 구현됨 — Gap 아님. upstream PR 제출만 남음.
우선순위 직관: G1(쉬움·#3526 연장) → G2(P3 본질, #3274 머지 후) → G3 → G4(큰 설계). G4(D3)는 raw_block_priority 에서 Tier 6 "경합 제한적" 으로 낮게 평가됨 — I/O 가 이미 lock 밖이라 실측 contention 확인 후 착수 판단 권장.
5. 다음 액션
- #3274 머지 여부/타임라인 확인 → G2 는 머지 후 follow-up 으로만 의미
- G1 을 #3526 의 후속 시리즈로 묶을지 (우리 팀 PR 연속성)
- D3(G4) 착수 전 단일 lock 실측 contention 프로파일 (#3272 flame-graph 활용)