심화 노트
기준 버전은 kernel.org longterm 최신인 Linux 6.18.37 LTS로 고정합니다. 글마다 소스 코드 위치, 실제 코드 발췌, 전체 흐름, 필드 표, 상태 변화 표, 계측 지점를 붙입니다. 함수 하나를 구조체와 흐름 그림에 붙여 읽는 형식으로 정리합니다.
Boot / Init
arm64 Image header
부트로더가 Image를 인식하는 64-byte header.
완료primary_entry
MMU 상태 기록, boot args 저장, idmap 생성.
완료__primary_switch
MMU enable, KASLR, relocation, __primary_switched.
도식+코드start_kernel()
C 코드 진입 후 첫 번째 큰 초기화 흐름.
도식+코드setup_arch()
arch-specific memory, dtb, cpu, paging setup.
도식+코드rest_init()
pid 1 init, kthreadd, idle thread 전환.
도식+코드kernel_init_freeable()
initcall, rootfs, namespace 준비.
도식+코드init process 실행
/init, init=, rdinit=, /sbin/init fallback.
Memory
memblock
buddy allocator 전 early physical memory 관리.
도식+코드paging_init
architecture page table 초기화.
도식+코드mm_core_init
page allocator, slab, vmalloc로 넘어가는 관문.
도식+코드buddy allocator
zone, free_area, order 기반 page 할당.
도식+코드SLUB
kmem_cache, object allocator, per-cpu freelist.
도식+코드vmalloc
불연속 physical page를 연속 VA로 제공.
도식+코드page fault
do_page_fault, handle_mm_fault, fault flags.
도식+코드reclaim
LRU, shrinker, kswapd, direct reclaim.
도식+코드compaction
high-order allocation 실패와 page migration.
Scheduler
sched_init
runqueue, idle task, scheduler class 초기화.
도식+코드CFS
vruntime, rb-tree, fair scheduling.
도식+코드RT scheduler
rt_rq, priority, push/pull balancing.
도식+코드scheduler tick
timer tick, preemption, time slice accounting.
도식+코드load balancing
sched domain, cpu capacity, migration.
도식+코드NOHZ
tickless idle와 scheduler accounting.
IRQ / Time
early_irq_init
irq_desc와 irq domain 초기 틀.
도식+코드init_IRQ
architecture interrupt controller 초기화.
도식+코드GIC
arm64 GIC distributor, redistributor, irqchip.
도식+코드softirq
softirq vector, ksoftirqd, bottom half.
도식+코드hrtimer
high-resolution timer와 clockevent.
도식+코드timekeeping
clocksource, jiffies, sched_clock.
Process / Syscall
File System
vfs_caches_init
dentry, inode, file cache 초기화.
도식+코드path lookup
namei, dcache, mount crossing.
도식+코드open/read/write
file descriptor부터 file_operations까지.
도식+코드page cache
address_space, folio, readahead, writeback.
도식+코드ext4
superblock, inode, journal, extent.
도식+코드f2fs
flash-friendly layout, segment, node, checkpoint.