Tag

Linux kernel

0 views collected around this technical thread.

OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jun 14, 2024 · Fundamentals

In-depth Analysis of F2FS Filesystem Superblock, SIT, NAT, and SSA Structures

The article provides a detailed code-level walkthrough of F2FS’s superblock, Segment Information Table, Node Address Table, Summary Area, and Main Area structures, explaining each field, entry layout, and their roles in managing segments, inodes, and data within the filesystem.

F2FSLinux kernelNAT
0 likes · 9 min read
In-depth Analysis of F2FS Filesystem Superblock, SIT, NAT, and SSA Structures
OPPO Kernel Craftsman
OPPO Kernel Craftsman
May 31, 2024 · Operations

An Overview of the Extensible Scheduler Class (sched_ext) in the Linux Kernel

The Linux kernel’s extensible scheduler class sched_ext introduces a new ext_sched_class with eBPF‑driven callbacks and dispatch queues, allowing developers to plug custom scheduling policies via struct sched_ext_ops without recompiling the kernel, while integrating into the existing hierarchy and exposing trade‑offs such as central‑CPU load and community adoption challenges.

CPU schedulingLinux kerneleBPF
0 likes · 16 min read
An Overview of the Extensible Scheduler Class (sched_ext) in the Linux Kernel
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 26, 2024 · Fundamentals

Introduction to V4L2 and Its Role in Video Codec Development

V4L2 is the Linux kernel framework that unifies video device access, abstracts complex multi‑IC hardware into sub‑devices, and provides core, platform, and sensor driver layers, while supporting capture, output, and M2M codec operations with sophisticated buffer management—including mmap, userptr, and DMA‑Buf for zero‑copy processing on Android.

DMABUFLinux kernelM2M
0 likes · 13 min read
Introduction to V4L2 and Its Role in Video Codec Development
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 19, 2024 · Fundamentals

Large Folios in the Linux Kernel: Benefits, Implementations, and Future Directions

Large folios in the Linux kernel combine multiple pages to reduce TLB misses, page faults, and reclamation cost while enabling more efficient compression; they are supported by filesystems like XFS and bcachefs, and recent patches add multi‑size THP, swap‑in/out handling, TAO allocation, NUMA balancing, and debug tools, with OPPO’s production deployment showing performance gains and motivating broader adoption and fragmentation mitigation.

Linux kernelMemory ManagementNUMA
0 likes · 17 min read
Large Folios in the Linux Kernel: Benefits, Implementations, and Future Directions
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 1, 2024 · Mobile Development

GPU Frequency Scaling on Qualcomm Adreno Using the Linux devfreq Framework

Using Qualcomm’s Adreno GPU as a case study, the article explains how the Linux devfreq framework enables GPU frequency scaling by creating a kgsl devfreq device and an msm‑adreno‑tz governor, detailing their initialization, event handling, target‑frequency computation, and the kernel callbacks that apply the new rates.

AdrenoGPULinux kernel
0 likes · 5 min read
GPU Frequency Scaling on Qualcomm Adreno Using the Linux devfreq Framework
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Feb 2, 2024 · Fundamentals

Linux Shared Memory (shmem) Deep Dive: Architecture, Implementation, and Practice

Linux’s shmem subsystem provides hybrid anonymous/file‑backed pages that enable diverse shared‑memory scenarios—parent‑child communication, IPC, tmpfs, Android ashmem, and memfd—by using APIs such as shmem_file_setup, handling page faults through cache and swap mechanisms, and employing a specialized reclamation process to manage memory efficiently.

Linux kernelMemory ManagementVirtual Memory
0 likes · 10 min read
Linux Shared Memory (shmem) Deep Dive: Architecture, Implementation, and Practice
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jan 5, 2024 · Fundamentals

Read‑Write Semaphore (rw_semaphore) and Per‑CPU rwsem in the Linux Kernel (ARM64)

The article explains Linux kernel read‑write semaphores, detailing the classic rw_semaphore’s optimistic‑spinning and hand‑off mechanisms, then introduces the per‑CPU rwsem for ARM64, which replaces global counters with per‑CPU data and an RCU fast‑path to cut cache‑coherency traffic at the cost of losing optimistic spinning.

