Skip to content

Instantly share code, notes, and snippets.

@congwang-mk
Created January 22, 2026 03:38
Show Gist options
  • Select an option

  • Save congwang-mk/bb1cb16af887ca6cb24d168f05619c92 to your computer and use it in GitHub Desktop.

Select an option

Save congwang-mk/bb1cb16af887ca6cb24d168f05619c92 to your computer and use it in GitHub Desktop.
Kernel boot log - 50ms
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)
Connecting to console for instance 'web-server' (ID: 1)...
Escape sequence: Ctrl+] followed by . to detach
/ # dmesg
[ 0.000000] platform-quirks: hardware_subarch=5 (MULTIKERNEL=5)
[ 0.000000] Linux version 6.19.0-rc5+ (wangcong@pop-os) (gcc (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #2215 SMP Wed Jan 21 19:25:50 PST 2026
[ 0.000000] Command line: pci=noaer,lastbus=0 lpj=999999 clocksource=tsc tsc=reliable pci=realloc=off random.trust_cpu=on pci=nobar quiet rootfstype=daxfs rootflags=phys=0x48000000,size=9887744 init=/init kerf.entrypoint=/bin/sh console=mktty0
[ 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 0x8767000 (size: 4096)
[ 0.000000] KHO: Multikernel KHO: successfully populated FDT data
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] APIC: Static calls initialized
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 2095.991 MHz processor
[ 0.000853] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000855] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000857] last_pfn = 0x48000 max_arch_pfn = 0x400000000
[ 0.000858] x86/PAT: PAT support disabled because CONFIG_X86_PAT is disabled in the kernel.
[ 0.000860] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.002639] found SMP MP-table at [mem 0x000f5b40-0x000f5b4f]
[ 0.002717] Zone ranges:
[ 0.002720] DMA32 [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.002721] Movable zone start for each node
[ 0.002722] Early memory node ranges
[ 0.002722] node 0: [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.002723] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.004716] APIC: wakeup_secondary_cpu_64() replaced with 0xffffffff812140f0()
[ 0.004719] TSC deadline timer available
[ 0.004724] CPU topo: Max. logical packages: 3
[ 0.004725] CPU topo: Max. logical dies: 3
[ 0.004725] CPU topo: Max. dies per package: 1
[ 0.004728] CPU topo: Max. threads per core: 1
[ 0.004729] CPU topo: Num. cores per package: 1
[ 0.004729] CPU topo: Num. threads per package: 1
[ 0.004730] CPU topo: Allowing 3 present CPUs plus 0 hotplug CPUs
[ 0.004735] [mem 0x48000000-0xffffffff] available for PCI devices
[ 0.004737] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.007027] setup_percpu: NR_CPUS:32 nr_cpumask_bits:3 nr_cpu_ids:3 nr_node_ids:1
[ 0.007362] percpu: Embedded 41 pages/cpu s136536 r0 d31400 u524288
[ 0.007366] pcpu-alloc: s136536 r0 d31400 u524288 alloc=1*2097152
[ 0.007368] pcpu-alloc: [0] 0 1 2 -
[ 0.007376] Kernel command line: pci=noaer,lastbus=0 lpj=999999 clocksource=tsc tsc=reliable pci=realloc=off random.trust_cpu=on pci=nobar quiet rootfstype=daxfs rootflags=phys=0x48000000,size=9887744 init=/init kerf.entrypoint=/bin/sh console=mktty0
[ 0.007464] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
[ 0.007533] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.007570] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.007597] Built 1 zonelists, mobility grouping on. Total pages: 32768
[ 0.007600] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.008055] SLUB: HWalign=64, Order=0-1, MinObjects=0, CPUs=3, Nodes=1
[ 0.008136] rcu: Hierarchical RCU implementation.
[ 0.008137] rcu: RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=3.
[ 0.008139] Tracing variant of Tasks RCU enabled.
[ 0.008140] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.008141] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=3
[ 0.008147] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=3.
[ 0.008160] NR_IRQS: 4352, nr_irqs: 64, preallocated irqs: 16
[ 0.008367] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.008561] APIC: Switch to symmetric I/O mode setup
[ 0.008884] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x1e366572ab9, max_idle_ns: 440795247835 ns
[ 0.008891] Calibrating delay loop (skipped) preset value.. 499.99 BogoMIPS (lpj=999999)
[ 0.008997] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
[ 0.008998] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
[ 0.009004] mitigations: Enabled attack vectors: SMT mitigations: off
[ 0.009005] Speculative Store Bypass: Vulnerable
[ 0.009006] Spectre V2 : Vulnerable
[ 0.009006] RETBleed: Vulnerable
[ 0.009007] Speculative Return Stack Overflow: Vulnerable
[ 0.009008] Spectre V1 : Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
[ 0.009021] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.009022] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.009023] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.009024] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.009025] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'compacted' format.
[ 0.009488] Freeing SMP alternatives memory: 16K
[ 0.009490] pid_max: default: 4096 minimum: 301
[ 0.009515] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.009517] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.009735] smpboot: CPU0: AMD EPYC-Rome Processor (family: 0x17, model: 0x31, stepping: 0x0)
[ 0.009852] Performance Events: Fam17h+ core perfctr, AMD PMU driver.
[ 0.009885] ... version: 0
[ 0.009886] ... bit width: 48
[ 0.009887] ... generic counters: 6
[ 0.009887] ... generic bitmap: 000000000000003f
[ 0.009888] ... fixed-purpose counters: 0
[ 0.009888] ... fixed-purpose bitmap: 0000000000000000
[ 0.009889] ... value mask: 0000ffffffffffff
[ 0.009889] ... max period: 00007fffffffffff
[ 0.009890] ... global_ctrl mask: 000000000000003f
[ 0.009939] signal: max sigframe size: 1360
[ 0.009960] rcu: Hierarchical SRCU implementation.
[ 0.009960] rcu: Max phase no-delay instances is 1000.
[ 0.009995] Restoring multikernel DTB from KHO (phys: 0x8767000)
[ 0.009999] Found preserved multikernel DTB (260 bytes)
[ 0.010001] DTB contains instance ID 1, name 'web-server'
[ 0.010003] Successfully parsed memory size: 134217728 bytes (128 MB)
[ 0.010005] Successfully parsed 3 physical CPUs: 1-3
[ 0.010007] Successfully parsed multikernel device tree with 134217728 bytes memory, 3 CPUs, 0 PCI devices, and 0 platform devices
[ 0.010008] Before restriction: cpu_possible=0-2, cpu_present=0-2
[ 0.010009] After restriction: cpu_possible=0-2, cpu_present=0-2
[ 0.010020] Restored IPI buffer for root instance: phys=0x30c80000, virt=ffffc90000080000, pages=65, size=266240
[ 0.010024] Restored host IPI buffer: phys=0x2a00000, virt=ffffc90000100000, pages=65
[ 0.010025] Registered host instance (ID 0) for spawn→host communication
[ 0.010025] Successfully restored multikernel root instance 1 ('web-server') from KHO (260 bytes)
[ 0.010027] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[ 0.010095] smp: Bringing up secondary CPUs ...
[ 0.010183] smpboot: x86: Booting SMP configuration:
[ 0.010184] .... node #0, CPUs: #1 #2
[ 0.010355] smp: Brought up 1 node, 3 CPUs
[ 0.010355] smpboot: Total of 3 processors activated (1499.99 BogoMIPS)
[ 0.010355] Memory: 114396K/131072K available (5874K kernel code, 788K rwdata, 1132K rodata, 748K init, 1120K bss, 15084K reserved, 0K cma-reserved)
[ 0.010355] devtmpfs: initialized
[ 0.010355] x86/mm: Memory block size: 128MB
[ 0.010355] No multikernel pool found - multikernel support disabled
[ 0.010355] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.010355] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)
[ 0.010355] futex hash table entries: 16 (1024 bytes on 1 NUMA nodes, total 1 KiB, linear).
[ 0.010355] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.010355] PCI: Using configuration type 1 for base access
[ 0.010355] PCI: Using configuration type 1 for extended access
[ 0.012896] Multikernel messaging system initialized
[ 0.012898] Initializing multikernel hotplug subsystem
[ 0.012898] Multikernel hotplug subsystem initialized
[ 0.012901] Initializing multikernel overlay subsystem
[ 0.012902] Multikernel overlay subsystem initialized
[ 0.012902] Multikernel filesystem initialized. Mount with: mount -t multikernel none /sys/fs/multikernel
[ 0.012903] Multikernel support initialized
[ 0.013585] PCI: Probing PCI hardware
[ 0.013585] PCI: root bus 00: using default resources
[ 0.013585] PCI: Probing PCI hardware (bus 00)
[ 0.013585] PCI host bridge to bus 0000:00
[ 0.013585] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.013585] pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffff]
[ 0.013585] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.013585] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 0.013585] PCI: pci_cache_line_size set to 64 bytes
[ 0.013585] clocksource: Switched to clocksource tsc-early
[ 0.013585] NET: Registered PF_INET protocol family
[ 0.013585] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.013585] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.013585] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.013585] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.013585] TCP bind hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.013585] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.013585] UDP hash table entries: 128 (order: 0, 4096 bytes, linear)
[ 0.013585] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes, linear)
[ 0.013585] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.013585] NET: Registered PF_XDP protocol family
[ 0.013585] pci_bus 0000:00: resource 4 [io 0x0000-0xffff]
[ 0.013585] pci_bus 0000:00: resource 5 [mem 0x00000000-0xffffffffff]
[ 0.014116] workingset: timestamp_bits=46 max_order=15 bucket_order=0
[ 0.014284] mktty: initializing spawn (instance 1)
[ 0.014317] printk: legacy console [mktty0] enabled
[ 0.014332] mktty: spawn ready (/dev/mktty0)
[ 0.014642] IPI shorthand broadcast: enabled
[ 0.015682] sched_clock: Marking stable (15073920, 404742)->(17752991, -2274329)
[ 0.015751] multikernel heap: pool not available, skipping
[ 0.015946] check access for rdinit=/init failed: -2, ignoring
[ 0.015964] daxfs: mounted from 0x0000000048000000 size 9887744 (510 inodes)
[ 0.015970] VFS: Mounted root (daxfs filesystem) readonly on device 0:15.
[ 0.015977] devtmpfs: mounted
[ 0.016165] Freeing unused kernel image (initmem) memory: 748K
[ 0.016170] Write protecting the kernel read-only data: 8192k
[ 0.016423] Freeing unused kernel image (text/rodata gap) memory: 268K
[ 0.016659] Freeing unused kernel image (rodata/data gap) memory: 916K
[ 0.016666] Run /init as init process
[ 0.016667] with arguments:
[ 0.016668] /init
[ 0.016668] with environment:
[ 0.016669] HOME=/
[ 0.016669] TERM=linux
[ 0.016775] kerf-init:
[ 0.016776] starting at TSC 126465422308
[ 0.016777]
[ 0.016834] kerf-init:
[ 0.016835] entrypoint: '/bin/sh'
[ 0.016835]
[ 0.016842] kerf-init:
[ 0.016842] console: /dev/mktty0
[ 0.016843]
[ 0.016846] kerf-init:
[ 0.016847] executing: /bin/sh
[ 0.016848]
[ 1.032567] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1e366572ab9, max_idle_ns: 440795247835 ns
[ 1.033372] clocksource: Switched to clocksource tsc
/ #
Disconnected from console.
root@localhost:~# ./tsc_elapsed.py 126359934520 126465422308
TSC start: 126359934520
TSC end: 126465422308
TSC diff: 105487788
CPU freq: 2096.007 MHz
Elapsed: 50.328 ms (50328.0 us)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment