Skip to content

Add comprehensive Linux kernel learning guide (10 chapters)#1

Draft
Copilot wants to merge 10 commits into
mainfrom
copilot/learn-linux-classic-version
Draft

Add comprehensive Linux kernel learning guide (10 chapters)#1
Copilot wants to merge 10 commits into
mainfrom
copilot/learn-linux-classic-version

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown

同步 HTML → Markdown,补充 SVG,全面深化内容

  • 创建新 SVG 图表 6 个:
    • ebpf-arch.svg — eBPF 完整架构(Verifier/JIT/Maps/挂载点)
    • irq-flow.svg — 中断处理完整路径(硬件→APIC→IDT→上下半部)
    • boot-flow.svg — 启动全流程(BIOS/UEFI→GRUB→head.S→start_kernel→systemd)
    • sync-map.svg — 同步机制全景(从atomic到futex的选择决策树)
    • driver-model.svg — 设备模型层次(kobject/sysfs/probe生命周期)
    • debug-tools.svg — 调试工具全景(静态检查/动态追踪/性能分析/崩溃分析)
  • 更新现有 README.md (00-09)
    • 所有文件添加对应 SVG 图表引用
    • 每章补充 100-300 行专家级内容(NUMA/OOM/THP/vDSO/seccomp/RCU深入/等)
  • 创建新章节 README.md (10-15),每章 1000-1500+ 行
    • 10-CFS: vruntime公式/nice权重表/红黑树对比/5调度类/EAS/cgroup
    • 11-容器: 8种NS/veth搭建/cgroups v2/OverlayFS/seccomp/mini-docker
    • 12-eBPF: Verifier/JIT/Map类型/XDP/CO-RE/bpftrace/BCC/生产案例
    • 13-中断: IDT/APIC/softirq/tasklet/workqueue/线程化IRQ/IPI/hrtimer
    • 14-启动: BIOS/UEFI/GRUB/bzImage/head_64.S/start_kernel序列/initramfs/systemd
    • 15-调试: ftrace/perf/FlameGraph/KASAN/KFENCE/lockdep/kdump+crash/livepatch
  • 更新根 README.md 目录指向 Markdown 文件 + 添加 SVG 图表列
  • 修复 code review 反馈 (KASAN互斥说明/危险命令警告/prefers-reduced-motion/99Hz注释/mkdir前置步骤)
Original prompt

我想学习linux相关的知识,但是目前linux系统太庞大了,我想找出一个经典版本,包含现代linux系统的核心框架的版本源码。需要你帮我整理学习路线之类的东西,主要是为了学习。还有机制的讲解,源码对照之类的。我主要是为了学习,需要你给我提供很详细的资料,还有各种图片示意之类的

Copilot AI changed the title [WIP] Add learning resources for classic Linux version Add comprehensive Linux kernel learning guide (10 chapters) May 20, 2026
Copilot finished work on behalf of YYCB May 20, 2026 09:19
Copilot AI requested a review from YYCB May 20, 2026 09:19
Copilot AI and others added 5 commits May 20, 2026 12:02
- 10-CFS调度器: vruntime公式、nice权重表、红黑树分析、pick_next_task_fair()、
  调度类优先级、EDF/SCHED_DEADLINE、负载均衡域、EAS、cgroup v2带宽控制、
  调试工具与常见性能问题 (1154行)

- 11-容器与命名空间: 8种namespace对比表、clone/unshare/setns代码示例、
  PID双重视图、veth pair网络搭建、User namespace UID映射、pivot_root vs chroot、
  cgroups v1/v2对比、OverlayFS copy-up/whiteout、seccomp BPF、capabilities、
  runc流程、mini-docker C实现 (1056行)

- 12-eBPF与可观测性: cBPF→eBPF历史、Verifier安全模型、JIT寄存器映射、
  Map类型表、挂载点全景、完整Hello World程序、XDP防DDoS示例、TCP追踪、
  CO-RE原理、bpftrace实战命令集、BCC工具集、Cilium/Falco/Pixie/Katran、
  限制与调试工作流 (1338行)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
- 13-中断与异常: IDT/APIC/softirq/tasklet/workqueue/threaded IRQ/IPI/
  中断亲和性/hrtimer/延迟测量 (1050 行)
- 14-启动流程深入: BIOS/UEFI/MBR/GRUB2/bzImage解压/head_64.S/
  start_kernel序列/initramfs/systemd/KASLR/kdump (1139 行)