ARM64Linux kerneloptimistic spinning
0 likes · 12 min read
Read‑Write Semaphore (rw_semaphore) and Per‑CPU rwsem in the Linux Kernel (ARM64)
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 29, 2023 · Fundamentals

Overview of Linux Kernel Synchronization Mechanisms: Atomic Operations, Spinlocks, Semaphores, and Mutexes

The article systematically explains Linux kernel synchronization primitives—from basic atomic operations through queued spinlocks, counting semaphores, and sleeping mutexes to read‑write semaphores and per‑CPU variants—detailing their underlying data structures, memory‑barrier semantics, and the fast‑path and slow‑path acquisition and release APIs.

Linux kernelMutexSemaphore
0 likes · 13 min read
Overview of Linux Kernel Synchronization Mechanisms: Atomic Operations, Spinlocks, Semaphores, and Mutexes
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 10, 2023 · Operations

Memory Compaction in the Linux Kernel: Mechanisms, Strategies, and Implementation Details

Linux’s memory compaction mitigates external fragmentation by moving movable pages, employing four strategies—direct, passive (kcompactd), proactive, and active—each invoking the compact_zone core with configurable compact_control parameters, migrate‑page and free‑page scanners, and distinct trigger and exit conditions.

Linux kernelMemory CompactionPage Migration
0 likes · 45 min read
Memory Compaction in the Linux Kernel: Mechanisms, Strategies, and Implementation Details
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 10, 2023 · Fundamentals

Insights from the 18th China Linux Kernel Developers Conference (CLK 2023) on Enhancing China’s Open‑Source Influence

At the 18th China Linux Kernel Developers Conference in Shenzhen, nearly 500 engineers and senior experts from Tencent, Huawei, Loongson, Intel and Ant Group showcased major open‑source contributions and discussed strategies—such as corporate‑academic alliances, documentation translation and mentorship—to boost China’s code quality, trust and global influence in the Linux ecosystem.

ChinaCommunityLinux kernel
0 likes · 18 min read
Insights from the 18th China Linux Kernel Developers Conference (CLK 2023) on Enhancing China’s Open‑Source Influence
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 25, 2023 · Operations

In‑Depth Walkthrough of libbpf vfsstat BPF Program Opening and Initialization

The article walks through libbpf’s step‑by‑step process for opening the vfsstat.bpf.o ELF object, validating options, parsing ELF headers, collecting sections, initializing maps and programs, and preparing the eBPF program for later kernel loading and attachment.

BPF program loadingELF parsingLinux kernel
0 likes · 16 min read
In‑Depth Walkthrough of libbpf vfsstat BPF Program Opening and Initialization
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jun 9, 2023 · Information Security

Linux Disk Encryption Technology: FDE, FBE and eCryptfs Implementation Analysis

This article reviews Linux disk‑encryption technologies, explaining data‑at‑rest security concepts, comparing full‑disk encryption (hardware and dm‑crypt/LUKS) with filesystem‑based encryption (stacked eCryptfs and native fscrypt), and providing an in‑depth analysis of eCryptfs architecture, key management, and implementation details.

FBEFDELinux kernel
0 likes · 20 min read
Linux Disk Encryption Technology: FDE, FBE and eCryptfs Implementation Analysis
OPPO Kernel Craftsman
OPPO Kernel Craftsman
May 26, 2023 · Fundamentals

Understanding Linux rwsem Read‑Write Semaphore in Kernel 5.15.81

Linux introduced the read‑write semaphore (rwsem) as a sleep lock that lets multiple readers hold the lock concurrently, improving read‑heavy workload performance, and the article details its internal state representation, acquisition paths for reads and writes, optimistic spinning, handoff mechanisms, and trade‑offs, noting that mobile kernels may need further tuning.

ConcurrencyLinux kernelSynchronization
0 likes · 22 min read
Understanding Linux rwsem Read‑Write Semaphore in Kernel 5.15.81
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 17, 2023 · Operations

