Selective write-back of dirty cache lines concurrently with processing

Concurrent write-back of dirty cache lines in GPUs addresses the bandwidth bottleneck by marking cache lines as clean and prioritizing write operations, improving GPU performance and efficiency.

JP7724242B2Active Publication Date: 2025-08-15ADVANCED MICRO DEVICES INC +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022576399
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-21
Filing Date
2021-06-15
Publication Date
2025-08-15
Estimated Expiration
2041-06-15

AI Technical Summary

Technical Problem

The bottleneck in bandwidth and performance due to evicting dirty cache lines from cache hierarchies in graphics processing units (GPUs) during frame transitions, which constrains the bandwidth for reading new data and writing dirty cache lines back to system memory.

Method used

Concurrently write back dirty cache lines to memory during frame processing while marking them as clean, and prioritize write operations based on system memory controller read command occupancy using thresholds and hints.

Benefits of technology

Reduces memory bandwidth and processing power consumption during frame transitions by optimizing cache line write-back operations, enhancing GPU performance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007724242000001
    Figure 0007724242000001
  • Figure 0007724242000002
    Figure 0007724242000002
  • Figure 0007724242000003
    Figure 0007724242000003
Patent Text Reader

Abstract

The graphics pipeline (200) includes a cache (207, 305) including cache lines (310-313) configured to store data used to process frames in the graphics pipeline. The graphics pipeline is implemented with a processor (115) that processes frames of the graphics pipeline using data stored in the cache. The processor processes a first frame and writes dirty cache lines back to memory from the cache (105) concurrently with the processing of the first frame. The dirty cache lines are retained in the cache and are marked as clean after being written back to memory. Optionally, the processor generates a hint (335) indicating a priority for writing back dirty cache lines based on read command occupancy at a system memory controller.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] Processing systems, including graphics processing units (GPUs), implement cache hierarchies (or multi-level caches) that use a hierarchy of caches of varying speeds to store frequently accessed data. More frequently requested data is typically cached in a relatively fast cache (e.g., L1 cache) that is physically (or logically) located closer to the processor core or compute unit. Higher levels of cache (e.g., L2 cache, L3 cache) store less frequently requested data. The last-level cache (LLC) is the highest-level (and lowest-access-speed) cache; it reads and writes data directly from and to system memory. Caches differ from memories because they implement a cache replacement policy that replaces data within a cache line as new data needs to be written to the cache line. For example, a least-recently-used (LRU) policy replaces data within the cache line that has not been accessed the longest by evicting the data in the LRU cache line and writing new data to the LRU cache line. A GPU processes data on a frame-by-frame basis; for example, a graphics pipeline within a GPU renders one frame at a time. Therefore, a cache hierarchy used to cache data for the graphics pipeline evicts dirty data from the cache at the end of one frame and before the start of a subsequent frame. Evicting dirty data requires writing dirty cache lines back to system memory, which consumes a significant amount of bandwidth and leads to a traffic bottleneck between the cache hierarchy and the system memory. The bottleneck has a significant performance impact on the GPU at the start of a subsequent frame because it constrains the bandwidth for reading new data into clean cache lines and writing dirty cache lines back to system memory. Summary of the Invention [Means for solving the problem]

[0002] According to some embodiments, an apparatus includes a cache comprising cache lines configured to store data used to process frames in a graphics pipeline. The apparatus further includes a processor implementing the graphics pipeline, the processor configured to process a first frame and to write dirty cache lines back from the cache to memory contemporaneously with the processing of the first frame, wherein data in the dirty cache lines is kept in the cache and marked as clean after being written back to memory. The apparatus may further include any one or any combination of the following aspects. The processor is configured to selectively write back dirty cache lines to memory based on a read command occupancy in a system memory controller (SMC), the processor is configured to send data in the dirty cache lines to the SMC in response to the read command occupancy being less than a first threshold, the SMC is configured to write back data received from the processor to memory, the processor is configured to send the data in the dirty cache lines to the SMC along with a hint indicating that writing back the data to memory is low priority in response to the read command occupancy being greater than the first threshold and less than a second threshold, the SMC is configured to process pending read requests before writing back the data to memory in response to receiving the hint, and the processor is configured to bypass sending the data in the dirty cache lines to the SMC in response to the read command occupancy being greater than the second threshold. The apparatus may further include any one or any combination of the following aspects. The processor is configured to bypass writing the dirty cache line back to memory during a transition from the first frame to the second frame in response to the dirty cache line being marked as clean, and the processor is configured to write back data in the dirty cache line that is not marked as clean in response to completing processing of the first frame and starting processing of the second frame.

[0003] According to some embodiments, a method includes processing a first frame in a graphics pipeline using data stored in cache lines of a cache associated with the graphics pipeline. The method further includes writing dirty cache lines back from the cache to memory concurrently with the processing of the first frame and retaining the data in the dirty cache lines in the cache. The method further includes marking the dirty cache lines as clean after the dirty cache lines are written back to memory. The method may further have any or any combination of the following aspects. Writing back the dirty cache line includes selectively writing back the dirty cache line to memory based on a read command occupancy in a system memory controller (SMC), and writing back the dirty cache line includes transmitting data in the dirty cache line to the SMC in response to the read command occupancy being less than a first threshold, the method further includes writing back the data received from the SMC to memory, and writing back the dirty cache line includes transmitting the data in the dirty cache line to the SMC with a hint indicating that writing back the data to memory is low priority in response to the read command occupancy being greater than the first threshold and less than a second threshold, the method In the method, in response to receiving the hint, further including processing pending read requests before writing the data back to the memory, wherein selectively writing back the dirty cache lines to the memory includes bypassing sending the data in the dirty cache lines to the SMC in response to the read command occupancy being greater than a second threshold, the method further comprising bypassing writing back the dirty cache lines to the memory during a transition from the first frame to the second frame in response to the dirty cache lines being marked as clean, or the method further includes writing back data in dirty cache lines that are not marked as clean in response to completing processing of the first frame and starting processing of the second frame.

[0004] According to some embodiments, an apparatus includes a set of compute units configured to implement a graphics pipeline, and further includes a last level cache (LLC) in a cache hierarchy associated with the set of compute units, wherein the compute units are configured to write back dirty cache lines from the LLC to memory concurrently with processing a first frame based on data stored in the dirty cache lines, and the dirty cache lines are marked as clean after being written back to memory. The apparatus may further include any one or any combination of the following aspects: the compute units are configured to determine a priority for writing back dirty cache lines from the LLC to memory based on a read command occupancy in a system memory controller (SMC), or the compute units are configured to bypass writing back dirty cache lines to memory during a transition from the first frame to the second frame in response to the dirty cache lines being marked as clean, and the compute units are configured to write back data in dirty cache lines that are not marked as clean in response to completing processing of the first frame and starting processing of the second frame.

[0005] The present disclosure may be better understood, and its numerous features and advantages made apparent to those skilled in the art by referencing the accompanying drawings, in which: The use of the same reference numbers in different drawings indicates similar or identical items. [Brief explanation of the drawings]

[0006] [Figure 1] FIG. 1 is a block diagram of a processing system that selectively writes back dirty cache lines concurrently with processing, according to some embodiments. [Figure 2] FIG. 1 illustrates a graphics pipeline configured to process high-order geometric primitives to generate a rasterized image of a three-dimensional (3D) scene at a predetermined resolution, according to some embodiments. [Figure 3]3 is a block diagram of a portion of the memory system of FIG. 2 according to some embodiments. [Figure 4] FIG. 1 is a flow diagram of a method for selectively writing back dirty cache lines while simultaneously processing a frame using data in the cache, according to some embodiments. DETAILED DESCRIPTION OF THE INVENTION

[0007] 1-4 illustrate systems and techniques for reducing bottlenecks in available bandwidth between a last level cache (LLC) and system memory during frame transitions in a graphics processing unit (GPU) by selectively writing back data in dirty cache lines of the LLC based on a read command occupancy, which indicates the number of pending read commands to the system memory. Data written back to the system memory is held in dirty cache lines, and the dirty cache lines are marked to indicate that the data in the marked cache lines has been written back to the system memory; thus, the marked cache lines can be treated as clean cache lines, for example, during the transition from a first frame to a second frame. In some embodiments, the dirty cache lines are selectively written back to the system memory by comparing the read command occupancy with one or more thresholds. For example, if the read command occupancy is less than a first threshold, the data in the dirty cache lines is sent to a system memory controller (SMC), and the SMC writes the data back to the system memory. If the read command occupancy is greater than a second threshold (greater than the first threshold), a request to write the dirty cache line back to system memory is sent to the SMC with a hint indicating that writing the data back to system memory is a low priority. Thus, the SMC processes the pending read request before performing the low priority write to system memory. If the read command occupancy is greater than a third threshold (greater than the second threshold), a request to write the dirty cache line back to system memory is not sent to the SMC.

