<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Linux GPU Driver Internals: DRM Memory Management and Command Submission on GPUers</title><link>https://en.gpuers.cn/columns/drm/</link><description>Recent content in Linux GPU Driver Internals: DRM Memory Management and Command Submission on GPUers</description><image><title>GPUers</title><url>https://en.gpuers.cn/img/og-cover-en.png</url><link>https://en.gpuers.cn/img/og-cover-en.png</link></image><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 20 Nov 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://en.gpuers.cn/columns/drm/index.xml" rel="self" type="application/rss+xml"/><item><title>1.1 DRM Composition and Positioning</title><link>https://en.gpuers.cn/columns/drm/0001-002/</link><pubDate>Thu, 19 Nov 2026 00:00:00 +0800</pubDate><guid>https://en.gpuers.cn/columns/drm/0001-002/</guid><description>DRM (Direct Rendering Manager) is the Linux kernel subsystem that manages GPUs.</description><content:encoded><![CDATA[<p>DRM (Direct Rendering Manager) is the Linux kernel subsystem that manages GPUs. The first impression of DRM is often that it is the subsystem responsible for display. That impression comes from the word &ldquo;Rendering&rdquo; in its name and from DRM&rsquo;s original purpose: serving direct rendering and display output for the X Server. But this no longer reflects DRM&rsquo;s current responsibilities. This section explains DRM&rsquo;s components, their relationships, and the organization of this chapter.</p>
<h2 id="1-two-main-axes">1. Two Main Axes</h2>
<p>By responsibility, DRM consists of two main axes:</p>
<ul>
<li><strong>Display (KMS)</strong>: Uses objects such as CRTC, plane, encoder, and connector to model display hardware, and handles mode setting, display timing, and hot-plug detection.</li>
<li><strong>Memory and resource management</strong>: GEM, TTM, dma-buf, dma-fence, the GPU scheduler, <code>drm_gpuvm</code>, and SVM for a unified address space handle GPU memory allocation, placement, mapping, sharing, and synchronization, as well as GPU job scheduling and submission.</li>
</ul>
<h2 id="2-relationship-between-the-two-axes">2. Relationship Between the Two Axes</h2>
<p>The relationship is one-way: KMS depends on resource management, but not the reverse. A <code>struct drm_framebuffer</code> used for scanout does not own memory. It references GEM objects through its <code>obj[]</code> field, and the pixel data resides in those objects. Accelerator cards used for AI training and general-purpose computing in data centers are mostly headless, but they still use DRM&rsquo;s full resource-management and scheduling framework. They access the GPU through render nodes such as <code>/dev/dri/renderDN</code> without acquiring display-control privileges.</p>
<p>A more accurate description of DRM is therefore a unified kernel framework for GPU resources, especially GPU memory. KMS is one consumer built on top of resource management. Figure 1.1.1 shows this structure from user space to hardware.</p>

<figure class="align-center">
    <img loading="lazy" src="https://en.gpuers.cn/columns/drm/0001-002/1.1-drm-overview.png" width="2400" height="1900"
         alt="DRM subsystem composition">
    <figcaption><p>Figure 1.1.1. DRM subsystem composition</p></figcaption>
</figure>

<p>In the diagram, user-space programs enter the DRM core through device files under <code>/dev/dri</code>; KMS and resource management are built above the core. The dashed arrow represents a framebuffer&rsquo;s reference to a GEM object. Individual GPU drivers implement the actual operations for their hardware. This book focuses on resource management.</p>
<h2 id="3-chapter-organization">3. Chapter Organization</h2>
<p>The remaining sections of this chapter are listed in Table 1.1.1.</p>
<p class="table-caption">Table 1.1.1. Organization of Chapter 1</p>

<table>
	<thead>
			<tr>
					<th>Section</th>
					<th>Topic</th>
					<th>Content</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1.2</td>
					<td>DRM Evolution</td>
					<td>The main challenges and key mechanisms of three phases: graphics display, graphics rendering, and heterogeneous computing and AI</td>
			</tr>
			<tr>
					<td>1.3</td>
					<td>Hardware Model of GPU Memory Access</td>
					<td>System topology, memory types and coherency, CPU/GPU memory-access flows, and address translation</td>
			</tr>
			<tr>
					<td>1.4</td>
					<td>Hardware Model of Command Submission</td>
					<td>Execution engines and command processors, the job life cycle, queues and hardware queue slots, queue mapping and preemption, and cache synchronization at job boundaries</td>
			</tr>
			<tr>
					<td>1.5</td>
					<td>Main Thread and Organization of This Book</td>
					<td>Why the BO life cycle is the book&rsquo;s main thread and where each chapter fits into it</td>
			</tr>
			<tr>
					<td>1.6</td>
					<td>Chapter Summary</td>
					<td>Summary and references</td>
			</tr>
	</tbody>
</table>
<p>Section 1.2 explains why these mechanisms appeared in sequence. Sections 1.3 and 1.4 explain the hardware constraints they address. Section 1.5 then explains the organization of the entire book.</p>
]]></content:encoded></item><item><title>1.2 DRM Evolution</title><link>https://en.gpuers.cn/columns/drm/0001-003/</link><pubDate>Thu, 19 Nov 2026 00:00:00 +0800</pubDate><guid>https://en.gpuers.cn/columns/drm/0001-003/</guid><description>In the current DRM codebase, GPU memory management is handled by several cooperating mechanisms: GEM represents objects, TTM manages placement and migration amo…</description><content:encoded><![CDATA[<h2 id="1-overview">1. Overview</h2>
<p>In the current DRM codebase, GPU memory management is handled by several cooperating mechanisms: GEM represents objects, TTM manages placement and migration among multiple memory domains, dma-buf handles cross-device sharing, <code>drm_gpuvm</code> manages GPU virtual addresses, and <code>drm_gpusvm</code> supports an address space shared by the CPU and GPU. On first encountering this code, it can be difficult to see why these mechanisms coexist and how they relate. They were not all produced by a single design effort; over more than two decades, they were introduced in stages to solve problems specific to each period. Understanding this evolution is a prerequisite for understanding their design tradeoffs.</p>
<p>This section reviews DRM&rsquo;s evolution from its entry into the kernel in 1999 to the present.</p>
<p>DRM&rsquo;s evolution can be divided roughly into three phases: graphics display, graphics rendering, and heterogeneous computing and AI. Each phase has a dominant problem, and new mechanisms were introduced to address it. The phases overlap in time; the years and versions below refer to when the corresponding mechanisms were merged into the mainline kernel. Figure 1.2.1 summarizes the main goals, key mechanisms, and hardware background of the three phases.</p>

<figure class="align-center">
    <img loading="lazy" src="https://en.gpuers.cn/columns/drm/0001-003/1.2-evolution.png" width="2400" height="1580"
         alt="DRM subsystem three-phase evolution">
    <figcaption><p>Figure 1.2.1. Three phases in the evolution of the DRM subsystem</p></figcaption>
</figure>

<h2 id="2-phase-one-graphics-display-approximately-19992009">2. Phase One: Graphics Display (approximately 1999–2009)</h2>
<p>In the late 1990s, graphics display on Linux was handled by the user-space X Server, which directly read and wrote GPU registers to set display modes and draw images. To obtain sufficient performance, 3D applications wanted to bypass the X Server and submit rendering commands directly to the GPU. This is called direct rendering. It introduced a new problem: if several processes operated on the same GPU, something had to arbitrate their access and prevent one process from corrupting another&rsquo;s data. This was the central problem of the first phase.</p>
<p>DRM entered the kernel to solve precisely that problem, first appearing in Linux 2.3.18 in 1999. Its responsibilities were limited in this period: arbitrate access to the GPU, treat the X Server as the master device that authenticates other clients, and manage the DMA buffers used to carry commands to the GPU.</p>
<p>Display mode setting was still performed by the X Server&rsquo;s user-space driver through direct register access. That created a series of problems: the X Server had to run as root; switching between the console and the graphical environment caused display flicker; suspend and resume depended on user-space cooperation; and a kernel crash could not be shown on the screen. Linux 2.6.29 merged Kernel Mode Setting (KMS) in 2009, moving mode setting into the kernel and modeling display hardware with objects such as CRTC, encoder, and connector. The kernel thus became the sole entry point for GPU access.</p>
<p><strong>Key mechanisms of this phase</strong>: the DRM core (device-access arbitration), the master/client authentication model, and KMS.</p>
<h2 id="3-phase-two-graphics-rendering-approximately-20082020">3. Phase Two: Graphics Rendering (approximately 2008–2020)</h2>
<p>With the spread of programmable shaders, 3D applications needed to manage much more data: vertices, textures, shader programs, and render targets. Each is a block of memory that the GPU must access. There are many such objects, they live for long periods, and they must cross process boundaries—for example, when an application hands rendered results to a compositor for display. Early DRM provided only simple DMA buffers, which could not meet these requirements. The main problem of this phase was GPU-memory allocation, sharing, and synchronization.</p>
<h3 id="31-gem">3.1 GEM</h3>
<p>Linux 2.6.28 merged GEM (Graphics Execution Manager) in 2008 with the Intel i915 driver. GEM represents each block of GPU memory as an object referenced from user space by an integer handle. The object&rsquo;s contents are stored in a shmem file and can be swapped out when memory is tight.</p>
<p>Referencing objects by integer handle rather than file descriptor was deliberate. The comment at the beginning of <code>drivers/gpu/drm/drm_gem.c</code> explains that the designers had originally hoped to use <code>struct file</code>, but at the time a process had only about 1,024 open files by default, whereas an application might need tens of thousands of objects. Large numbers of high-valued file descriptors would also burden <code>select()</code> in the X Server and many GL applications. GEM therefore uses its own integer handles to emulate file descriptors while retaining a <code>struct file</code> inside each object, leaving open the possibility of transitioning to real file descriptors later.</p>
<h3 id="32-ttm">3.2 TTM</h3>
<p>GEM targeted Intel integrated graphics, which has no discrete VRAM; all memory comes from system memory. GPUs with discrete VRAM must answer a different question: should a block of memory reside in VRAM or system memory, and how should it be moved out when VRAM runs short? Linux 2.6.31 merged TTM (Translation Table Manager) with the radeon driver in 2009. TTM manages placement and migration among multiple memory domains. GEM and TTM are not mutually exclusive: the current <code>struct ttm_buffer_object</code> embeds a <code>struct drm_gem_object</code>, so it still presents a GEM object to user space.</p>
<h3 id="33-sharing">3.3 Sharing</h3>
<p>GPU memory must be shared not only between processes but also between devices—for example, passing a frame captured by a camera to the GPU for processing and then to a display controller for output. Linux 3.3 introduced dma-buf in 2012, providing a common in-kernel mechanism for device drivers to share buffers as file descriptors. Linux 3.4 then added PRIME, which converts between GEM handles and dma-buf file descriptors. Linux 3.12 introduced render nodes in 2013, separating rendering privileges from mode-setting privileges.</p>
<h3 id="34-synchronization">3.4 Synchronization</h3>
<p>GPUs execute commands asynchronously. Before the CPU or another device accesses a block of memory, it needs to know whether the GPU has finished using it. Linux 3.11 introduced the reservation object in 2013 for cross-device buffer locking. Linux 3.17 introduced fences in 2014 to represent the completion of asynchronous operations and allowed reservation objects to carry them. Parties accessing the same buffer can then wait for one another automatically, an approach called implicit synchronization. These mechanisms were later renamed <code>dma_fence</code> in Linux 4.10 and <code>dma_resv</code> in Linux 5.4. Explicit synchronization—passing synchronization objects explicitly in user space—is provided by <code>sync_file</code> (Linux 4.7) and <code>drm_syncobj</code> (Linux 4.13).</p>
<h3 id="35-scheduling-and-generalization">3.5 Scheduling and Generalization</h3>
<p>As concurrent GPU work increased, scheduling also required a common solution. The amdgpu driver originally carried its own GPU scheduler; Linux 4.16 moved it into DRM as the shared <code>drm_sched</code> framework in 2018. The same generalization occurred in memory management: Linux 5.2 added the GEM shmem helper in 2019, consolidating nearly identical shmem-backing code from several integrated-graphics drivers.</p>
<p><strong>Key mechanisms of this phase</strong>: GEM, TTM, dma-buf and PRIME, dma-fence and dma_resv, syncobj, and the GPU scheduler.</p>
<h2 id="4-phase-three-heterogeneous-computing-and-ai-2020-to-present">4. Phase Three: Heterogeneous Computing and AI (2020 to present)</h2>
<p>GPUs have long been used for general-purpose computing: Linux 3.19 merged amdkfd in 2015 to provide compute support for AMD&rsquo;s Heterogeneous System Architecture (HSA); Linux 4.2 merged the amdgpu driver that same year. However, framework-level mechanisms driven by compute workloads appeared mostly after 2020. As compute and AI became central DRM workloads, the principal problem shifted to managing GPU virtual addresses and unifying CPU and GPU address spaces.</p>
<h3 id="41-gpu-virtual-address-management">4.1 GPU Virtual Address Management</h3>
<p>In the traditional relocation model, the kernel chooses where a buffer is placed in GPU address space at each submission. Vulkan sparse resources instead require user space to bind arbitrary portions of a buffer to specified GPU virtual addresses. This driver interface is commonly called VM_BIND. The kernel must therefore be able to split and merge existing mappings. Linux 6.6 introduced the GPU virtual-address manager <code>drm_gpuva_mgr</code> in 2023; beginning with Linux 6.7, it was renamed <code>drm_gpuvm</code>. The comment in <code>drivers/gpu/drm/drm_gpuvm.c</code> explains that splitting and merging mappings is necessary for Vulkan Sparse Memory Bindings.</p>
<h3 id="42-a-shared-address-space-between-cpu-and-gpu">4.2 A Shared Address Space Between CPU and GPU</h3>
<p>Compute programming models want the GPU to use process virtual addresses directly so that memory allocated by <code>malloc()</code> can be passed to the GPU without copying. Linux 4.14 introduced Heterogeneous Memory Management (HMM) in the memory-management subsystem in 2017, allowing device drivers to mirror process page tables and migrate pages to device memory. Linux 5.14 merged AMD&rsquo;s HMM-based Shared Virtual Memory (SVM) implementation in 2021. Intel Xe, merged in Linux 6.8 in 2024, likewise requires SVM.</p>
<p>Separate SVM implementations in each driver caused substantial duplication. Linux 6.15 introduced <code>drm_gpusvm</code> and the <code>drm_pagemap</code> interface for describing device memory in 2025. Linux 6.17 moved migration-related implementation from <code>drm_gpusvm</code> to <code>drm_pagemap</code>. Based on MMU notifiers and HMM, <code>drm_gpusvm</code> tracks CPU page-table changes and migrates pages on demand between system memory and VRAM, consolidating code that can be shared by multiple drivers into the framework.</p>
<p><strong>Key mechanisms of this phase</strong>: HMM, <code>drm_gpuvm</code> and VM_BIND, <code>drm_pagemap</code>, and <code>drm_gpusvm</code>.</p>
<h2 id="5-comparison-of-the-three-phases">5. Comparison of the Three Phases</h2>
<p>The scenarios, main problems, and key mechanisms of the three phases are compared below.</p>
<table>
	<thead>
			<tr>
					<th>Dimension</th>
					<th>Graphics Display</th>
					<th>Graphics Rendering</th>
					<th>Heterogeneous Computing and AI</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Main scenario</strong></td>
					<td>Desktop display, X11</td>
					<td>3D games, CAD, composited desktop</td>
					<td>General-purpose computing, AI training and inference</td>
			</tr>
			<tr>
					<td><strong>Main problem</strong></td>
					<td>Safe multi-process GPU access</td>
					<td>GPU-memory allocation, sharing, and synchronization</td>
					<td>GPU virtual-address management and unified CPU/GPU address spaces</td>
			</tr>
			<tr>
					<td><strong>Memory representation</strong></td>
					<td>DMA buffers</td>
					<td>GEM objects (BOs)</td>
					<td>BOs plus process virtual-address ranges</td>
			</tr>
			<tr>
					<td><strong>GPU addressing</strong></td>
					<td>Physical addresses (through GART)</td>
					<td>GPU virtual addresses managed by the driver</td>
					<td>User-bound GPU virtual addresses (VM_BIND), shared with the CPU</td>
			</tr>
			<tr>
					<td><strong>Synchronization</strong></td>
					<td>DRM hardware locks</td>
					<td>dma_fence, dma_resv, syncobj</td>
					<td>The above plus MMU notifiers</td>
			</tr>
			<tr>
					<td><strong>Typical capacity</strong></td>
					<td>Megabyte scale</td>
					<td>Gigabyte scale</td>
					<td>Tens of gigabytes</td>
			</tr>
			<tr>
					<td><strong>Representative mechanisms</strong></td>
					<td>DRM core, KMS</td>
					<td>GEM, TTM, dma-buf, drm_sched</td>
					<td>drm_gpuvm, HMM, drm_gpusvm</td>
			</tr>
	</tbody>
</table>
<h2 id="6-drivers-of-evolution">6. Drivers of Evolution</h2>
<p>This evolution is driven by three factors.</p>
<p><strong>Hardware</strong>. GPUs evolved from fixed-function pipelines to programmable shaders and then to general-purpose compute cores. VRAM capacity grew from megabytes to tens of gigabytes. Interconnects evolved from AGP to PCIe, then to NVLink, Infinity Fabric, and other high-speed interconnects.</p>
<p><strong>Applications</strong>. The main workloads shifted from office and basic graphics in the 2000s to 3D games and professional rendering in the 2010s, and then to deep learning and large models in the 2020s.</p>
<p><strong>Programming interfaces</strong>. Vulkan 1.0, released in 2016, gave applications explicit control of memory management and introduced sparse resources. Heterogeneous programming models such as CUDA, ROCm/HIP, SYCL, and OpenCL drove demand for a unified virtual address space between CPU and GPU.</p>
<p>Changes in all three areas ultimately translated into changes in how the kernel manages GPU memory.</p>
<h2 id="7-kernel-versions-in-which-the-mechanisms-were-merged">7. Kernel Versions in Which the Mechanisms Were Merged</h2>
<p>The years and kernel versions in which the mechanisms discussed here were merged are shown in Figure 1.2.2.</p>

<figure class="align-center">
    <img loading="lazy" src="https://en.gpuers.cn/columns/drm/0001-003/1.2-kernel-timeline.png" width="2880" height="2288"
         alt="Timeline of mechanism mergers into the kernel">
    <figcaption><p>Figure 1.2.2. Timeline of mechanism mergers into the kernel</p></figcaption>
</figure>

