CXL Poison Injection Merged into Linux 6.18: A Reliability Testing Tool for Persistent Memory Devices

Abstract The Compute Express Link (CXL) subsystem has incorporated several improvements in Linux 6.18, most notably the mainlining of the Poison Injection feature. This functionality allows user space to inject “poison” bits into CXL physical addresses through a newly created kernel-side interface, simulating device errors and validating the hardware/software exception handling paths. Additionally, the patch … Read more

Detailed Examination of Linux Process and Kernel Perspectives

Process Perspective vs Kernel Perspective In a Linux system, we can understand the system’s operating mechanism from two different levels: Process Perspective and Kernel Perspective. These two perspectives have essential differences. Process Perspective: Limited “User Space” View From the process perspective, the system’s operation is filled with uncertainty and limitations: #include <stdio.h> #include <unistd.h> #include … Read more

Detailed Explanation of Variables in Assembly Language

Overview of Variable Definitions In assembly language, variables are allocated storage space in memory through definition directives. NASM provides various definition directives to declare and initialize variables. Variable Definition Directives Data Initialization Definition Directives Directive Purpose Space Allocated DB Define Byte 1 Byte DW Define Word 2 Bytes DD Define Double Word 4 Bytes DQ … Read more

Introduction to C Language | Lesson 6: Detailed Explanation of Pointers – Unveiling the Most Mysterious Aspect of C Language

Introduction to C Language | Lesson 6: Detailed Explanation of Pointers – Unveiling the Most Mysterious Aspect of C Language 1.🎯 Introduction: Why are Pointers So Important? Hello everyone! Today we are going to learn about one of the most important and also the most headache-inducing concepts for beginners in C language — Pointers. Many … Read more

Core Knowledge Points for Autumn Recruitment in Embedded Development

In the job search for embedded development, solid foundational knowledge is the key to success. 1. Program Compilation and Execution Process Four Stages of Generating Executable Programs Preprocessing → Compilation → Assembly → Linking Preprocessing Stage: Handles macro definitions, header file inclusions, conditional compilation, and other pre-compilation directives. Compilation Stage: Converts the preprocessed code into … Read more

Detailed Explanation of Memory Management in Assembly Language and the sys_brk() System Call

Overview of Memory Management In assembly language, memory management is the foundation of program execution. The operating system provides various system calls to manage memory, among which <span>sys_brk()</span> is an important system call used to dynamically adjust the size of the program’s data segment. Detailed Explanation of the sys_brk() System Call Function Description <span>sys_brk()</span> system … Read more

Why Haven’t C/C++ Dominated the Programming World Despite Their Similarities to Other Languages?

If you are learning Python, Java, Go, or Swift for the first time, do you feel like “isn’t this just C in disguise?” Braces, semicolons, for/while loops, int, float… even the complaints are identical. But when a novice eagerly writes their first line of C/C++, the scene changes dramatically: – Compiler: “segmentation fault” – Debugger: … Read more

A Comprehensive Guide to Rust Standard Library Traits: Memory Management and Type Conversion

Introduction When building software systems, defining and using appropriate traits is key to making the code structure highly extensible and flexible. The Rust standard library provides a rich set of traits, and using them correctly not only clarifies the code structure but also aligns better with the conventions of the Rust ecosystem. This article will … Read more

Resolving Excessive Buff/Cache Memory Usage in Linux

Resolving Excessive Buff/Cache Memory Usage in Linux

In Linux, it is common to encounter issues with excessive buff/cache memory usage, especially when using cloud servers. Since many of these are virtual memory, if buff/cache occupies too much, there will be very little free memory available, which affects usability. The typical memory relationship is: Regular machines: total=used+free Virtual machines : total=used+free+buff/cache For example, … Read more

Understanding Linux Memory Management in One Diagram

Understanding Linux Memory Management in One Diagram

The Linux memory management subsystem is a complex and powerful system, whose main goal is to efficiently manage system memory resources, providing stable and reliable memory allocation and reclamation mechanisms for user-space programs and the kernel itself, while also taking into account the characteristics of different hardware platforms. 1. Overall Architecture of the Memory Management … Read more