[0008] FIG. 1 is a block diagram of a processing system 100 that selectively generates write-back dirty cache lines concurrently with processing, according to some embodiments. The processing system 100 includes or has access to a memory 105 or other storage component implemented using a non-transitory computer-readable storage medium, such as dynamic random access memory (DRAM). However, in some cases, the memory 105 may be implemented using other types of memory, including static random access memory (SRAM), non-volatile RAM, etc. The memory 105 is referred to as an external memory because it is implemented externally to a processing unit implemented in the processing system 100. The processing system 100 also includes a bus 110 to support communication between entities implemented in the processing system 100, such as the memory 105. Some embodiments of the processing system 100 include other buses, bridges, switches, routers, etc., which are not shown in FIG. 1 for clarity.

[0009] The techniques described herein, in various embodiments, may be utilized with any of a variety of parallel processors (e.g., vector processors, graphics processing units (GPUs), general-purpose GPUs (GPGPUs), non-scalar processors, highly parallel processors, artificial intelligence (AI) processors, inference engines, machine learning processors, other multi-threaded processing units, etc.). FIG. 1 illustrates an example of a parallel processor, particularly a graphics processing unit (GPU) 115, according to some embodiments. The graphics processing unit (GPU) 115 renders images for presentation on a display 120. For example, the GPU 115 renders objects to generate pixel values that are provided to the display 120, which uses the pixel values to display an image representing the rendered objects. The GPU 115 implements multiple computation units (CUs) 121, 122, and 123 (collectively referred to herein as "computation units 121-123") that execute instructions simultaneously or in parallel. In some embodiments, the compute units 121-123 include one or more single instruction, multiple data (SIMD) units, and the compute units 121-123 are aggregated into a workgroup processor, a shader array, a shader engine, or the like. The number of compute units 121-123 implemented in the GPU 115 is a matter of design choice, and some embodiments of the GPU 115 include more or fewer compute units than those shown in FIG. 1. The compute units 121-123 can be used to implement a graphics pipeline, as described herein. Some embodiments of the GPU 115 are used for general-purpose computing. The GPU 115 executes instructions, such as program code 125, stored in the memory 105, and the GPU 115 stores information, such as results of executed instructions, in the memory 105.

[0010] The processing system 100 also includes a central processing unit (CPU) 130 connected to a bus 110 and thus communicating with the GPU 115 and memory 105 via the bus 110. The CPU 130 implements multiple processor cores 131, 132, and 133 (collectively referred to herein as "processor cores 131-133") that execute instructions simultaneously or in parallel. The number of processor cores 131-133 implemented in the CPU 130 is a matter of design choice, and some embodiments include more or fewer processor cores than those shown in FIG. 1. The processor cores 131-133 execute instructions, such as program code 135, stored in the memory 105, and the CPU 130 stores information, such as results of the executed instructions, in the memory 105. The CPU 130 can also initiate graphics processing by issuing draw calls to the GPU 115. Some embodiments of the CPU 130 include multiple processor cores (not shown in FIG. 1 for clarity) that independently execute instructions simultaneously or in parallel.

[0011] An input / output (I / O) engine 145 handles input or output operations associated with the display 120 and other elements of the processing system 100, such as a keyboard, a mouse, a printer, an external disk, etc. The I / O engine 145 is coupled to the bus 110 such that the I / O engine 145 communicates with the GPU 105, the memory 115, or the CPU 130. In the illustrated embodiment, the I / O engine 145 reads information stored on an external storage component 150, which is implemented using a non-transitory computer-readable storage medium, such as a compact disc (CD), a digital video disc (DVD), etc. The I / O engine 145 can also write information, such as results of processing by the GPU 115 or the CPU 130, to the external storage component 150.

[0012] In the illustrated embodiment, the compute units 121-123 in the GPU 115 include (or are associated with) one or more caches 151, 153, 153, collectively referred to herein as "caches 151-152." The caches 151-153 may include L1 caches, L2 caches, L3 caches, or other caches in a cache hierarchy. Portions of the caches 151-153 are used to implement texture caches for the graphics pipelines running on the compute units 121-123. In the illustrated embodiment, the caches 151-153 are (or include) last-level caches (LLCs), which are the highest-level caches in the cache hierarchy. Thus, data is read directly from memory 105 into the caches 151-153, and data is read directly back from the caches 151-153 to memory 105.

[0013] The processing system 100 also includes a system memory controller (SMC) 155 that receives memory access requests from entities within the processing system. The SMC 155 processes the memory access requests using data stored in the memory 105. In the illustrated embodiment, the compute units 121-123 process frames in the graphics pipeline. Processing a frame includes writing data to one or more cache lines in the caches 151-153. Cache lines containing data written by the compute units 121-123 that have not yet been written back to the memory 105 are referred to as "dirty" cache lines. Dirty cache lines are evicted from the caches 151-153 during transitions between frames processed by the compute units 121-123. Evicting a dirty cache line includes writing the data in the dirty cache line back to the memory 105. However, the bandwidth and processing power required to evict all dirty cache lines in caches 151-153 may significantly reduce the bandwidth and processing power available to fetch data into caches 151-153 for a new frame and begin processing the data.

[0014] To address this issue, the compute units 121-123 write one or more dirty cache lines back from the caches 151-153 to the memory 105 simultaneously with processing the corresponding frame. The dirty cache lines written back to the memory 105 are also retained in the caches 151-153 so that the data in the dirty cache lines is available for processing the current frame. However, the dirty cache lines are marked as clean after being written back to memory so that the dirty cache lines do not need to be written back to memory during the transition between frames, thereby saving memory bandwidth and processing power during the transition. In some cases, the compute units 121-123 generate hints indicating the priority for writing back the dirty cache lines based on the read command occupancy in the SMC 155.

[0015] Figure 2 illustrates a graphics pipeline 200 configured to process high-order geometric primitives to generate a rasterized image of a three-dimensional (3D) scene at a predetermined resolution, according to some embodiments. Graphics pipeline 200 is implemented in some embodiments of processing system 100 shown in Figure 1. The illustrated embodiment of graphics pipeline 200 is implemented according to the DX11 specification. Other embodiments of graphics pipeline 200 are implemented according to other application programming interfaces (APIs), such as Vulkan, Metal, or DX12. Graphics pipeline 200 is subdivided into a geometry section 201, which includes portions of graphics pipeline 200 before rasterization, and a pixel processing section 202, which includes portions of graphics pipeline 200 after rasterization.

[0016] Graphics pipeline 200 may have access to storage resources 205, such as one or more memories or hierarchies of caches used to implement buffers and store vertex data, texture data, etc. In the illustrated embodiment, storage resources 205 include a local data store (LDS) 206 circuit used to store data and a cache 207 used to cache data frequently used during rendering by graphics pipeline 200. Storage resources 205 may be implemented using some embodiments of memory 105 shown in FIG. 1. As described herein, dirty cache lines in cache 207 are selectively written back to system memory concurrently with processing a frame using the data in the dirty cache lines to conserve memory bandwidth within graphics pipeline 200.

[0017] The input assembler 210 accesses information from storage resources 205 that is used to define objects that represent portions of a model of a scene. An example of a primitive is shown in Figure 2 as a triangle 211, although some embodiments of the graphics pipeline 200 process other types of primitives. A triangle 203 includes one or more vertices 212 (only one of each is shown in Figure 2 for clarity) connected by one or more edges 214. The vertices 212 are shaded during the geometry processing section 201 of the graphics pipeline 200.

[0018] Vertex shader 215, implemented in software in the illustrated embodiment, logically receives as input a single vertex 212 of a primitive and outputs a single vertex. Some embodiments of shaders, such as vertex shader 215, implement single instruction, multiple data (SIMD) processing so that multiple vertices are processed simultaneously. Graphics pipeline 200 implements a unified shader model so that all shaders included in graphics pipeline 200 have the same execution platform on shared massive SIMD compute units. Thus, shaders, including vertex shader 215, are implemented using a common set of resources, referred to herein as a unified shader pool 216.

