This article explains the SO_LINGER socket option's three closure modes, demonstrates why SO_LINGER=0 sends RST instead of FIN, and outlines Linux's preferred solutions for TIME_WAIT accumulation—connection reuse, tcp_tw_reuse, tcp_fin_timeout, and port range expansion—over abrupt connection termination.
This article walks through the complete engineering process—from Linux kernel tweaks and network stack tuning to Nginx master‑worker design, layered load‑balancing, zero‑copy I/O, rate‑limiting, and OpenResty Lua extensions—demonstrating how to build a production‑grade system that reliably handles one million queries per second.
This guide explains how to configure Nginx and Linux kernel parameters to support up to a million concurrent connections, covering worker processes, connection limits, system file‑descriptor settings, caching strategies, static file handling, and key reverse‑proxy directives with concrete code examples.
This article analyzes Google's BBR congestion control algorithm, comparing its model-driven approach with CUBIC's loss-based design, explains why BBR hasn't become Linux's default despite advantages in high-BDP and wireless scenarios, details BBRv2/v3 improvements addressing fairness and robustness, and examines the Linux kernel's congestion control framework implementation.
Linux Kernel 6.19 introduces Live Update Orchestrator, PCIe link encryption, LoongArch 32‑bit support, a new DRM Color Pipeline API, Ext4 and Btrfs filesystem improvements, and expanded Rust infrastructure, while the article provides step‑by‑step Ubuntu upgrade instructions and explains the kernel’s merge‑window and release‑candidate workflow.
This article explains how to adopt Linux kernel's struct‑array initialization and device‑tree matching techniques to implement a flexible C‑based UART driver that supports multiple compression configurations, complete with code examples and compilation guidance.
A veteran kernel engineer argues that while AI academia floods the field with "AI-for-kernel" papers, few reach mainline due to community conservatism and engineering gaps; instead, kernel developers should focus on "kernel-for-AI" optimizations—scheduling, memory, I/O for AI workloads—where real impact lies.
The article argues that despite the AI boom, Linux kernel engineers still face fundamental performance and memory challenges, and that most AI‑related kernel papers have little impact on mainline development because of cultural and procedural gaps between academia and the kernel community.
This article compiles a comprehensive set of technical interview questions and concise answers covering Linux kernel‑user communication, interrupt handling, memory allocation strategies, macros, endianness, cache hierarchy, process context, DMA, virtual memory translation, debugging tools, and driver initialization, aimed at candidates preparing for embedded Linux driver roles.
Ubuntu 26.04 LTS introduces GNOME 50 with default VRR and a separate rendering thread, brings Rust‑based Coreutils and the first default Rust kernel drivers, upgrades to Python 3.14, GCC 16, LLVM 22 and Docker/K8s, and promises twelve years of security maintenance.
Ubuntu 26.04 LTS, codenamed Resolute Raccoon, is slated for a 23 April 2026 release and will bring GNOME 50 with VRR, Linux Kernel 6.18+ (or 6.20), Rust‑rewritten core utilities, a 12‑year support window, and an early‑access daily build for testing.
The article explains CVE‑2025‑68260, the first Rust‑based vulnerability in the Linux kernel, detailing the race condition in the rust_binder driver, why the bug proves Rust’s safety promises, and how its limited impact contrasts with countless C‑related kernel CVEs.
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.
This article explains the purpose of dev_info, dev_dbg, and dev_err in Linux kernel logging, shows how to view their output, and provides step‑by‑step methods—including dynamic debug, kernel configuration, and module parameters—to enable or disable dev_dbg at runtime without recompiling or rebooting.
This article summarizes Netty 4.2's io_uring configuration options across system properties, IoUringIoHandlerConfig, and ChannelOptions, covering kernel requirements, ring sizing, multishot accept/recv, buffer rings, zero-copy writes, and common socket options for high-performance Linux networking.
The author details how to flash an Armbian image, modify the build scripts, compile the Linux 6.19‑rc1 kernel, and install the resulting .deb packages on a Radxa Rock5B+ board, achieving a smooth mainline boot and 4K video playback.
The article explains how batching cache‑sync operations for dma_map_sg, dma_unmap_sg and dma_sync_sg on arm64 can cut their execution time by up to three‑fold, details the kernel patches introduced, and presents benchmark results on Dimensity 9500 and RK3588 platforms.
Microsoft’s WSL 2.7.0 release upgrades the subsystem to a Linux 6.6.114 LTS kernel, adds numerous security patches, restores key environment variables, and introduces Ubuntu Pro for WSL with long‑term enterprise security updates, all detailed in the official release notes.
At recent Linux kernel maintainer meetings, developers announced that Rust has shed its experimental label and become a permanent, core component of the Linux kernel, highlighting its growing maturity, production use, and the remaining challenges for full integration.
The article presents a detailed overview of the Linux kernel’s astonishing growth to over 37 million lines of code, breaks down directory sizes, explains core subsystems, lists top contributors, and offers practical advice on how to approach learning this massive open‑source project.
This comprehensive guide walks Linux kernel developers through KGDB fundamentals, installation, configuration, and practical debugging techniques—including serial and network setups, kernel patching, boot‑parameter tuning, and common pitfalls—enabling precise source‑level debugging of multi‑core kernel issues.
This article explains how Netty 4.2 leverages Linux io_uring's zero-copy send (IORING_OP_SEND_ZC) to avoid user-kernel data copies, detailing the two completion queue events (CQEs) — I/O completion and buffer release notification — and Netty's handling logic with code examples.
The 20th China Linux Kernel Developers Conference, hosted by vivo, presented eleven technical talks covering AI‑driven kernel challenges, memory‑compression techniques, heterogeneous compression, async file‑cache management, uncached I/O, direct I/O for compressed files, parallel writeback, host‑initiated defragmentation, zoned storage, energy‑efficient I/O, and eBPF‑based CPU idle policies, each with concrete performance results and implementation details.
The 20th China Linux Kernel (CLK) Conference in Shenzhen gathered nearly 500 developers on‑site and over 170,000 online viewers, showcasing five technical sub‑forums, keynote insights on AI‑driven kernel challenges, RISC‑V adoption, and a 31‑fold rise in Chinese kernel contributors, underscoring the rapid evolution of China’s kernel ecosystem.
The article explains the Linux kernel's warning against new typedefs, citing Linus Torvalds' preference for struct usage, coding style guidelines, and practical reasons such as readability and maintainability in a large codebase.
This article explains how the Linux kernel's kmalloc function provides fast, contiguous physical memory allocation using the slab allocator, covering its API, internal mechanisms, allocation flags, memory management strategies, common pitfalls, and practical kernel module examples for developers.
This guide explains why the default Linux kernel limits hinder Nginx performance, lists eight crucial sysctl parameters to increase port ranges, file descriptors, and connection queues, and shows how to verify and safely apply the changes for high‑concurrency workloads.
This article examines recent efforts to make Linux kernel memory management programmable with eBPF, covering BPF‑MM patches for mTHP order, cache‑ext’s customizable LRU, FetchBPF prefetch policies, and BPF OOM hooks, and discusses their design, implementation details, and performance impacts.
This guide walks through step‑by‑step Nginx high‑concurrency tuning—covering Linux kernel network parameters, system limits, worker process settings, connection reuse, HTTP/2, gzip compression, benchmarking, and monitoring—enabling single‑node throughput of over one million packets per second with sub‑50 ms P99 latency.
This article explores the evolution of Linux I/O models—from blocking and non‑blocking to epoll—and introduces io_uring as a high‑performance asynchronous framework that reduces system‑call overhead, eliminates data copies, and unifies network and disk I/O for modern high‑concurrency applications.
Memory barriers act like traffic signals for concurrent threads, enforcing a strict order of memory operations to prevent data races, cache incoherence, and compiler reordering, thereby ensuring program correctness and stability across multi‑core and multi‑processor systems.
The article analyzes how the newly introduced swap table replaces the kernel's xarray for swapcache, offering O(1) lookups, better locality, reduced lock contention, and lower memory overhead, with benchmark results showing notable performance gains in real workloads.
The article analyzes the new swap table implementation that replaces the kernel's xarray‑based swapcache with a per‑cluster array, offering O(1) lookups, reduced lock contention, lower memory overhead, and measurable performance gains demonstrated by real‑world benchmarks.
This article explains all TCP connection states, the three‑way handshake and four‑way termination, details half‑open and full‑open queues, shows how to monitor and troubleshoot listen and accept queue overflows, and lists key Linux kernel parameters for optimizing TCP performance.
This article dissects Netty 4.2's integration of Linux io_uring's bufferRing mechanism, explaining its ring-buffer data structure, single-tail-pointer design, Netty's IoUringBufferRing encapsulation, per-connection buffer group binding, SQE submission with IOSQE_BUFFER_SELECT, CQE flag handling, and the incremental/bundle optimizations that reduce buffer waste and CQE overhead.
Linux kernel 6.17’s first release candidate arrived without any bcachefs changes, as Linus Torvalds expressed anger over delayed RISC‑V patches, while developers debate the future of the advanced COW file system, its removal from upcoming kernels, and the broader implications for Linux’s storage stack.
This guide outlines a step‑by‑step roadmap for aspiring kernel developers, covering essential knowledge foundations, hands‑on teaching‑OS projects, deep‑dive strategies for reading the real Linux kernel source, and curated book recommendations to build solid OS internals expertise.
The article explains how replacing the global mmap_lock read lock with per‑VMA locks for madvise MADV_DONTNEED/FREE removes severe lock contention and priority inversion in Linux memory management, and it details the patches, reasoning, and performance evidence supporting the change.
This article explains the role of the page‑table cache (TLB) in the Linux kernel, describing how it speeds up virtual‑to‑physical address translation, the underlying mapping process, cache organization, replacement policies, and its impact on system performance across desktops, servers, and high‑performance applications.
This article explains the hardware basis of NUMA, how Linux reads ACPI SRAT/SLIT tables to discover CPU‑memory topology, the kernel functions that initialize NUMA structures, and how tools like numactl can be used to optimize application performance on multi‑node servers.
The article examines the heated dispute between Linus Torvalds and Bcachefs maintainer Kent Overstreet over a controversial patch submitted during the 6.16‑rc phase, explaining how kernel merge‑window rules, community reactions, and the future of Bcachefs intertwine.
Discover how deep understanding of Linux kernel architecture, process, memory, filesystem, and network subsystems combined with practical Bash scripts can boost system performance by up to 300%, offering step‑by‑step tuning, monitoring, and debugging techniques essential for senior operations engineers.
The article examines the escalating dispute between Linus Torvalds and Bcachefs maintainer Kent Overstreet over a controversial patch, explains why the Linux kernel may abandon Bcachefs after version 6.16, and outlines community reactions and possible future paths for the file system.
The article chronicles Xavier Xia’s iterative patches to the Linux kernel’s contpte_ptep_get() function, showing how early‑exit logic and subsequent refinements ultimately yielded consistent performance gains across diverse dirty/young page table scenarios, backed by benchmark data that convinced skeptical reviewers.
This guide explains how to create a custom Android boot animation using frame sequences, package it correctly, compress it, replace it via ADB, and also covers modifying or hiding the Linux kernel and bootloader logos, including required tools, file formats, and safety precautions.
This article provides an in‑depth analysis of BPF maps—explaining their design principles, core features, various map types with code examples, and the macro expansion process that turns high‑level BCC helpers into native kernel map definitions for cloud‑native observability.
This article explains the problem of internal and external memory fragmentation in Linux systems, introduces eBPF as a powerful tracing tool, and provides step‑by‑step guidance for building, loading, and running eBPF programs to analyze and mitigate fragmentation on both Linux and Android platforms.
This article explains the concept, architecture, key data structures, registration process, implementation details, limitations, configuration steps, and practical examples of using Kprobes to dynamically instrument and debug Linux kernel functions without recompiling or rebooting the system.
This article explains the hardware basis of NUMA, how Linux reads ACPI SRAT and SLIT tables to discover CPU‑memory topology, the kernel functions that initialize NUMA structures, and how the memblock allocator incorporates this information to enable performance‑optimizing tools like numactl.
The article introduces KASAN, a Kernel Address Sanitizer for Linux that uses shadow memory and redzones to accurately detect out‑of‑bounds accesses, use‑after‑free, and double‑free errors, explains its underlying mechanisms, shows how to enable it in the kernel, and provides extensive example code and log analysis.
This article explains eBPF from a developer's perspective, covering the eBPF virtual machine, instruction encoding, bytecode generation with LLVM/Clang, loading via the bpf() syscall, verifier rules, execution flow, JIT compilation, and how Android builds and packages eBPF programs.
A recent Intel‑driven Linux kernel test revealed that a single commit fixing THP‑PMD alignment boosted 1‑byte malloc throughput by 3889% (≈40×), highlighting how tiny memory‑management tweaks can dramatically improve performance despite being demonstrated on synthetic benchmarks.
The article explains how the Linux kernel decides the CPU for a newly woken task, detailing the roles of wake_affine and select_idle_sibling, the influence of cache topology, run‑queue load, and various idle‑checking heuristics, with concrete examples and code snippets.
The 3rd eBPF Developer Conference held on April 19, 2025 at Xi'an University of Posts and Telecommunications featured 36 expert talks on eBPF advancements, network and security innovations, observability, performance optimization, a vibrant project marketplace, student projects, and provides video and PPT resources for the community.
This article walks through the registration of the KVM misc device in the Linux 5.9 kernel for arm64, explains how /dev/kvm is created via misc_register, and demonstrates a user‑space program that opens the device and uses an ioctl to retrieve the KVM API version, with detailed code analysis.
This article explains how the x86‑64 paging mechanism maps virtual addresses to physical memory, detailing the required protection‑mode conditions, page‑table structures, control‑register settings, various paging modes (32‑bit, PAE, 4‑level, 5‑level), and provides concrete kernel code examples and address‑translation demonstrations.
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.
The article explains how memory pools reduce allocation overhead and fragmentation by pre‑allocating large memory blocks, describes their implementation in C++ and the Linux kernel, compares various pool designs, and shows practical scenarios where pools improve performance and stability.
This article explains the concept of memory pools, how they reduce allocation overhead and fragmentation compared to traditional malloc/new, describes various pool designs and Linux kernel APIs, provides multiple C and C++ implementations, and discusses performance benefits and typical application scenarios such as servers, real‑time and embedded systems.
This article explains why Linux dominates server workloads, introduces the built‑in ftrace tracing framework, details its diverse tracers, lightweight static instrumentation and stable design, shows how to configure and use it via debugfs, and demonstrates performance tuning and fault diagnosis with real examples while comparing it to systemTap and LTTng.
This article walks through the complete boot sequence—from the UEFI firmware that runs after power‑on, through the boot manager and BootOrder variables, to the systemd‑boot loader loading initrd and the Linux kernel, explaining each component and its role in detail.
Recent testing of an Intel‑powered Linux kernel patch revealed that a single code change dramatically improved memory allocation throughput by nearly 40‑fold, highlighting the massive impact of fine‑tuned memory management optimizations and the importance of addressing THP and PMD alignment issues.
A single commit to the Linux kernel aligned transparent huge pages with PMD boundaries, delivering a near‑40‑fold increase in 1‑byte malloc throughput and illustrating how precise memory‑management tweaks can dramatically improve system performance.
This article walks through the step‑by‑step initialization of KVM's hyp mode memory mapping on ARM64, covering EL2 register setup, identity mapping, page‑table allocation, stack preparation, and code section mappings required for a functional hypervisor environment.
Ubuntu 24.04 LTS (Noble Numbat) introduces a Flutter‑based installer, GNOME 46 desktop, Linux 6.8 kernel, PipeWire as the default audio server, Thunderbird 115 as the default mail client, enhanced AppArmor and frame‑pointer security, broader hardware support and an optional 12‑year Ubuntu Pro support window, marking a substantial upgrade over 22.04.
This article explains the evolution of file system architecture from kernel‑level VFS to userspace via FUSE, reviews the historical role of NFS, details JuiceFS's implementation on top of FUSE, and presents benchmark results that demonstrate its high throughput and practical limitations.
The 2024 Rust State Survey reveals improved developer productivity but persistent challenges like slow compilation, debugging difficulty, and limited industry adoption, highlighting concerns over complexity, low usage in tech, and the uncertain future of Rust in the Linux kernel.
2024 SurveyLinux kernelProgramming Language Adoption
This article explains how the Linux kernel detects physical memory during boot by leveraging the E820 mechanism, where firmware reports memory ranges via interrupt 15H, enabling the kernel to map usable memory addresses for subsequent allocation.
The author, with over two decades of development experience, argues that many learners treat Linux kernel code as a rote exercise instead of mapping real‑world scheduling problems to code, and outlines essential questions about task_struct management, scheduling policies, CPU placement, fairness, and universal scheduler design.
The article provides a detailed technical analysis of Linux 5.9 on arm64 KVM, explaining how Host and Guest OSes are distinguished at EL1, how HCR_EL2 flags control mode switching, and how the EL2 exception vector and related registers are initialized during Linux boot to enable KVM virtualization.
This article explains the purpose, design, and internal data structures of ext4 extents, describes how the B+‑tree indexes extents for efficient mapping of logical to physical blocks, and compares ext4’s extent mechanism with older file‑system addressing methods and other modern file systems.
This article explains the complete boot sequence from powering on a PC, through UEFI firmware and the boot manager, to loading systemd‑boot as the boot loader and finally transferring control to the Linux kernel’s first executable code, detailing each component and its role.
This article introduces Linux's io_uring framework, explains its design goals and advantages over traditional I/O models, details its core components and system calls, provides step‑by‑step implementation examples for file and network operations, and discusses performance comparisons and practical application scenarios.
This article explains the principles of GPU kernel virtualization by analyzing the cgpu project's source code, detailing kernel interception of device operations, the driver’s file_operations, module initialization and cleanup, procfs interfaces, scheduling logic, and compilation steps on Ubuntu 22.04.
This guide walks through creating a 32‑bit Linux‑kernel memory allocator using a free‑list, implementing morecore and add_to_free_list functions, and then adding a basic mark‑and‑sweep garbage collector that scans heap, BSS, data segments and the stack to reclaim unused blocks.
A Microsoft‑submitted performance patch for the x86_64 architecture was merged into Linux kernel 6.13 without maintainer acknowledgment, breaking control‑flow integrity and nearly causing a system‑wide failure, prompting swift emergency fixes from Intel and AMD engineers and sparking a broader discussion on open‑source code‑review practices.
This article details a week‑long investigation of intermittent Nacos service deregistration in a Spring Cloud Alibaba microservice environment, describing the background architecture, multiple hypothesis tests, diagnostic commands, kernel version mismatch, and the final fix by upgrading the Linux kernel.
This article explains the full boot sequence from power‑on through UEFI firmware, the boot manager, and the systemd-boot loader, detailing how PE32+ UEFI applications, BootOrder variables, and EFI_BOOT_SERVICES functions load and start the Linux kernel.
This article explains how Rust's memory safety, concurrency guarantees, explicit error handling, and modern tooling make it a safer and more maintainable alternative to C for developing Linux kernel modules.
The article explains the purpose, implementation, and usage of early I/O memory mapping (early_ioremap) in the Linux kernel, detailing its initialization, fixmap foundations, code flow, and differences from regular ioremap, with examples and kernel source snippets.
This guide explains how to optimize Tomcat by adjusting maxThreads, acceptCount, maxConnections, and connectionTimeout, while also tuning Linux kernel parameters, TCP settings, and JVM options to achieve balanced CPU and I/O performance for high‑concurrency web services.
The article examines a long‑standing hidden bug in the Linux kernel’s page‑cache Xarray that caused occasional data loss with Large Folio support, details its discovery and fix by the TencentOS team, and shows how consolidating multiple tree walks into a single walk in Linux 6.10 reduced latency and improved performance by about ten percent.
The article outlines six distinct kernel‑level bugs affecting the eBPF tailcall feature across multiple Linux versions, explains the underlying causes and the commits that fixed them, and introduces a detection tool to verify whether a running kernel is affected.
This article explains the fundamentals of NUMA architecture, how Linux detects and represents NUMA nodes, the memory zone hierarchy, allocation policies, and practical techniques such as using numactl and taskset to bind processes for optimal performance on multi‑socket servers.
The author, with over two decades of development experience, argues that learning the Linux kernel requires understanding real-world scheduling problems rather than merely copying kernel code, and outlines key questions about task_struct management, priority, preemption, CPU placement, fairness, and universal scheduler design.
CPU SchedulingLinux kerneloperating system fundamentals
This article explains the kfunc mechanism behind Linux's sched_ext, covering instruction modification, verification, address fixup, and detailing common kfunc functions such as scx_bpf_dispatch, scx_bpf_consume, and queue management APIs.
Processes must pause execution to wait for resources, and the Linux kernel provides sleep and wake mechanisms—implemented via functions like schedule_timeout_interruptible and try_to_wake_up—to efficiently relinquish CPU time, avoid busy‑waiting, and resume when resources become ready.
This guide explains why and how to implement MDIO over GPIO on a Linux system, covering MDIO fundamentals, Clause22/Clause45 frame structures, YT8521 PHY pinout, required kernel drivers, device‑tree configuration, log verification, and command‑line usage.
Processes represent execution contexts that include code and resources; to avoid wasteful busy‑waiting, operating systems let them sleep and later wake them, using mechanisms like schedule_timeout_interruptible, timers, and try_to_wake_up, which the Linux kernel implements through specific state changes and scheduling logic.
This article provides a comprehensive overview of Linux memory barriers, explaining why they are needed for correct ordering of memory operations on modern multi‑core CPUs, describing the different barrier types (read, write, full), their implementation in the kernel and Java, and illustrating their use in synchronization primitives and lock‑free data structures with code examples.
This guide explains key GNU C extensions—including zero‑length and variable‑length arrays, case ranges, statement expressions, typeof, variadic macros, designated initializers, built‑in functions, and attribute syntax—showing how they differ from standard ANSI C and how to use them safely in Linux kernel development.
Linus Torvalds merged a small patch into the Linux kernel that streamlines the 64‑bit copy_from_user() routine by skipping the costly barrier_nospec() and applying masked user‑address handling, delivering a 2.6% speedup on Intel’s “will it scale” per‑thread‑ops benchmark and slated for inclusion in the upcoming Linux 6.12 stable release.
The 19th China Linux Kernel Developers Conference in Wuhan on October 26, 2024 attracted over 80,000 online viewers and nearly 400 developers, showcased five technical sub‑forums—from memory and storage I/O to virtualization and scheduling—featured AI‑focused kernel talks, announced a new open‑source innovation institute, and made all materials publicly available on GitHub.
At the 19th China Linux Kernel Developer Conference, vivo unveiled nine open‑source innovations—including DMA‑BUF DIO for AI model loading, ZHP memory compression, EROFS and f2fs filesystem enhancements, and I/O optimizations—contributing significant performance gains and demonstrating its commitment to Linux kernel advancement worldwide.
This article dissects the Linux kernel's TCP connection workflow, explaining how the three‑way handshake prevents stale SYN packets, and walks through the socket(), bind(), listen() and connect() system calls with detailed code analysis of the underlying kernel functions and data structures.
This article walks through removing the per‑CPU map used to pass the TCP‑option offset in an XDP program, shows the required code changes, explains the verifier errors that arise, and presents the final fix using an int offset with a bitwise mask.
This article provides a comprehensive overview of Linux's io_uring, explaining its design goals, shared‑memory mechanism, submission and completion queues, core system calls, performance advantages over traditional I/O models, typical use cases, and includes a complete example of a network server built with io_uring.
This article explains why packets are dropped in Linux, introduces the kfree_skb_reason API added in kernel 5.17, and shows step‑by‑step how to use bpftrace to capture drop reasons, five‑tuple details, and stack traces for precise network debugging.
At RustConf, Miguel Ojeda highlighted the challenges and optimism surrounding the Rust for Linux project, explaining how unstable Rust features, developer hesitancy, and industry interest shape the effort to make Rust a safe, second language for kernel development.