Tagged articles
kernel programming
11 articles · Page 1 of 1
The article explains the Linux kernel Seqlock mechanism—a lightweight lock‑free synchronization primitive that uses a sequence number and a spinlock to allow concurrent reads and writes, compares it with spinlocks and rwlocks, and shows real kernel and user‑space examples.
ConcurrencyLinux kernelSeqlock
0 likes · 24 min read

This article explains why TPU programming differs from GPU, describes the explicit HBM‑VMEM‑register data movement required on TPU, introduces the Pallas grid‑BlockSpec‑Ref model, and walks through four progressively more complex kernels—including element‑wise add, tiled dot product, fused RMSNorm with scratch memory, and a production‑grade FlashAttention implementation—showing how each kernel maps to the TPU memory hierarchy and leverages Pallas features such as input_output_aliases and PrefetchScalarGridSpec.
FlashAttentionJAXPallas
0 likes · 20 min read

This article explains the design, implementation, and practical use of the Linux kernel's intrusive linked‑list data structure, covering its core concepts, list_head definition, common macros, insertion, deletion, traversal, optimization techniques, concurrency control with RCU and memory barriers, and real‑world examples in device drivers and process scheduling.
ConcurrencyLinux kerneldata structures
0 likes · 37 min read

This article outlines the standard BCC workflow for creating eBPF tools, then dissects the opensnoop source code, covering requirement analysis, kernel‑space program writing, BPF map configuration, user‑space Python integration, argument handling, testing, optimization, and deployment steps to monitor open system calls.
BCCLinux tracingPython
0 likes · 13 min read

This article dissects Linux’s inotify mechanism, detailing the kernel data structures, system‑call flow, and functions that generate and deliver file‑system event notifications, complete with code walkthroughs and diagrams. It explains how read/write operations trigger event creation, how events are queued in inotify_device, and how user‑space processes retrieve them via read and poll interfaces.
File MonitoringLinux kernelevent handling
0 likes · 14 min read

The article explains the motivation, design, and API of the new multi‑producer single‑consumer eBPF Ring Buffer, compares it with perf buffers and other alternatives, and provides complete BPF and userspace code examples demonstrating reservation, commit, and polling of events while preserving ordering across CPUs.
BPF_MAP_TYPE_RINGBUFeBPFkernel programming
0 likes · 8 min read

This tutorial walks through installing the required toolchain, writing a minimal eBPF program, compiling it with eunomia‑bpf or cilium/ebpf, loading it from user space, attaching it to a tracepoint, and observing kernel‑level output, while explaining each step and the underlying concepts.
CO-REcilium/ebpfeBPF
0 likes · 23 min read

The article examines why eBPF has become a core building block for cloud‑native network functions, outlines its performance, security and flexibility advantages, discusses technical challenges such as memory constraints and missing SIMD support, and presents the eNetSTL library that mitigates these issues with concrete design details and benchmark results.
eBPFeNetSTLkernel programming
0 likes · 12 min read

This article explains what zero‑length arrays are, how they are defined in C, why they appear frequently in the Linux kernel as flexible array members, and provides a complete kernel‑style implementation showing creation, expansion, and cleanup of a dynamically sized integer array.
C++Dynamic memory allocationFlexible array member
0 likes · 10 min read

This article explains the evolution, principles, use cases, workflow, and limitations of eBPF, showing how programmable kernel extensions enable advanced observability, networking, and security capabilities across Linux systems and cloud‑native environments.
LinuxeBPFkernel programming
0 likes · 9 min read

The author discovers an unusual macro definition in kernel source that omits the usual parameter list, explains the standard macro usage, shows the original and altered code snippets, and highlights why the macro without arguments works, offering a practical insight for C and embedded developers.
C languageC macrosembedded C
0 likes · 2 min read
