Add comprehensive Linux kernel learning guide (10 chapters)#1
Draft
Copilot wants to merge 10 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/YYCB/how_to_learn_linux/sessions/6cf56f5d-3b40-45cb-b817-802ce8f88c67 Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add learning resources for classic Linux version
Add comprehensive Linux kernel learning guide (10 chapters)
May 20, 2026
Agent-Logs-Url: https://github.com/YYCB/how_to_learn_linux/sessions/1cb19491-1fd8-4418-9a44-f972d8161633 Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
…content Agent-Logs-Url: https://github.com/YYCB/how_to_learn_linux/sessions/1cb19491-1fd8-4418-9a44-f972d8161633 Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
…site Agent-Logs-Url: https://github.com/YYCB/how_to_learn_linux/sessions/1cb19491-1fd8-4418-9a44-f972d8161633 Co-authored-by: YYCB <23326150+YYCB@users.noreply.github.com>
- 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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
同步 HTML → Markdown,补充 SVG,全面深化内容
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— 调试工具全景(静态检查/动态追踪/性能分析/崩溃分析)Original prompt