# mlohajner/rralloc architecture

> Architecture diagram of the GitHub repository mlohajner/rralloc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mlohajner/rralloc
- Repository: https://github.com/mlohajner/rralloc

## Overview

RRALLOC is an experimental EXT4 allocation-policy patch, documented here with test evidence rather than kernel source excerpts. Its principal workflow is enabling the `rralloc` mount option, then allocating through a separate policy path that rotates per-CPU LBA zones and uses stream allocation with per-inode locality tracking. The repository also records proof-of-concept, synthetic, concurrency, case-study, and real-world comparisons. Runtime links below reflect README statements; implementation details cannot be verified from source excerpts.

Main entry points: [`2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch) (V3 patch), [`2) the patch/0001-ext4-rralloc-former-rotalloc-improved-round-robin-V2.patch`](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-former-rotalloc-improved-round-robin-V2.patch) (V2 patch), [`3) proof of concept/README.md`](https://github.com/mlohajner/rralloc/blob/main/3)%20proof%20of%20concept/README.md) (Proof of concept), [`4) sythetic tests/README.md`](https://github.com/mlohajner/rralloc/blob/main/4)%20sythetic%20tests/README.md) (Synthetic allocator tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_policy["Allocation policy"]
  node_mount["rralloc mount option"]
  node_separate["Separate allocation path"]
  node_rotation["Per-CPU zone rotation"]
  node_stream["Stream allocation"]
  node_cursor["Inode atomic cursor"]
end

subgraph group_patches["Patch artifacts"]
  node_v3["V3 patch"]
  node_v2["V2 patch"]
end

subgraph group_evidence["Evaluation evidence"]
  node_poc["Proof of concept<br/>[README.md]"]
  node_synthetic["Synthetic allocator tests<br/>[README.md]"]
  node_concurrency["Concurrency tests<br/>[README.md]"]
  node_case["Additional case study<br/>[README.md]"]
  node_realworld["Real-world comparison<br/>[README.md]"]
end

node_operator(("Filesystem operator"))
node_ext4["EXT4 filesystem"]

node_operator -->|"enables"| node_mount
node_mount -->|"configures"| node_ext4
node_ext4 -->|"allocates through"| node_separate
node_separate -->|"rotates groups"| node_rotation
node_separate -->|"enforces"| node_stream
node_stream -->|"tracks locality"| node_cursor
node_v3 -->|"adds"| node_mount
node_v2 -->|"precedes"| node_v3
node_v3 -.->|"evaluated by"| node_poc
node_v3 -.->|"evaluated by"| node_synthetic
node_v3 -.->|"evaluated by"| node_concurrency
node_v3 -->|"informed by"| node_case
node_v3 -->|"compared in"| node_realworld

click node_mount "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_separate "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_rotation "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_stream "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_cursor "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_v3 "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch"
click node_v2 "https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-former-rotalloc-improved-round-robin-V2.patch"
click node_poc "https://github.com/mlohajner/rralloc/blob/main/3)%20proof%20of%20concept/README.md"
click node_synthetic "https://github.com/mlohajner/rralloc/blob/main/4)%20sythetic%20tests/README.md"
click node_concurrency "https://github.com/mlohajner/rralloc/blob/main/5)%20high%20concurency%20tests/README.md"
click node_case "https://github.com/mlohajner/rralloc/blob/main/6)%20additional%20case%20study/README.md"
click node_realworld "https://github.com/mlohajner/rralloc/blob/main/7)%20real%20world%20test/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mount,node_separate,node_rotation,node_stream,node_cursor toneBlue
class node_v3,node_v2 toneAmber
class node_poc,node_synthetic,node_concurrency,node_case,node_realworld toneMint
class node_operator,node_ext4 toneIndigo
```

## Components

### Allocation policy

- [rralloc mount option](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`
- [Separate allocation path](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`
- [Per-CPU zone rotation](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`
- [Stream allocation](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`
- [Inode atomic cursor](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`

### Patch artifacts

- [V3 patch](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch): `2) the patch/0001-ext4-rralloc-add-round-robin-allocation-policy-V3.patch`
- [V2 patch](https://github.com/mlohajner/rralloc/blob/main/2)%20the%20patch/0001-ext4-rralloc-former-rotalloc-improved-round-robin-V2.patch): `2) the patch/0001-ext4-rralloc-former-rotalloc-improved-round-robin-V2.patch`

### Evaluation evidence

- [Proof of concept](https://github.com/mlohajner/rralloc/blob/main/3)%20proof%20of%20concept/README.md): `3) proof of concept/README.md`
- [Synthetic allocator tests](https://github.com/mlohajner/rralloc/blob/main/4)%20sythetic%20tests/README.md): `4) sythetic tests/README.md`
- [Concurrency tests](https://github.com/mlohajner/rralloc/blob/main/5)%20high%20concurency%20tests/README.md): `5) high concurency tests/README.md`
- [Additional case study](https://github.com/mlohajner/rralloc/blob/main/6)%20additional%20case%20study/README.md): `6) additional case study/README.md`
- [Real-world comparison](https://github.com/mlohajner/rralloc/blob/main/7)%20real%20world%20test/README.md): `7) real world test/README.md`

### Other components

- **Filesystem operator**
- **EXT4 filesystem**

## Connections

- Filesystem operator → rralloc mount option: enables (evidence: `README.md`)
- rralloc mount option → EXT4 filesystem: configures (evidence: `README.md`)
- EXT4 filesystem → Separate allocation path: allocates through (evidence: `README.md`)
- Separate allocation path → Per-CPU zone rotation: rotates groups (evidence: `README.md`)
- Separate allocation path → Stream allocation: enforces (evidence: `README.md`)
- Stream allocation → Inode atomic cursor: tracks locality (evidence: `README.md`)
- V3 patch → rralloc mount option: adds (evidence: `README.md`)
- V2 patch → V3 patch: precedes (evidence: `README.md`)
- V3 patch → Proof of concept: evaluated by
- V3 patch → Synthetic allocator tests: evaluated by
- V3 patch → Concurrency tests: evaluated by
- V3 patch → Additional case study: informed by (evidence: `README.md`)
- V3 patch → Real-world comparison: compared in (evidence: `README.md`)