Understanding Synchronization Mechanisms and RCU in the Linux Kernel

Linux kernel synchronization requires protecting shared mutable state from concurrent access using primitives such as spinlocks, mutexes, read‑write locks, or lock‑less techniques like RCU, which copies data and waits for a grace period, each offering distinct performance, latency, and complexity trade‑offs.

ConcurrencyLinux kernelMutex
0 likes · 26 min read
Understanding Synchronization Mechanisms and RCU in the Linux Kernel
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jan 6, 2023 · Fundamentals

CFS Group Scheduling: Purpose, Configuration, and Kernel Implementation Details

The article explains why Linux’s Completely Fair Scheduler introduced group scheduling, how Android configures task groups via cpu.shares and Process.java, and details the kernel structures (task_group, sched_entity, cfs_rq) and algorithms for weight calculation, load measurement, propagation, and hierarchical load balancing.

CFS schedulingLinux kernelcgroup
0 likes · 28 min read
CFS Group Scheduling: Purpose, Configuration, and Kernel Implementation Details
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 25, 2022 · Fundamentals

An Overview of Linux Direct Rendering Manager (DRM): History, Architecture, and Simple Example

Linux’s Direct Rendering Manager (DRM) replaces the legacy framebuffer by providing a kernel subsystem that unifies GPU and display control through libdrm, KMS, and GEM, tracing its evolution from 1999 DRI origins to atomic APIs, and illustrating usage via a step‑by‑step modeset example.

DRMDirect Rendering ManagerGEM
0 likes · 11 min read
An Overview of Linux Direct Rendering Manager (DRM): History, Architecture, and Simple Example
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Nov 18, 2022 · Information Security

Evolution of Linux Kernel Security Technologies from 2010 to 2022

From 2010 to 2022 the Linux kernel moved from reactive, out‑of‑tree hardening to a proactive KSPP‑driven era, integrating probabilistic and deterministic mitigations, hardware‑backed defenses, and compiler‑level checks, while Android’s adoption and emerging Rust‑based components accelerated mainstream security hardening.

AndroidGrsecurity/PaXHIDS
0 likes · 18 min read
Evolution of Linux Kernel Security Technologies from 2010 to 2022
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Oct 21, 2022 · Information Security

DirtyPipe (CVE‑2022‑0847) Vulnerability Analysis and Exploitation on Android/Linux

DirtyPipe (CVE‑2022‑0847) is a high‑severity Linux kernel flaw that lets attackers arbitrarily overwrite any readable file via an uninitialized pipe‑buffer flag, enabling privilege escalation on Android and other systems by patching shared libraries, bypassing SELinux, loading malicious modules, and ultimately gaining root, highlighting urgent need for patches and integrity protections.

Android securityCVE-2022-0847DirtyPipe
0 likes · 17 min read
DirtyPipe (CVE‑2022‑0847) Vulnerability Analysis and Exploitation on Android/Linux
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 29, 2022 · Fundamentals

Understanding RTG (Related Thread Group) in the Linux Kernel: Core Selection, Frequency Aggregation, and Busy Hysteresis

The article explains Linux’s Related Thread Group (RTG) mechanism—its struct definition, default Android grouping, core‑selection logic that boosts whole groups to big‑core clusters, load‑aggregation for DCVS frequency decisions, and the newer busy‑hysteresis feature that delays low‑power entry to improve performance and power efficiency.

CPU schedulingDCVSLinux kernel
0 likes · 15 min read
Understanding RTG (Related Thread Group) in the Linux Kernel: Core Selection, Frequency Aggregation, and Busy Hysteresis
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 22, 2022 · Fundamentals

Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs

The Linux kernel’s mutex is a sleeping lock that serializes access by sleeping threads, enforces strict ownership rules, uses a state flag with a wait list and per‑CPU optimistic spin queue, offers APIs like mutex_init, lock, unlock and trylock, and employs handoff and MCS‑style spinning to improve performance, with OPPO’s team optimizing it to reduce UI jank.

ConcurrencyLinux kernelMutex
0 likes · 16 min read
Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs