This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Benchmark Redis: bare metal vs sandlock vs Docker. | |
| redis-server runs in each environment. | |
| redis-benchmark runs on host, connecting to the server. | |
| Tests SET/GET with small payloads (256 bytes) — similar to RioDB's pattern. | |
| """ | |
| import json | |
| import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@localhost:~# kerf exec --console --verbose web-server | |
| Instance name: web-server (ID: 1) | |
| Checking if kernel image is loaded for instance 'web-server'... | |
| Status file: /sys/fs/multikernel/instances/web-server/status | |
| Instance status: 'loaded' | |
| ✓ Kernel image found for instance 'web-server' | |
| Instance ID to boot: 1 | |
| Using reboot syscall with command: 0x4d4b4c49 | |
| Calling reboot syscall at TSC 126359934520 | |
| ✓ Boot command executed successfully (result: 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import sys | |
| import re | |
| def get_tsc_freq_mhz(): | |
| with open('/proc/cpuinfo', 'r') as f: | |
| for line in f: | |
| if line.startswith('cpu MHz'): | |
| match = re.search(r':\s*([\d.]+)', line) | |
| if match: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ 0.000000] Linux version 6.19.0-rc2+ (wangcong@pop-os) (gcc (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #2033 SMP Fri Jan 9 18:33:57 PST 2026 | |
| [ 0.000000] Command line: pci=noaer,lastbus=0 lpj=999999 clocksource=tsc tsc=reliable pci=realloc=off random.trust_cpu=on console=ttyS0 pci=nobar quiet rootfstype=daxfs rootflags=phys=0x48000000,size=9834496 init=/init | |
| [ 0.000000] x86 CPU feature dependency check failure: CPU0 has '18*32+31' enabled but '18*32+26' disabled. Kernel might be fine, but no guarantees. | |
| [ 0.000000] BIOS-provided physical RAM map: | |
| [ 0.000000] MULTIKERNEL: [mem 0x0000000040000000-0x0000000047ffffff] usable | |
| [ 0.000000] random: crng init done | |
| [ 0.000000] setup: detected multikernel KHO data | |
| [ 0.000000] KHO: Multikernel KHO: processing FDT at 0x3bfd000 (size: 4096) | |
| [ 0.000000] KHO: Multikernel KHO: successfully populated FDT data | |
| [ 0.000000] NX (Execute Disable) protection: active |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ 0.000000] Linux version 6.19.0-rc2+ (wangcong@pop-os) (gcc (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1438 SMP PREEMPT_DYNAMIC Mon Dec 29 14:00:12 PST 2025 | |
| [ 0.000000] Command line: pci=noaer,lastbus=0 lpj=999999 clocksource=tsc tsc=reliable pci=realloc=off random.trust_cpu=on loglevel=0 quiet 8250.nr_uarts=0 console=ttyprintk pci=nobar rootfstype=daxfs rootflags=phys=0x48000000,size=9838592 init=/init | |
| [ 0.000000] x86 CPU feature dependency check failure: CPU0 has '18*32+31' enabled but '18*32+26' disabled. Kernel might be fine, but no guarantees. | |
| [ 0.000000] BIOS-provided physical RAM map: | |
| [ 0.000000] BIOS-e820: [mem 0x0000000000001000-0x000000000009fbff] usable | |
| [ 0.000000] BIOS-e820: [mem 0x0000000040000000-0x0000000047ffffff] usable | |
| [ 0.000000] random: crng init done | |
| [ 0.000000] setup: detected multikernel KHO data | |
| [ 0.000000] KHO: Multikernel KHO: processing FDT at 0xb708000 (size: 4096) | |
| [ 0.000000] KHO: Multikernel KHO: successfully po |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Automatically generated file; DO NOT EDIT. | |
| # Linux/x86 6.18.0 Kernel Configuration | |
| # | |
| CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0" | |
| CONFIG_CC_IS_GCC=y | |
| CONFIG_GCC_VERSION=120300 | |
| CONFIG_CLANG_VERSION=0 | |
| CONFIG_AS_IS_GNU=y | |
| CONFIG_AS_VERSION=23800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <sys/socket.h> | |
| #include <linux/vm_sockets.h> | |
| #define VSOCK_TRANSPORT_VM 0 | |
| #define VSOCK_TRANSPORT_MULTIKERNEL 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <sys/socket.h> | |
| #include <linux/vm_sockets.h> | |
| #define VSOCK_TRANSPORT_VM 0 | |
| #define VSOCK_TRANSPORT_MULTIKERNEL 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit b872ae8254207560b5039bf56c7af104088818d3 | |
| Author: Cong Wang <xiyou.wangcong@gmail.com> | |
| Date: Fri May 9 15:10:04 2025 -0700 | |
| pci: introduce pci_whitelist= boot parameter | |
| Use it like this: pci_whitelist=1af4:1041@0000:09:00.0 | |
| Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mount -t multikernel none /sys/fs/multikernel | |
| cat mk_instance1.dtb > /sys/fs/multikernel/device_tree | |
| grep Multikernel -A 2 /proc/iomem | |
| echo "0000:09:00.0" > /sys/bus/pci/devices/0000:09:00.0/driver/unbind | |
| memmap=$( | |
| awk '/mk-instance-1-web-server-region/ { |
NewerOlder