Deep Dive into Server Memory Architecture: From DRAM Granules to NUMA Modes

Starting from the physical structure of DRAM granules, this article analyzes core concepts including Channel, Rank, Bank, Burst, and Prefetch layer by layer. Combined with the real CPU architectures of Intel Emerald Rapids (EMR) MCC/XCC and Granite Rapids (GNR) XCC, it explores the working principles, performance differences, and tuning recommendations for UMA, NUMA, SNC2/SNC4, Hemisphere, and Quadrant memory clustering modes.

Read More

kprobe vs kretprobe — Code Deep Dive

The Linux kernel provides several dynamic tracing mechanisms, among which kprobe and kretprobe are the most fundamental and widely used. Both allow injecting callbacks into kernel functions at runtime, but they serve different purposes and trigger at different points in execution.

kprobe: Can insert breakpoints at any probeable kernel address, providing two callback points — pre_handler (before instruction execution) and post_handler (after instruction execution).

kretprobe: Designed specifically for function-level tracing, providing entry_handler (function entry) and handler (function return) callbacks, with a built-in per-instance private data channel.

Read More