-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting-started.html
More file actions
422 lines (397 loc) · 18.6 KB
/
Copy pathgetting-started.html
File metadata and controls
422 lines (397 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
---
layout: default
title: "Getting Started"
description: "Get up and running with Multikernel Linux. Learn how to build, configure, and launch your first multikernel instance."
permalink: /getting-started.html
i18n: true
---
<style>
/* Overview step cards */
.gs-overview-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.gs-overview-card {
text-align: center;
padding: var(--space-5);
background: var(--gray-50);
border-radius: var(--radius-md);
border: 1px solid var(--gray-200);
border-top: 2px solid var(--accent-500);
}
.gs-overview-card .step-num {
display: inline-flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
border-radius: 50%;
background: var(--gray-900);
color: var(--accent-400);
font-family: var(--font-mono);
font-weight: 700;
font-size: var(--text-xs);
margin-bottom: var(--space-3);
}
.gs-overview-card h3 {
font-size: var(--text-sm);
font-weight: 700;
color: var(--gray-900);
margin-bottom: var(--space-1);
}
.gs-overview-card p {
font-size: var(--text-xs);
color: var(--gray-500);
line-height: var(--leading-relaxed);
margin: 0;
}
/* Step badge */
.step-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--accent-500);
color: var(--gray-900);
font-family: var(--font-mono);
font-weight: 700;
font-size: var(--text-xs);
flex-shrink: 0;
}
/* Code blocks */
.content-card pre {
background: var(--gray-900);
border: none;
border-radius: var(--radius-md);
padding: var(--space-5) var(--space-6);
overflow-x: auto;
font-size: var(--text-sm);
line-height: 1.7;
color: var(--gray-300);
margin: var(--space-4) 0;
}
.content-card pre code {
font-family: var(--font-mono);
color: var(--gray-300);
}
.content-card p code,
.content-card li code {
background: var(--gray-50);
padding: 2px 6px;
border-radius: var(--radius-sm);
border: 1px solid var(--gray-200);
color: var(--accent-800);
font-family: var(--font-mono);
font-size: 0.88em;
}
/* Diagram */
.gs-diagram {
background: var(--gray-900);
border: 1px solid rgba(255,255,255,0.06);
border-radius: var(--radius-md);
padding: var(--space-5);
margin: var(--space-5) 0;
overflow-x: auto;
}
.gs-diagram pre {
background: none;
border: none;
padding: 0;
margin: 0;
text-align: center;
font-size: var(--text-sm);
line-height: 1.5;
color: var(--gray-400);
}
/* Comparison table */
.gs-comparison {
overflow-x: auto;
margin: var(--space-5) 0;
border-radius: var(--radius-md);
border: 1px solid var(--gray-200);
}
.gs-comparison table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-sm);
}
.gs-comparison thead th {
background: var(--gray-900);
color: rgba(255,255,255,0.8);
font-family: var(--font-mono);
font-weight: 600;
padding: var(--space-3) var(--space-4);
text-align: left;
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.gs-comparison thead th:last-child {
background: var(--accent-700);
color: white;
}
.gs-comparison tbody td {
padding: var(--space-3) var(--space-4);
border-bottom: 1px solid var(--gray-200);
color: var(--gray-600);
}
.gs-comparison tbody td:first-child {
font-weight: 600;
color: var(--gray-900);
background: var(--gray-50);
}
.gs-comparison tbody td:last-child {
color: var(--gray-900);
font-weight: 600;
background: rgba(226, 162, 59, 0.05);
}
.gs-comparison tbody tr:last-child td {
border-bottom: none;
}
.gs-comparison tbody tr:hover {
background: var(--gray-25);
}
/* CTA card */
.gs-cta {
background: var(--gray-50);
text-align: center;
border-top: 2px solid var(--accent-500);
border-left: 3px solid transparent;
}
.gs-cta .button-group {
display: flex;
gap: var(--space-3);
justify-content: center;
flex-wrap: wrap;
margin-top: var(--space-5);
}
.gs-cta .btn-primary {
background: var(--accent-500);
color: var(--gray-900);
border-color: var(--accent-500);
}
.gs-cta .btn-primary:hover {
background: var(--accent-400);
color: var(--gray-900);
box-shadow: 0 0 16px rgba(226, 162, 59, 0.2);
}
.gs-cta .btn-secondary {
background: white;
color: var(--gray-700);
border-color: var(--gray-200);
}
.gs-cta .btn-secondary:hover {
background: var(--gray-50);
color: var(--gray-900);
border-color: var(--gray-300);
}
@media (max-width: 768px) {
.gs-overview-grid {
grid-template-columns: 1fr;
}
}
</style>
<main>
<section class="hero">
<div class="hero-container">
<h1>Getting Started with Multikernel</h1>
<p class="subtitle">Partition a single machine into independent Linux kernel instances, each with dedicated CPUs, memory, and devices. No hypervisor, no virtualization overhead, direct hardware access.</p>
<div class="button-group">
<a href="https://github.com/multikernel/linux" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
<i data-lucide="github"></i>
View on GitHub
</a>
<a href="/technology.html" class="btn btn-secondary">
<i data-lucide="cpu"></i>
Learn the Architecture
</a>
</div>
</div>
</section>
<section class="content-page">
<div class="content-container">
<!-- Overview -->
<div class="content-card">
<div class="gs-overview-grid">
<div class="gs-overview-card">
<div class="step-num">1</div>
<h3>Build the Kernel</h3>
<p>Clone and compile the multikernel-enabled Linux kernel</p>
</div>
<div class="gs-overview-card">
<div class="step-num">2</div>
<h3>Load Lazy CMA</h3>
<p>Allocate memory for spawned kernels at runtime, without boot parameters</p>
</div>
<div class="gs-overview-card">
<div class="step-num">3</div>
<h3>Launch Instances</h3>
<p>Use kerf to create, configure, and run kernel instances</p>
</div>
</div>
</div>
<!-- What is Multikernel -->
<div class="content-card">
<h2><i data-lucide="layers"></i>What is Multikernel Linux?</h2>
<p>Multikernel Linux runs multiple independent kernel instances simultaneously on the same physical machine. Each application receives its own kernel with dedicated CPUs and memory, free from interrupt interference, while device drivers and I/O processing run in a separate kernel on separate cores. Because no hypervisor is involved, every instance runs at native performance.</p>
<div class="gs-diagram"><pre>
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web Server │ │ Database │ │ ML Training │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ Linux Kernel │ │ Linux Kernel │ │ Linux Kernel │
│ (Web-tuned) │ │ (I/O-optimized)│ │ (GPU-optimized)│
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ CPU + NIC │ │ CPU + NVMe │ │ CPU + GPU │
└─────────────────┘ └─────────────────┘ └─────────────────┘
</pre></div>
<p>Each workload runs inside its own kernel with a configuration tailored to that workload, fully isolated from other instances. A driver crash or kernel exploit in one instance cannot affect the others, and resources can be rebalanced between kernels at runtime through standard Linux hotplug interfaces.</p>
<div class="gs-comparison">
<table>
<thead>
<tr>
<th></th>
<th>Containers</th>
<th>VMs</th>
<th>Multikernel</th>
</tr>
</thead>
<tbody>
<tr>
<td>Isolation</td>
<td>Shared kernel</td>
<td>Full (hypervisor)</td>
<td>Separate kernels</td>
</tr>
<tr>
<td>Performance</td>
<td>Near-native</td>
<td>5-20% overhead</td>
<td>Native</td>
</tr>
<tr>
<td>Kernel customization</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Dynamic resources</td>
<td>Yes</td>
<td>Limited</td>
<td>Yes (hotplug)</td>
</tr>
<tr>
<td>Zero-downtime updates</td>
<td>App only</td>
<td>With orchestration</td>
<td>Kernel + app</td>
</tr>
<tr>
<td>Attack surface</td>
<td>Full kernel</td>
<td>Reduced</td>
<td>Minimal per instance</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Step 1: Build -->
<div class="content-card">
<h2><i data-lucide="hammer"></i><span class="step-badge">1</span> Build the Multikernel Kernel</h2>
<p>Clone the Linux kernel source with multikernel support and build it with <code>CONFIG_MULTIKERNEL</code> and <code>CONFIG_MKTTY</code> enabled.</p>
<pre><code>git clone https://github.com/multikernel/linux.git
cd linux
cp /boot/config-$(uname -r) .config # Start from the running kernel's config
make menuconfig # Enable CONFIG_MULTIKERNEL=y and CONFIG_MKTTY=y
make -j$(nproc)
sudo make modules_install
sudo make install</code></pre>
<p>The result is a standard Linux kernel with multikernel extensions. It boots and operates as the regular host kernel, and can additionally spawn and manage new kernel instances.</p>
</div>
<!-- Step 2: Configure -->
<div class="content-card">
<h2><i data-lucide="settings"></i><span class="step-badge">2</span> Load the Lazy CMA Module</h2>
<p>Spawned kernel instances require contiguous physical memory. <a href="https://github.com/multikernel/lazy_cma" target="_blank" rel="noopener noreferrer">Lazy CMA</a>, an out-of-tree kernel module, allocates this memory at runtime, so no boot parameters, reboots, or upfront capacity planning are required.</p>
<pre><code>git clone https://github.com/multikernel/lazy_cma.git
cd lazy_cma
make
sudo insmod lazy_cma.ko</code></pre>
<p>Loading the module creates <code>/dev/lazy_cma</code>. Kerf allocates memory pools through this interface automatically, and no further configuration is needed. Pools can be resized at runtime, are NUMA-aware, and are registered in <code>/proc/iomem</code>.</p>
</div>
<!-- Step 3: Install kerf -->
<div class="content-card">
<h2><i data-lucide="terminal"></i><span class="step-badge">3</span> Install the Kerf Management Tool</h2>
<p>Kerf is the command-line tool for creating, configuring, and managing multikernel instances. It handles resource allocation, kernel loading, and the full instance lifecycle.</p>
<pre><code>git clone https://github.com/multikernel/kerf.git
cd kerf
pip install -e .</code></pre>
</div>
<!-- Step 4: Launch -->
<div class="content-card">
<h2><i data-lucide="rocket"></i><span class="step-badge">4</span> Launch Your First Instance</h2>
<p>Initialize a resource pool, create an instance, and launch it:</p>
<pre><code># Initialize: CPUs 4-31 and an 8 GB memory pool (allocated via lazy_cma)
kerf init --cpus=4-31 --memory=8GB
# Create an instance with 4 CPUs and 2 GB of memory
kerf create web-server --cpus=4-7 --memory=2GB
# Load a kernel that boots straight into a Docker image (via DAXFS)
kerf load web-server --kernel=/boot/vmlinuz --image=nginx:latest
# Boot the instance
kerf exec web-server</code></pre>
<p>The spawned kernel boots on the assigned CPUs and memory, running directly on the hardware. It has its own scheduler, its own network stack, and its own view of the devices assigned to it.</p>
<p>With <code>--image</code>, kerf builds a <a href="https://github.com/multikernel/daxfs" target="_blank" rel="noopener noreferrer">DAXFS</a> image from the Docker image, and the spawned kernel mounts it directly as its root filesystem. DAXFS is an out-of-tree kernel module that kerf does not load automatically. Load it before running <code>kerf load</code>, but only when booting from a Docker image or sharing a host directory:</p>
<pre><code>git clone https://github.com/multikernel/daxfs.git
cd daxfs
make
sudo insmod daxfs.ko</code></pre>
<p>The spawned kernel also requires DAXFS support: either build it into the kernel, or pass <code>--initrd</code> with an initramfs that loads <code>daxfs.ko</code>. A conventional boot using <code>--initrd</code> alone does not require DAXFS.</p>
</div>
<!-- Key Components -->
<div class="content-card">
<h2><i data-lucide="box"></i>Key Components</h2>
<p>The multikernel stack is composed of several open-source projects:</p>
<ul>
<li><strong><a href="https://github.com/multikernel/linux" target="_blank" rel="noopener noreferrer">Multikernel Linux</a></strong> - Kernel patches that enable spawning and managing additional kernel instances through the kexec subsystem</li>
<li><strong><a href="https://github.com/multikernel/kerf" target="_blank" rel="noopener noreferrer">Kerf</a></strong> - Orchestration tool that manages kernel instances, resources, and lifecycle; it drives Lazy CMA and DAXFS directly, so no separate tooling is required</li>
<li><strong><a href="https://github.com/multikernel/daxfs" target="_blank" rel="noopener noreferrer">DAXFS</a></strong> - Out-of-tree kernel module that provides a shared filesystem across kernel instances via direct memory access, enabling a shared container root filesystem and zero-copy data sharing</li>
<li><strong><a href="https://github.com/multikernel/lazy_cma" target="_blank" rel="noopener noreferrer">Lazy CMA</a></strong> - Out-of-tree kernel module that allocates contiguous memory at runtime; memory pools for spawned kernels are resizable, NUMA-aware, and require no boot-time reservation</li>
</ul>
</div>
<!-- How it works -->
<div class="content-card">
<h2><i data-lucide="cog"></i>How It Works Under the Hood</h2>
<ul>
<li><strong>Kernel spawning via kexec</strong> - New kernels are launched through Linux's existing kexec mechanism, extended to run alongside the primary kernel rather than replacing it</li>
<li><strong>Resource partitioning</strong> - CPUs, memory, and devices are divided between kernels through standard hotplug interfaces</li>
<li><strong>Hardware queue sharing</strong> - Modern NICs and SSDs expose multiple hardware queues; each kernel receives exclusive access to specific queues, providing isolation at the hardware level</li>
<li><strong>Inter-kernel networking</strong> - Each spawned kernel receives a standard Linux network device backed by descriptor rings in shared memory; frames stay in place and only descriptors cross kernel boundaries, so applications use unmodified sockets</li>
<li><strong>Docker integration</strong> - Spawned kernels can boot directly into Docker images, using DAXFS to share the container root filesystem without an OS init layer</li>
</ul>
</div>
<!-- CTA -->
<div class="content-card gs-cta">
<h2><i data-lucide="check-circle"></i>Ready to Try It?</h2>
<p>All multikernel components are open source. Explore the code, file issues, or contact us to arrange a technical evaluation.</p>
<div class="button-group">
<a href="https://github.com/multikernel" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
<i data-lucide="github"></i>
GitHub
</a>
<a href="https://calendar.app.google/nc1upkqQoUeoukdD9" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">
<i data-lucide="calendar"></i>
Schedule a Demo
</a>
<a href="https://www.youtube.com/@multikernel-tech" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">
<i data-lucide="play-circle"></i>
Watch Demos
</a>
</div>
</div>
</div>
</section>
</main>