[0019] The hull shader 218 operates on input high-order patches or control points used to define input patches. The hull shader 218 outputs tessellation coefficients and other patch data. In some embodiments, the primitives generated by the hull shader 218 are provided to the tessellator 220. The tessellator 220 receives objects (e.g., patches) from the hull shader 218 and generates information identifying primitives corresponding to the input objects, for example, by tessellating the input objects based on tessellation coefficients provided to the tessellator 220 by the hull shader 218. The tessellation subdivides input high-order primitives, such as patches, into a set of lower-order output primitives representing finer levels of detail, as indicated, for example, by tessellation coefficients that specify the granularity of the primitives generated by the tessellation process. Thus, a model of a scene is represented by a smaller number of high-order primitives (to save memory or bandwidth), and additional detail is added by tessellating the high-order primitives.

[0020] Domain shader 224 inputs the domain location and (optionally) other patch data. Domain shader 224 operates on the provided information and generates a single vertex for output based on the input domain location and other information. In the illustrated embodiment, domain shader 224 generates primitive 222 based on triangle 211 and tessellation factors. Geometry shader 226 receives input primitives and outputs up to four primitives that are generated by geometry shader 226 based on the input primitives. In the illustrated embodiment, geometry shader 226 generates output primitive 228 based on tessellated primitive 222.

[0021] One stream of primitives is provided to one or more scan converters 230, and in some embodiments, up to four streams of primitives are concatenated into buffers within storage resources 205. Scan converters 230 perform shading operations and other operations such as clipping, perspective division, shearing, and viewport selection. Scan converters 230 generate sets of pixels 232 that are subsequently processed in pixel processing unit 202 of graphics pipeline 200.

[0022] In the illustrated embodiment, pixel shader 234 inputs a pixel flow (e.g., including set of pixels 232) and outputs zero or another pixel flow depending on the input pixel flow. Output merger block 236 performs blending, depth, stencil, or other operations on the pixels received from pixel shader 234.

[0023] Some or all of the shaders in graphics pipeline 200 perform texture mapping using texture data stored in storage resources 205. For example, pixel shader 234 may read texture data from storage resources 205 and shade one or more pixels using the texture data. The shaded pixels are then provided to a display for presentation to a user. As described herein, texture data used by shaders in graphics pipeline 200 is cached using cache 207. Dirty cache lines in cache 207 are written back concurrently with processing a frame in graphics pipeline 200 using the data in cache 207.

[0024] Figure 3 is a block diagram of a portion of a memory system 300, according to some embodiments. Memory system 300 may be implemented in some embodiments of processing system 100 shown in Figure 1 and graphics pipeline 200 shown in Figure 2. Memory system 300 includes a cache 305 that includes cache lines 310, 311, 312, and 313, collectively referred to herein as "cache lines 310-313." Data used by the graphics pipeline is fetched into one or more of cache lines 310-313 using read / write circuitry 320, which sends requests 325 to SMC 330. SMC 330 processes request 325 by fetching the requested data from the corresponding memory and providing the requested data to read / write circuitry 320, which writes the requested data into one of cache lines 310-313.

[0025] The read / write circuit 320 writes data in dirty cache lines 310-313 back to memory via the SMC 330 during transitions between frames being processed in the graphics pipeline. The read / write circuit 320 also writes data in some of the dirty cache lines 310-313 back to memory via the SMC 330 at the same time that the read / write circuit 320 processes a frame using data in the cache 305. The data in the dirty cache lines 310-313 is retained in the cache 305, and the dirty cache lines 310-313 are marked to indicate that the data has been written back. Thus, the dirty cache lines 310-313 are treated as clean cache lines that do not need to be written back to memory during transitions between frames. In the illustrated embodiment, the cache 305 includes status markers 335 associated with the cache lines 310-313. Status marker 335 indicates that cache lines 310 and 313 are clean (i.e., the data in cache lines 310 and 313 has not been modified during processing and therefore corresponds to the data currently stored at the associated address in memory) and that cache line 311 is dirty (i.e., the data in cache line 311 has been modified during processing but has not yet been written back to memory). Status marker 335 also indicates that cache line 312 is in a clean / writeback (CLEAN / WB) state, which indicates that cache line 312 is dirty but can be treated as a clean cache line during frame transitions because the data in cache line 312 has been written back to memory.