- 15-内核调试与性能: ftrace/perf/FlameGraph/KASAN/KFENCE/KMSAN/
  UBSAN/lockdep/KCOV/kdump+crash/GDB+QEMU/bpftrace/livepatch/
  性能优化清单 (1542 行)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
- ch14 KASLR: expand entropy sources to include RDRAND/RDSEED and
  cite arch/x86/boot/compressed/kaslr.c for randomization location
- ch15 KASAN: clarify CONFIG_KASAN_GENERIC and CONFIG_KASAN_HW_TAGS
  are mutually exclusive (software vs hardware implementation)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
- 00-学习路线: add arch-overview.svg ref, 推荐书单与资源 section
  (ULK/LKD/LDD3/Kerrisk books, online resources, video courses),
  20-question expert-level checklist covering all subsystems

- 01-经典版本选择: add arch-overview.svg ref, detailed version comparison
  table (0.11→6.1 LTS) with release year, LoC, and milestone features;
  subsystem evolution timeline (scheduler/mm/IO)

- 02-环境搭建: add KGDB remote debugging (two-machine setup, GDB session
  examples), clangd IDE navigation (compile_commands.json, VS Code/nvim
  config), kernel config tips (defconfig vs tinyconfig, ccache, Kconfig
  debug options), crash tool vmcore analysis workflow

- 03-进程管理: add vm-layout.svg ref, thread_info fields (flags/
  preempt_count/addr_limit), ASCII kernel stack layout diagram,
  do_fork→copy_process→wake_up_new_task 5.x path, __switch_to_asm
  x86_64 assembly, zombie/orphan process lifecycle with wait4() path

- 04-内存管理: add page-table.svg ref, NUMA node/zone/page structure,
  memory zones table (DMA/DMA32/NORMAL/MOVABLE) with ranges, kswapd
  watermark/LRU mechanics, OOM killer scoring algorithm, THP
  (/sys/kernel/mm/transparent_hugepage) and KSM internals

- 05-文件系统: add vfs-objects.svg ref, page cache writeback (dirty_ratio
  params, pdflush), fsync/fdatasync/msync comparison table, io_uring
  SQE/CQE ring buffer with code example, ext4 journal modes
  (journal/ordered/writeback) tradeoff table

- 06-系统调用: add syscall-flow.svg ref, vDSO mechanism (gettimeofday/
  clock_gettime/getcpu acceleration, ~10ns vs ~200ns), seccomp BPF
  filter example with SECCOMP_RET_* codes, step-by-step guide to add
  new syscall in Linux 5.x, 32-bit vs 64-bit syscall number table

- 07-设备驱动: add driver-model.svg ref, MSI/MSI-X vs INTx comparison
  with pci_enable_msix_exact() example, DMA API (dma_alloc_coherent vs
  dma_map_single vs dma_map_sg) with IOMMU explanation, complete devm_*
  function reference list, full platform driver example with DTS binding
  (LED driver with clocks/GPIO/IRQ/devm cleanup)

- 08-网络子系统: add tcp-handshake.svg ref, detailed sk_buff ASCII diagram
  (head/data/tail/end with headroom/tailroom), complete RX path call
  chain (NIC→NAPI→netif_receive_skb→ip_rcv→tcp_v4_rcv), netfilter 5
  hooks table with iptables chain mapping, conntrack states and
  /proc/net/nf_conntrack, XDP return codes with Mpps performance
  numbers and eBPF drop-UDP example, TCP tuning sysctl reference

- 09-同步机制: add sync-map.svg ref, TSO vs weak ordering (ARM) with
  smp_mb/smp_wmb/smp_rmb/smp_load_acquire API, RCU grace period deep
  dive (synchronize_rcu vs call_rcu, list_replace_rcu pattern), RCU
  lock-free list/hashtable examples, futex internals (hash bucket,
  FUTEX_WAIT/WAKE path, pi_futex priority inheritance), per-CPU
  variables (DEFINE_PER_CPU, get_cpu_var, this_cpu_* family)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
…9 with SVG refs and deeper content

Agent-Logs-Url: https://github.com/YYCB/how_to_learn_linux/sessions/265a578b-5d26-408c-934d-e4176267d506

Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
Copilot finished work on behalf of YYCB May 20, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants