[RFC PATCH 0/1] mm: Haven Memory Bus (HMB) zero-bio paging engine with Tier 2 z-Pack deduplication
From: Daniel Elliott
Date: Wed Oct 21 2026 - 17:19:25 EST
Executive Summary
=================
This RFC introduces the Haven Memory Bus (HMB) Spec 2.0 Native Paging Engine
directly into the Linux Virtual Memory Manager (mm/).
For over thirty years, general-purpose operating systems have
assumed secondary
storage is an asynchronous block device. Even modern in-RAM paging
subsystems
(e.g., zram, zswap) construct struct bio descriptors, pass through blk-mq
software request queues, and traverse I/O elevator schedulers
before reaching
physical memory.
HMB eliminates this legacy abstraction. By intercepting folios directly in
mm/page_io.c (swap_writepage and swap_read_folio), HMB provides:
1. Zero-Bio / Zero-Queue Bypass: Folios are stored and retrieved using
lock-free O(1) arithmetic stride indexing directly over the CPU
memory bus.
2. Tier 2 z-Pack Inline Deduplication:
- Zero pages: 100% deduplication (stored in a single bitmask bit).
- Uniform 64-bit quadword patterns: 99.8% deduplication (stored
in 8 bytes).
- Varied pages: Stored in high-speed slab pages without block
serialization.
3. Sub-Microsecond #PF Resolution: Page faults resolve in 0.51 us,
eliminating
thread stalls in uninterruptible disk sleep (D state).
Bare-Metal Silicon Benchmarks
=============================
All benchmarks were conducted on a physical bare-metal server (Supermicro
X11SSH-F, Intel Xeon E3-1270 v6 @ 3.80GHz, 32GB ECC DDR4, 2x 2TB HGST
Ultrastar 7200 RPM SATA HDDs) running Linux 7.0.14-hmb.
1. Page Fault Resolution & Latency Under Memory Pressure
In a constrained cgroup v2 environment (MemoryMax=256M), a worker process
allocated 600 MB of dirty heap, forcing the kernel to evict ~350 MB of
anonymous memory. The process then immediately read back all
memory to trigger
real kernel page-in (#PF):
Paging Mechanism | Paging Latency | Recovery Time | Speedup
----------------------------------+----------------+---------------+--------
Traditional Swap (7200 RPM HDD) | ~10,000 us | 258.0 s
(4.3m)| Baseline
Barrer HMB Native VMM Engine | 0.51 us | 0.013 s | 19,842x
- Operations Handled: 91,799 pages evicted, 25,313 page faults recovered,
168,643 swap slots freed directly in mm/.
- Block Layer Trace: Zero struct bio allocated; zero blk-mq submissions;
zero storage controller interrupts.
2. Real-World OS Workload: Core Systemd Phased Upgrade
Under memory-constrained multi-tasking, an un-phased upgrade of 13 core OS
packages (systemd 259.9, udev, libsystemd0, initramfs-tools, dbus)
was executed:
Metric | Traditional Linux Storage | Barrer HMB Kernel
-------------------------+---------------------------+----------------------
Paging Throughput | ~90 MB/s (Rotational seek)| 2,625.9 MB/s (Bus)
SATA Controller Conflict | High (Swap vs pkg writes) | Zero contention
Thread Sleep State | Heavy D-state / I/O wait | 0% I/O Wait (Active)
Network Socket Buffers | Prone to TCP throttling | Zero packet drops
Systemd Re-exec | High latency on deserialize| Instantaneous
Architectural Implementation
============================
+----------------------------------------------+
| Linux Userland / Applications |
+----------------------+-----------------------+
| Page Fault / Eviction
v
+----------------------------------------------+
| Linux Virtual Memory Manager (mm/) |
| swap_writepage / swap_read |
+----------------------+-----------------------+
|
+-----------------------------+-----------------------------+
| [BARRER HMB HOOK] |
| Does HMB claim this slot? |
v YES
v NO (Fallback)
+---------------------------------+
+---------------------------------+
| Haven Memory Bus (Spec 2.0) | |
Traditional Block Subsystem |
| - O(1) Direct Arithmetic Stride| | -
struct bio allocation |
| - Tier 2 z-Pack Deduplication | | -
blk-mq request queueing |
| - Zero Elevator / Zero Queue | | -
Elevator scheduler overhead |
| - Sub-microsecond return | | -
Mechanical / NVMe I/O delay |
+---------------------------------+
+---------------------------------+
Latency: ~0.51 us
Latency: 10 ms - 4.3 min
Key Files Modified
------------------
1. include/linux/hmb_pagefile.h:
Interface declarations and zero-overhead inline stubs when
CONFIG_HMB_PAGEFILE=n.
2. mm/hmb_pagefile.c:
Core arithmetic stride plane, atomic bitmasks, Tier 2 z-Pack
deduplication
engine, and /proc/hmb_pagefile diagnostic telemetry.
3. mm/page_io.c:
- swap_writepage(): Direct fast-path hook to hmb_pagefile_store(folio).
- swap_read_folio(): Direct fast-path hook to hmb_pagefile_load(folio).
4. mm/swapfile.c:
- swap_free_cluster(): Lock-free slot reclamation via
hmb_pagefile_free().
5. mm/Kconfig & mm/Makefile:
Integrated build configuration (CONFIG_HMB_PAGEFILE).
Code Quality & Standards
========================
- scripts/checkpatch.pl Compliance: Verified on Linux 7.0 source tree:
total: 0 errors, 1 warnings, 484 lines checked (warning is informational
prompt for MAINTAINERS file entry).
- Coding Style: Standard tabs, 80-column line wrapped, SPDX
GPL-2.0 identifiers.
- Concurrency: Standard Linux set_bit, clear_bit, and atomic64 primitives.
Public Repositories & Reproduction
==================================
The complete driver, in-tree kernel patches, and test suites are open-source
under GPL-2.0:
- Repository: https://github.com/barrersoftware/hmb
- Linux 7.0 Patch: kernel/in_tree_patch/hmb_in_tree_linux_7.0.patch
- Android GKI Review:
https://android-review.googlesource.com/c/kernel/common/+/4376433
We welcome feedback and discussions regarding integration into mainline mm/.
Respectfully submitted,
Daniel Elliott
Barrer Software Organization
<ssfdre38@xxxxxxxxx>