[0026] In some embodiments, the read / write circuit 320 includes in the request 325 a hint indicating the priority associated with the request to write back data from a dirty cache line. The hint is determined based on the read command occupancy, i.e., the occupancy of a queue or buffer within the SMC 330 that contains pending read commands that have not yet been processed by the SMC 330. If the read command occupancy is relatively low, the hint indicates that the request 325 to write back data from a dirty cache line to memory should be processed as soon as possible. However, if the read command occupancy is relatively high, the hint indicates that the request 325 has a relatively low priority. Thus, the SMC 330 processes the pending read commands (instead of the low-priority write request 325) until the read command occupancy falls below a threshold. If the read command occupancy is above a maximum threshold, the read / write circuit 320 bypasses sending the request 325 and writes back information to the dirty cache lines 310-313.

[0027] 4 is a flow diagram of a method 400 for selectively writing back dirty cache lines while processing a frame using data in the cache, according to some embodiments. The method 400 is implemented in some embodiments of the processing system 100 shown in FIG. 1, the graphics pipeline 200 shown in FIG. 2, and the memory system 300 shown in FIG. 3.

[0028] In block 405, the read / write circuitry determines the read command occupancy in the SMC in the memory subsystem, including the cache, which indicates the fullness of the queue or buffer used to hold pending read commands in the SMC.

[0029] At decision block 410, the read / write circuit determines whether the read command occupancy is less than a first threshold. If so, method 400 proceeds to block 415, where the read / write circuit sends a request for SMC writeback data in one or more dirty cache lines in the cache. If the read command occupancy is greater than the first threshold, method 400 proceeds to decision block 420.

[0030] At decision block 420, the read / write circuitry determines whether the read command occupancy is greater than a first threshold and less than a second threshold that is greater than the first threshold. If so, method 400 proceeds to block 425, where the read / write circuitry requests that the SMC write data back to one or more dirty cache lines in the cache. The request includes a hint indicating that the request to write back the data is of lower priority than continuing to process requests in the read command queue or buffer. If the read command occupancy is greater than the second threshold, method 400 proceeds to block 430, where the read / write circuitry bypasses sending a request to write the dirty cache lines back to the SMC (i.e., bypasses writing back the dirty cache lines).

[0031] A computer-readable storage medium includes any non-transitory storage medium or combination of non-transitory storage media that can be accessed by a computer system during use to provide instructions and / or data to the computer system. Such storage media may include, but are not limited to, optical media (e.g., compact discs (CDs), digital versatile discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tape, magnetic hard drives), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or micro-electromechanical systems (MEMS)-based storage media. The computer-readable storage medium (e.g., system RAM or ROM) may be internal to the computing system, the computer-readable storage medium (e.g., a magnetic hard drive) may be permanently attached to the computing system, the computer-readable storage medium (e.g., an optical disk or Universal Serial Bus (USB)-based flash memory) may be removably attached to the computing system, or the computer-readable storage medium (e.g., network-accessible storage (NAS)) may be coupled to the computer system via a wired or wireless network.

[0032] In some embodiments, some aspects of the above techniques may be implemented by one or more processors of a processing system executing software. The software includes one or more sets of executable instructions stored in or tangibly embodied on a non-transitory computer-readable storage medium. The software may include instructions and specific data that, when executed by one or more processors, operate the one or more processors to perform one or more aspects of the above techniques. The non-transitory computer-readable storage medium may include, for example, a magnetic or optical disk storage device, a solid-state storage device such as flash memory, a cache, a random access memory (RAM), or one or more other non-volatile memory devices. The executable instructions stored on the non-transitory computer-readable storage medium may be source code, assembly language code, object code, or other instruction formats that can be interpreted or executed by one or more processors.

[0033] In addition to the above, it should be noted that not all activities or elements described in the summary description are required, that some of the particular activities or devices may not be required, that one or more additional activities may be performed, and that one or more additional elements may be included. Furthermore, the order in which the activities are listed is not necessarily the order in which they are performed. Also, the concepts have been described with reference to specific embodiments. However, those skilled in the art will recognize that various modifications and variations can be made without departing from the scope of the invention as set forth in the claims. Accordingly, the specification and drawings should be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention.

[0034] Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems, and features from which any benefit, advantage, or solution may arise or be manifested are not construed as critical, essential, or essential features of any or all claims. Moreover, the specific embodiments described above are illustrative only, since the disclosed invention may be modified and practiced in different, but similar manners apparent to those skilled in the art having the benefit of the teachings herein. No limitations are intended to the details of construction or design herein shown, other than as described in the appended claims. It is therefore apparent that the specific embodiments described above may be altered or modified, and that all such variations are considered within the scope of the disclosed invention. Accordingly, the protection sought herein is set forth in the appended claims.