<p>The timeline shows that most mechanisms related to objects, sharing, synchronization, and scheduling were merged between 2008 and 2019, while common frameworks for GPU virtual addresses and shared virtual memory appeared mostly after 2023.</p>
]]></content:encoded></item><item><title>Linux GPU Driver Internals: Reader's Guide and Contents</title><link>https://en.gpuers.cn/columns/drm/0001-001/</link><pubDate>Thu, 19 Nov 2026 00:00:00 +0800</pubDate><guid>https://en.gpuers.cn/columns/drm/0001-001/</guid><description>GPU drivers must solve two fundamental problems: managing GPU-accessible memory and submitting commands to the GPU for execution.</description><content:encoded><![CDATA[<p>GPU drivers must solve two fundamental problems: managing GPU-accessible memory and submitting commands to the GPU for execution. Whether rendering a frame or executing a model inference, the process begins with allocating, placing, and mapping memory for buffer objects (BOs), followed by submitting commands that reference these BOs and coordinating access from the CPU, GPU, and other devices.</p>
<p>In the Linux kernel, the DRM subsystem assumes these responsibilities: <strong>GEM and TTM</strong> manage BOs and their backing stores, <strong>dma-buf and dma-fence</strong> handle sharing and synchronization, while the <strong>GPU scheduler and drm_gpuvm</strong> manage command scheduling and GPU address spaces. These frameworks provide a unified abstraction for GPU drivers such as Intel, AMD, NVIDIA, and Arm Mali, while managing system memory, VRAM, and hardware queues below. This series traces the <strong>life cycle of buffer objects</strong> as its organizing principle, systematically analyzing this architecture.</p>
<p>The scope and organization of this series are described in <a href="https://gpuers.blog.csdn.net/article/details/160729233">The Main Thread and Organization of This Book</a>, with the rationale for selecting this content found in <a href="https://gpuers.blog.csdn.net/article/details/155742593">The Evolution of DRM</a>.</p>
<p>This series uses Linux 7.1 as its code baseline and covers modern GPU memory management and command submission mechanisms, addressing both graphics and AI compute workloads. It encompasses buffer sharing and implicit synchronization required by graphics stacks, as well as long-running jobs, user-space queues, and shared virtual memory that compute workloads depend on.</p>
<p>The series emphasizes explaining <em>why</em> each mechanism is designed as it is: first establishing the problem a mechanism solves and its hardware background, then analyzing design tradeoffs and kernel implementation, and finally validating these with code from drivers such as amdgpu, Xe, and panthor.</p>
<p>The content of this series is drawn from hands-on experience in GPU driver development. Problems such as VRAM leaks, eviction thrashing, synchronization deadlocks, and submission timeouts often require tracing through the intersection of GEM, TTM, dma-fence, and the scheduler to find the root cause. Related knowledge is scattered across kernel source code, mailing lists, and driver implementations, almost entirely in English. Existing Chinese materials are mostly fragmented discussions of individual interfaces or specific drivers; systematic explanations of these mechanisms are rare. This series aims to fill that gap: rather than introducing a single interface or driver in isolation, it follows the BO life cycle and connects object management, backing stores, sharing and synchronization, scheduling, address spaces, and command submission—explaining why each mechanism exists, how they work together, and providing developers who encounter similar problems with a coherent thread to follow.</p>
<p>Below is the series table of contents, which we recommend reading in order.</p>
<h2 id="chapter-1-drm-subsystem-overview">Chapter 1 DRM Subsystem Overview</h2>
<ul>
<li>1.1 <a href="https://gpuers.blog.csdn.net/article/details/169950513">Composition and Positioning of DRM</a></li>
<li>1.2 <a href="https://gpuers.blog.csdn.net/article/details/155742593">Evolution of DRM</a></li>
<li>1.3 <a href="https://gpuers.blog.csdn.net/article/details/169459158">Hardware Model of GPU Memory Access</a></li>
<li>1.4 <a href="https://gpuers.blog.csdn.net/article/details/170039500">Hardware Model of Command Submission</a></li>
<li>1.5 <a href="https://gpuers.blog.csdn.net/article/details/160729233">Main Thread and Organization of This Book</a></li>
<li>1.6 <a href="https://gpuers.blog.csdn.net/article/details/169950801">Chapter Summary</a></li>
</ul>
<h2 id="chapter-2-drm-framework">Chapter 2 DRM Framework</h2>
<ul>
<li>2.1 <a href="https://gpuers.blog.csdn.net/article/details/160732815">File Model of the DRM Framework</a></li>
<li>2.2 <a href="https://gpuers.blog.csdn.net/article/details/164065158">Driver Description Object drm_driver</a></li>
<li>2.3 <a href="https://gpuers.blog.csdn.net/article/details/164065778">Device Instance drm_device</a></li>
<li>2.4 <a href="https://gpuers.blog.csdn.net/article/details/164065806">Client Context drm_file</a></li>
<li>2.5 <a href="https://gpuers.blog.csdn.net/article/details/168774577">Framework ioctl and Access Control</a></li>
<li>2.6 <a href="https://gpuers.blog.csdn.net/article/details/168774577">DRM Device Driver Integration</a></li>
<li>2.7 <a href="https://gpuers.blog.csdn.net/article/details/168774753">Chapter Summary</a></li>
</ul>
<h2 id="chapter-3-gem-object-model">Chapter 3 GEM Object Model</h2>
<ul>
<li>3.1 <a href="https://gpuers.blog.csdn.net/article/details/155822806">Requirements, Constraints, and Responsibility Boundaries of GEM</a></li>
<li>3.2 <a href="https://gpuers.blog.csdn.net/article/details/160797999">GEM Object Model</a></li>
<li>3.3 <a href="https://gpuers.blog.csdn.net/article/details/163663957">CPU View</a></li>
<li>3.4 <a href="https://gpuers.blog.csdn.net/article/details/163664159">GPU View</a></li>
<li>3.5 <a href="https://gpuers.blog.csdn.net/article/details/168223365">Inter-Device Views and Synchronization</a></li>
<li>3.6 <a href="https://gpuers.blog.csdn.net/article/details/155950146">GEM Object Driver Integration</a></li>
<li>3.7 <a href="https://gpuers.blog.csdn.net/article/details/160827366">Chapter Summary</a></li>
</ul>
<h2 id="chapter-4-lightweight-backing-store">Chapter 4 Lightweight Backing Store</h2>
<ul>
<li>4.1 <a href="https://gpuers.blog.csdn.net/article/details/168325239">Positioning of Lightweight Backing Store</a></li>
<li>4.2 <a href="https://gpuers.blog.csdn.net/article/details/167584836">Contiguous Memory Backing: drm_gem_dma_object</a></li>
<li>4.3 <a href="https://gpuers.blog.csdn.net/article/details/168243690">shmem File Backing Store</a></li>
<li>4.4 <a href="https://gpuers.blog.csdn.net/article/details/166735809">Structure and Creation of shmem Objects</a></li>
<li>4.5 <a href="https://gpuers.blog.csdn.net/article/details/168662060">Page Fetching, Referencing, and Object State</a></li>
<li>4.6 <a href="https://gpuers.blog.csdn.net/article/details/161690983">CPU Access and Page Fault Handling</a></li>
<li>4.7 <a href="https://gpuers.blog.csdn.net/article/details/160791685">Same-Device DMA and PRIME Sharing</a></li>
<li>4.8 <a href="https://gpuers.blog.csdn.net/article/details/167585420">Swapping Out and Purge</a></li>
<li>4.9 <a href="https://gpuers.blog.csdn.net/article/details/167921447">shmem Helper Driver Integration</a></li>
<li>4.10 <a href="https://gpuers.blog.csdn.net/article/details/169826478">Chapter Summary</a></li>
</ul>
<h2 id="chapter-5-ttm-backing-store">Chapter 5 TTM Backing Store</h2>
<ul>
<li>5.1 <a href="https://gpuers.blog.csdn.net/article/details/161021079">Design Motivation and Responsibility Boundaries of TTM</a></li>
<li>5.2 <a href="https://gpuers.blog.csdn.net/article/details/158012227">Core Objects of TTM and TTM BO Life Cycle</a></li>
<li>5.3 <a href="https://gpuers.blog.csdn.net/article/details/160592384">ttm_device and Global State</a></li>
<li>5.4 <a href="https://gpuers.blog.csdn.net/article/details/160591586">ttm_buffer_object</a></li>
<li>5.5 <a href="https://gpuers.blog.csdn.net/article/details/158012035">Resources and Resource Managers</a></li>
<li>5.6 <a href="https://gpuers.blog.csdn.net/article/details/158012440">System Memory Domain</a></li>
<li>5.7 <a href="https://gpuers.blog.csdn.net/article/details/160592178">GTT Domain and GART Address Space</a></li>
<li>5.8 <a href="https://gpuers.blog.csdn.net/article/details/160592478">VRAM Domain</a></li>
<li>5.9 <a href="https://gpuers.blog.csdn.net/article/details/155424068">CPU Access to All Domains</a></li>
<li>5.10 <a href="https://gpuers.blog.csdn.net/article/details/155424573">Placement Policies and ttm_bo_validate</a></li>
<li>5.11 <a href="https://gpuers.blog.csdn.net/article/details/157975051">Migration Execution</a></li>
<li>5.12 <a href="https://gpuers.blog.csdn.net/article/details/160335840">Eviction</a></li>
<li>5.13 <a href="https://gpuers.blog.csdn.net/article/details/160336475">Swapping Out and Shrinker</a></li>
<li>5.14 <a href="https://gpuers.blog.csdn.net/article/details/160407256">TTM Driver Integration</a></li>
<li>5.15 <a href="https://gpuers.blog.csdn.net/article/details/169945386">Chapter Summary</a></li>
</ul>
<h2 id="chapter-6-bo-sharing">Chapter 6 BO Sharing</h2>
<ul>
<li>6.1 <a href="https://gpuers.blog.csdn.net/article/details/155824923">Challenges of BO Sharing and dma-buf Solutions</a></li>
<li>6.2 <a href="https://gpuers.blog.csdn.net/article/details/155936880">dma-buf Mechanism</a></li>
<li>6.3 <a href="https://gpuers.blog.csdn.net/article/details/169350857">dma-buf Exporter</a></li>
<li>6.4 <a href="https://gpuers.blog.csdn.net/article/details/169351397">dma-buf Importer</a></li>
<li>6.5 <a href="https://gpuers.blog.csdn.net/article/details/164030048">Dynamic dma-buf</a></li>
<li>6.6 CPU Access and User-Space Synchronization — In review</li>
<li>6.7 <a href="https://gpuers.blog.csdn.net/article/details/151755736">PRIME Mechanism</a></li>
<li>6.8 <a href="https://gpuers.blog.csdn.net/article/details/164030755">dma-buf Heaps and udmabuf</a></li>
<li>6.9 <a href="https://gpuers.blog.csdn.net/article/details/155424019">BO Sharing Driver Integration</a></li>
<li>6.10 <a href="https://gpuers.blog.csdn.net/article/details/163656895">Chapter Summary</a></li>
</ul>
<h2 id="chapter-7-synchronization-of-asynchronous-access">Chapter 7 Synchronization of Asynchronous Access</h2>
<ul>
<li>7.1 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Synchronization Problems and Framework for Asynchronous Access</a></li>
<li>7.2 <a href="https://gpuers.blog.csdn.net/article/details/160078056">dma_fence Structure, Signal, and Wait</a></li>
<li>7.3 <a href="https://gpuers.blog.csdn.net/article/details/160859741">Fence Composition: array, chain, and unwrap</a></li>
<li>7.4 <a href="https://gpuers.blog.csdn.net/article/details/164054364">Implicit Synchronization on BOs: dma_resv</a></li>
<li>7.5 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Fence Reification: sync_file</a></li>
<li>7.6 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Synchronization Objects and Timelines: drm_syncobj</a></li>
<li>7.7 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Multi-BO Locking: ww_mutex and drm_exec</a></li>
<li>7.8 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Synchronization Mechanism Driver Integration</a></li>
<li>7.9 <a href="https://gpuers.blog.csdn.net/article/details/155861587">Chapter Summary</a></li>
</ul>
<h2 id="chapter-8-gpu-scheduler-framework">Chapter 8 GPU Scheduler Framework</h2>
<ul>
<li>8.1 Evolution of Command Submission — In review</li>
<li>8.2 <a href="https://gpuers.blog.csdn.net/article/details/161633342">Scheduling Requirements and Scheduler Positioning</a></li>
<li>8.3 <a href="https://g.blog.csdn.net/article/details/160719694">Scheduler Instance drm_gpu_scheduler</a></li>
<li>8.4 <a href="https://gpuers.blog.csdn.net/article/details/160719804">Scheduling Entities and Jobs</a></li>
<li>8.5 <a href="https://gpuers.blog.csdn.net/article/details/160720190">Scheduling Loop and Flow Control</a></li>
<li>8.6 <a href="https://gpuers.blog.csdn.net/article/details/162238813">Timeout Detection and Recovery</a></li>
<li>8.7 Chapter Summary — In review</li>
</ul>
<h2 id="chapter-9-evolution-of-gpu-address-space">Chapter 9 Evolution of GPU Address Space</h2>
<ul>
<li>9.1 <a href="https://gpuers.blog.csdn.net/article/details/163887247">Evolution and Responsibility Division of GPU Virtual Address Space</a></li>
<li>9.2 <a href="https://gpuers.blog.csdn.net/article/details/161859411">Comparing GPU Memory Management with CPU MM</a></li>
<li>9.3 <a href="https://gpuers.blog.csdn.net/article/details/163973711">GPUVM Object Model</a></li>
<li>9.4 <a href="https://gpuers.blog.csdn.net/article/details/163891589">VA Space Changes and Operation Sequences</a></li>
<li>9.5 <a href="https://gpuers.blog.csdn.net/article/details/163892798">Shared resv, External Objects, and Re-validation</a></li>
<li>9.6 <a href="https://gpuers.blog.csdn.net/article/details/163891776">Page Table Updates and TLB Invalidation</a></li>
<li>9.7 <a href="https://gpuers.blog.csdn.net/article/details/156335414">Asynchronous VM_BIND and Binding Jobs</a></li>
<li>9.8 <a href="https://gpuers.blog.csdn.net/article/details/159765392">GPUVM Driver Integration</a></li>
<li>9.9 <a href="https://gpuers.blog.csdn.net/article/details/169825613">Chapter Summary</a></li>
</ul>
<h2 id="chapter-10-evolution-of-submission-paths">Chapter 10 Evolution of Submission Paths</h2>
<ul>
<li>10.1 <a href="https://gpuers.blog.csdn.net/article/details/159804840">Four Forms of Submission Paths</a></li>
<li>10.2 BO List-Based Submission — In review</li>
<li>10.3 VM-Based Submission — In review</li>
<li>10.4 Firmware Scheduling and Scheduler Assumptions — In review</li>
<li>10.5 dma_fence Constraints and Long-Running Jobs — In review</li>
<li>10.6 User-Space Queues — In review</li>
<li>10.7 Submission Path Driver Integration — In review</li>
<li>10.8 Chapter Summary — In review</li>
</ul>
<h2 id="chapter-11-shared-virtual-memory-svm">Chapter 11 Shared Virtual Memory (SVM)</h2>
<ul>
<li>11.1 <a href="https://gpuers.blog.csdn.net/article/details/163829159">Requirements of SVM and DRM&rsquo;s Two-Layer Framework</a></li>
<li>11.2 Kernel Foundations of Mirroring: mmu_interval_notifier and hmm_range_fault — In review</li>
<li>11.3 <a href="https://gpuers.blog.csdn.net/article/details/163830632">Kernel Foundations of Device Memory: ZONE_DEVICE and migrate_vma</a></li>
<li>11.4 drm_gpusvm Object Model: notifier and range — In review</li>
<li>11.5 Page Fetching and DMA Mapping — In review</li>
<li>11.6 Invalidation and Partial Unmapping — In review</li>
<li>11.7 Device Memory Provider: drm_pagemap — In review</li>
<li>11.8 Owner Groups, P2P Access, and pagemap Caching — In review</li>
<li>11.9 Migration to Device Memory — In review</li>
<li>11.10 Migration Back to System Memory — In review</li>
<li>11.11 Page Fault and Invalidation Driver Integration — Being written</li>
<li>11.12 Device Memory and Migration Driver Integration — Being written</li>
<li>11.13 Chapter Summary — Being written</li>
</ul>
<h2 id="appendix-a-drm-kernel-debugging-techniques">Appendix A DRM Kernel Debugging Techniques</h2>
<p>Being written.</p>
<h2 id="appendix-b-kernel-fundamental-mechanisms">Appendix B Kernel Fundamental Mechanisms</h2>
<ul>
<li>B.1 <a href="https://gpuers.blog.csdn.net/article/details/151137803">Principles and Implementation of Linux Process Control</a></li>
<li>B.2 <a href="https://gpuers.blog.csdn.net/article/details/151077976">Kernel Wait Queues</a></li>
<li>B.3 <a href="https://gpuers.blog.csdn.net/article/details/150868538">Workqueues and Their Application in KFD SVM</a></li>
<li>B.4 <a href="https://gpuers.blog.csdn.net/article/details/148944832">IDR Mechanism</a></li>
<li>B.5 <a href="https://gpuers.blog.csdn.net/article/details/154487584">RCU Mechanism</a></li>
<li>B.6 <a href="https://gpuers.blog.csdn.net/article/details/163999732">Pre-allocation Pattern on Lock-Held Paths</a></li>
<li>B.7 shmem and tmpfs — In review</li>
<li>B.8 address_space and Reverse Mapping — Not yet published</li>
<li>B.9 drm_mm Range Allocator — In review</li>
<li>B.10 gpu_buddy Buddy Allocator — In review</li>
<li>B.11 drm_vma_offset_manager and Pseudo-Offset Management — In review</li>
<li>B.12 Evolution of GPU Addressing Model and gpuva Reverse Indexing — In review</li>
<li>B.13 Implementation Paths of GEM Object Life Cycle — In review</li>
<li>B.14 <a href="https://gpuers.blog.csdn.net/article/details/150936518">anon_inode Mechanism</a></li>
</ul>
<h2 id="appendix-c-drm-implementation-details-qa">Appendix C DRM Implementation Details Q&amp;A</h2>
<ul>
<li>C.1 <a href="https://gpuers.blog.csdn.net/article/details/158884956">Why Kernel BOs Are Not Registered to vma_manager</a></li>
<li>C.2 <a href="https://gpuers.blog.csdn.net/article/details/158885620">Multiple Candidate Placement Mechanism of ttm_place</a></li>
<li>C.3 <a href="https://gpuers.blog.csdn.net/article/details/161901157">Function and Implementation of AMDGPU_GEM_CREATE_VRAM_CLEARED</a></li>
</ul>
]]></content:encoded></item></channel></rss>