Claims

1. 1. An apparatus comprising: a cache including cache lines configured to store data used to process frames in a graphics pipeline; a processor implementing the graphics pipeline, the processor configured to process a first frame and, concurrently with the processing of the first frame, selectively write dirty cache lines back from the cache to memory based on read command occupancy in a system memory controller (SMC), wherein data in the dirty cache lines is kept in the cache and marked as clean after being written back to the memory; Device.

2. The processor is configured to transmit data in the dirty cache line to the SMC in response to the read command occupancy being less than a first threshold, and the SMC is configured to write the data received from the processor back to the memory.

10. The apparatus of claim 1.

3. the processor is configured to, in response to the read command occupancy being greater than the first threshold and less than a second threshold, send the data in the dirty cache line to the SMC along with a hint indicating that writing the data back to the memory is a low priority; 3. The apparatus of claim 2.

4. the SMC is configured, in response to receiving the hint, to process any pending read requests before writing the data back to the memory.

4. The apparatus of claim 3.

5. the processor is configured to bypass transmitting the data in the dirty cache line to the SMC in response to the read command occupancy being greater than the second threshold; 5. The apparatus of claim 4.

6. the processor is configured to, in response to the dirty cache line being marked as clean, bypass writing the dirty cache line back to the memory during a transition from the first frame to a second frame.

10. The apparatus of claim 1.

7. the processor is configured to write back data in dirty cache lines that are not marked as clean in response to completing processing of the first frame and starting processing of a second frame.

7. The apparatus of claim 6.

8. processing a first frame in a graphics pipeline using data stored in a cache line of a cache associated with the graphics pipeline; Selectively writing dirty cache lines back to memory based on read command occupancy in a system memory controller (SMC); retaining the data in the dirty cache line in the cache; marking the dirty cache line as clean after the dirty cache line has been written back to the memory. method.

9. writing back the dirty cache line includes transmitting data in the dirty cache line to the SMC in response to the read command occupancy being less than a first threshold; 9. The method of claim 8.

10. further comprising writing the data received from the SMC back to the memory.

10. The method of claim 9.

11. writing back the dirty cache line includes, in response to the read command occupancy being greater than the first threshold and less than a second threshold, sending the data in the dirty cache line to the SMC along with a hint indicating that writing back the data to the memory is a low priority.

11. The method of claim 9 or 10.

12. and, in the SMC, in response to receiving the hint, processing any pending read requests before writing the data back to the memory. The method of claim 11.

13. selectively writing back the dirty cache lines to the memory includes bypassing transmission of the data in the dirty cache lines to the SMC in response to the read command occupancy being greater than the second threshold.

13. The method of claim 12.

14. and, in response to the dirty cache line being marked as clean, bypassing writing the dirty cache line back to the memory during a transition from the first frame to a second frame.

9. The method of claim 8.

15. and further comprising, in response to completing processing of the first frame and starting processing of a second frame, writing back data in dirty cache lines that are not marked as clean.

15. The method of claim 14.

16. 1. An apparatus comprising: a set of compute units configured to implement a graphics pipeline; a last level cache (LLC) in a cache hierarchy associated with the set of compute units, the compute units configured to selectively write back the dirty cache lines from the LLC to memory based on a read command occupancy in a system memory controller (SMC) concurrently with processing a first frame based on data stored in dirty cache lines, the dirty cache lines being marked as clean after being written back to the memory; Device.

17. the computing unit is configured to bypass writing back dirty cache lines to the memory during a transition from the first frame to a second frame in response to the dirty cache lines being marked as clean, and the computing unit is configured to write back data in dirty cache lines that are not marked as clean in response to completing processing of the first frame and starting processing of a second frame.

17. The apparatus of claim 16.

Citation Information

Patent Citations

  • Disk cache control system

    JP2001318832A

  • Printing device and data processing method

    JP2006256105A

  • Plotting device and data transferring method

    JP2007172455A

  • Semiconductor device and bus generator

    JP2019114015A

  • Control mechanism for fine-tuned cache to backing-store synchronization

    US20140122809A1