WO2017019042A1 - Hardware flush assist - Google Patents

Hardware flush assist Download PDF

Info

Publication number
WO2017019042A1
WO2017019042A1 PCT/US2015/042500 US2015042500W WO2017019042A1 WO 2017019042 A1 WO2017019042 A1 WO 2017019042A1 US 2015042500 W US2015042500 W US 2015042500W WO 2017019042 A1 WO2017019042 A1 WO 2017019042A1
Authority
WO
WIPO (PCT)
Prior art keywords
flush
memory
address
cache
offset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/US2015/042500
Other languages
French (fr)
Inventor
Derek Alan Sherlock
Shawn Walker
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hewlett Packard Enterprise Development LP
Original Assignee
Hewlett Packard Enterprise Development LP
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett Packard Enterprise Development LP filed Critical Hewlett Packard Enterprise Development LP
Priority to PCT/US2015/042500 priority Critical patent/WO2017019042A1/en
Priority to US15/747,755 priority patent/US10489298B2/en
Publication of WO2017019042A1 publication Critical patent/WO2017019042A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • G06F12/0817Cache consistency protocols using directory methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0873Mapping of cache memory to specific storage devices or parts thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory

Definitions

  • FIG. 1 is a block diagram of a computing device that may be used to assist a flush of a cache
  • FIG. 2A is a diagram of a system with data transfers in a load-store model as described herein;
  • FIG. 2B is a diagram of a system with data transfers with a hardware cache assist in a load-store model as described herein;
  • FIG. 3 is a process flow diagram of a method for a hardware flush assist.
  • CPU central processing unit
  • a flush, flush operation, or flush instruction is the transfer of data from a cache to another level of memory.
  • the flush operation is performed from the cache to a non-volatile memory.
  • the present techniques are described using a flush, flush operation, or flush instruction. However, the present techniques can be applied to any instruction where data is transferred from a first regions to another location.
  • Synchronization barrier instructions to enable notifications to software when all previously-issued flush operations have completed. These barrier instructions prevent race condition hazards that might otherwise occur if, for example, a stored data record were marked as being valid before the content of the record was in fact valid.
  • the software can delay marking the record as valid until its content is known to already be written to persistent memory.
  • the instructions for flushing and for synchronization barriers are intended for relatively low-volume tasks, such as synchronizing data structures shared between caches lacking hardware coherency.
  • the flushing and synchronization barriers are used to synchronize data and instruction caches in self-modifying code, or to synchronize page table updates with translation caches.
  • the flush instructions and synchronization barriers may not be well-suited to high volume use.
  • these instructions may lead to poor system performance when applied to high volume usage models. This poor system performance is a result of small tracker sizes, lack of pipelining and concurrency optimization, etc.
  • Fig. 1 is a block diagram of a computing device 100 that may be used to assist a flush of a cache.
  • the computing device 100 may be, for example, a laptop computer, desktop computer, ultrabook, tablet computer, mobile device, or server, among others.
  • the computing device 1 00 may include a central processing unit (CPU) 102 that is configured to execute stored instructions, as well as a memory device 1 04 that stores instructions that are executable by the CPU 102.
  • the computing device 100 may also include a cache 106 and non-volatile memory 1 08.
  • the CPU may be coupled to the memory device 104, cache 106, and non-volatile memory 108 by a bus 1 1 0.
  • the CPU 102 can be a single core processor, a multi-core processor, a computing cluster, or any number of other configurations.
  • the computing device 100 may include more than one CPU 102.
  • the memory device 104 can include random access memory (RAM), read only memory (ROM), flash memory, or any other suitable memory systems.
  • the memory device 104 may include dynamic random access memory (DRAM).
  • the cache 106 may be a smaller, faster memory that stores a smaller subset of frequently used data for the CPU 102.
  • the cache 106 is a multi-level cache. Additionally, the cache 106 may be integrated with the memory device 104.
  • a larger data set may be stored in a non-volatile memory 108.
  • the non-volatile memory 108 may be a physical memory such as a hard drive, an optical drive, a thumbdrive, an array of drives, or any combinations thereof.
  • the non-volatile memory 108 may also include remote storage drives.
  • the amount of time for the CPU 102 to access data stored in the non-volatile memory 108 may be slower relative to the amount of time it takes for the CPU 1 02 to access the cache 106.
  • the computing device 100 may also include a graphics processing unit (GPU) 1 12. As shown, the CPU 102 may be coupled through the bus 1 1 0 to the GPU 1 12. The GPU 1 12 may be configured to perform any number of graphics operations within the computing device 100. For example, the GPU 1 12 may be configured to render or manipulate graphics images, graphics frames, videos, or the like, to be displayed to a user of the computing device 100.
  • the computing device 100 may also include a memory controller 1 14.
  • the memory controller may include a flush assist 1 1 5, which is a set of hardware that is to provide a pre-flush of the cache when a flush instruction from the core is detected as further described below.
  • the memory controller is a home agent for the non-volatile memory 108. As used herein, a home agent is an entity that controls access to the non-volatile memory 108. The home agent can keep track of the status of data stored at the non-volatile memory 108.
  • the CPU 102 may also be connected through the bus 1 10 to an input/output (I/O) device interface 1 16 configured to connect the computing device 100 to one or more I/O devices 1 18.
  • the I/O devices 1 18 may include, for example, a keyboard and a pointing device, wherein the pointing device may include a touchpad or a touchscreen, among others.
  • the I/O devices 1 18 may be built-in components of the computing device 100, or may be devices that are externally connected to the computing device 100.
  • the CPU 102 may be linked through the bus 1 10 to a display interface 120 configured to connect the computing device 100 to display devices 1 22.
  • the display devices 122 may include a display screen that is a built-in component of the computing device 100.
  • the display devices 122 may also include a computer monitor, television, or projector, among others, that is externally connected to the computing device 100.
  • the computing device 100 may also include a network interface controller (NIC) 124 may be configured to connect the computing device 100 through the bus 1 10 to a network 1 26.
  • the network 126 may be a wide region network (WAN), local region network (LAN), or the Internet, among others.
  • FIG. 1 The block diagram of Fig. 1 is not intended to indicate that the computing device 1 00 is to include all of the components shown in Fig. 1 . Further, the computing device 100 may include any number of additional components not shown in Fig. 1 , depending on the details of the specific implementation.
  • the non-volatile memory may be mapped for direct load-store access by the CPU.
  • the CPU may access a memory address of the non-volatile memory via load and store operations. Values for an operation can be loaded from the non-volatile memory and placed in the cache. Following the operation, the result is to be stored back to the non-volatile memory.
  • CPU performance can largely on the speed at which data is transferred between the cache and non-volatile memory.
  • Most CPU caches are designed to function with pressure-eviction as the primary method of writing modified data to memory. Thus, there is little control of the precise moment when
  • non-volatile stored data i.e. persistence
  • data integrity concerns such as database and file system Atomicity, Consistency, Isolation, Durability (ACID) requirements depend upon some measure of control of write commitment timing. By pre-flushing the cache, the modification of the nonvolatile store data can be performed quick enough to meet the database and file system ACID requirements.
  • Fig. 2A is a diagram of a system 200A with data transfers in a load-store model as described herein.
  • the system 200A includes a core 202, a cache 204, a home agent (HA) 206, and a memory 208.
  • the core 202 may be a processing unit, such as the CPU 102 (Fig. 1 ) described above.
  • the cache may be the cache 106 (Fig. 1 ) described above.
  • the home agent 206 is to control access to the memory 208.
  • the home agent 206 is a memory controller 1 14 (Fig. 1 ) as described above.
  • the memory 208 may be a non-volatile memory 108 (Fig. 1 ) as described above.
  • the core 202 issues a flush 21 OA to the cache 204.
  • the cache 204 proceeds to execute the flush by issuing a dirty write back flush 21 OB to the home agent 206.
  • the home agent 206 then writes the data to the memory 208 with a write 21 OC.
  • the memory 208 issues a write done 21 OD to the home agent 206 to indicate that the write is complete.
  • the home agent issues a complete 21 OE to the cache 204.
  • the cache 204 then issues a complete 21 OF to the core 202.
  • a flush 212A is sent to the cache 204 upon receipt of the complete 21 OF, which indicates that the flush 21 OA instruction has completed.
  • the flush 212A waits for completion 21 OF of the flush 21 OA.
  • the flush 214A waits for the completion 212F of the flush 212A, and the flush 21 6A waits for the completion 214F of the flush 214A.
  • Each of the flush 21 OA, 212A, 214A, and 216A are illustrated as ordered and occurring one at a time for ease of description. However, the flushes may be performed in parallel. The number of flushes performed in parallel may be determined according to the capabilities of the core 202.
  • each of the flush 21 OA, 212A, 214A, and 216A are dependent in part upon a dirty write back flush 21 0B, 212B, 214B, and 216B.
  • a dirty area of the cache is one that has been updated by the CPU.
  • the dirty area of the cache is incoherent with the corresponding data address in memory.
  • a dirty write back occurs to update the corresponding data address with data from the cache, thus creating a coherent region of the cache.
  • the core 202 issues flush instructions that walks through an area of memory, region by region, in order to create cache coherency. Writes to non-volatile memory, such as each write 210C, 21 2C, 214C, and 216C can consume a large amount.
  • the write latency of non-volatile memory is several orders of magnitude higher than that of volatile memory.
  • the write latency that occurs with dirty write backs can cause the system to fail to meet database ACID requirements.
  • the ACID requirements are a set of properties that guarantee that database transactions are processed reliably.
  • snoops are a normal part of volatile memory operations. Processors typically support high snoop rates along with many concurrent snoops and many concurrent resulting dirty write backs.
  • a snoop is a speculative technique where cache activity is monitored in order to locate any activity that may cause regions of the cache to become invalid according to a cache protocol. The snoops can be applied to a cache flushing to non-volatile memory, and a pre-flush can be performed based on the snoop.
  • Fig. 2B is a diagram of a system 200B with data transfers with a hardware flush assist in a load-store model as described herein.
  • the system 200B is similar to Fig. 2A, and includes a core 202, a cache 204, a home agent (HA) 206, and a memory 208 as described above.
  • the home agent 206 monitors the cache for activity that can cause incoherent regions.
  • the home agent 206 may also issue one or more snoops. As illustrated, the home agent 206 issues snoop 212G, snoop 214G, and snoop 216G.
  • Each snoop is directed to a region of memory offset from the address of the flush 21 OA.
  • the snoop is offset from the address of the flush 21 OA such that if the core is sequentially stepping though an area of memory, region by region, where all regions are clean, it traverses the address from the flush 21 OA to the offset in the time it takes for a dirty flush to complete. While the snoop 21 2G, snoop 214G, and snoop 216G are illustrated separately, the snoops may occur in parallel or at the same time.
  • the snoops 212G, 214G, and 21 6G cause a series of speculative memory writes.
  • Reference number 220 illustrates data transfers as a result of the snoops 212G, 214G, and 21 6G.
  • the dirty write back flush 212B, 214B, and 216B each occur as a result of their respective snoop.
  • a set of memory writes 222 is to pre- flush the regions of memory that would be subsequently flushed by the flush 21 2A, flush 214A, and flush 216A.
  • the memory writes 222 includes the writes 212C, 214C, and 216C.
  • the series of memory writes 222 results in a series of write dones 224.
  • the write dones 224 includes each write done 21 OD, 212D, 214D, and 21 6D. Since the write done 21 OC has issued, the home agent issues a complete 21 OE to the cache 204. The cache 204 then issues a complete 21 OF to the core 202.
  • a flush 212A is sent to the cache 204 upon receipt of the complete 21 OF, which indicates that the flush 21 OA instruction has completed. However, the area of the cache to be flushed according to the core 202 instruction has been previously flushed via the snoop 212G, memory writes 222, and write dones 224.
  • a flush clean 212G instruction is sent to the home agent 206, which can immediately return the complete 212E since a series of write dones 224 has previously indicated that the instructed write to memory 208 is complete. In this manner, each flush instruction from the CPU encounters a pre-flushed region of memory that is clean.
  • Fig. 2B illustrates a single flush instructions for ease of description. As noted above, several flush instructions may be performed in parallel.
  • FIG. 3 is a process flow diagram of a method 300 for a hardware flush assist.
  • a flush instruction is detected a flush instruction at address N.
  • Flush instructions result in activity visible to the home agent, as the home agent is responsible for issuing snoops to other caches in other parts of the system.
  • the flush activity is a trigger for snoops according to the present techniques.
  • a hardware engine is located in the memory controller, which is also the home agent for the memory region.
  • the hardware engine takes advantage of the high-performance, highly concurrent snoop capabilities, to assist software flush loops, by "pre-flushing" ahead of the software using snoop flows.
  • the home agent receives a flush for address N (the instruction may cause a write if dirty or an invalidate if clean), it performs the flush as normal. This flush is blocking, where the underlying flush instruction blocks until persistence is achieved.
  • a memory location at the address N plus an offset is snooped.
  • the home agent receives a flush for address N, it also snoops the cache line at another address N+OFFSET, and writes any resulting dirty data to nonvolatile memory. This snoop/write back is non-blocking. It is speculative, designed to pre-clean or pre-flush the memory ahead of the future stream of software-initiated Clean or flush instructions. If the software is sequentially flushing a region of memory, by the time it reaches and attempts to flush address N+OFFSET, it is most likely to encounter an already- clean cache line, because the prior speculative snoop has was issued earlier when cache line N was flushed. Thus, for sequential flushes or cleans of large areas, software flush loops encounter mostly already-clean cache lines. Clean cache line flushes proceed faster than dirty ones, because they do not have to wait for the non-volatile memory device write latency.
  • OFFSET is chosen such that, when a software flush loop is progressing sequentially through a memory region for which all cache lines are already clean, it will traverse the range from address N to address N+OFFSET in approximately the amount of time that it takes for a dirty flush to complete to nonvolatile memory. This allows the speculative snoops to pre-flush memory just far enough ahead of the software loop that cache lines are seldom ever hit by flush instructions while still dirty.
  • a region of memory at the address N plus the offset is pre- flushed.
  • the primary mechanism by which this invention speeds a flush operation, then, is by allowing the software to see mostly low-latency fast flushing clean cache lines, while the home-agent hardware behind the scenes is pre-flushing dirty cache lines before the software flush loop ever reaches them.
  • the techniques described herein reduce the time associated with cache flushes, without affecting the native flush instructions.
  • the hardware techniques disclosed assists with the performance of software that is coded using only the native flush instructions. In this manner, there is no disruptive recoding of software necessary.
  • this approach also works with native flush instructions that have been specifically tailored for load-store mapped nonvolatile memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

An apparatus for assisting a flush of a cache is described herein. The apparatus comprises processing element. The processing element is to probe a cache line at an offset address and write the cache line at the offset address to a non-volatile memory in response to a flush instruction at a first address.

Description

HARDWARE FLUSH ASSIST
BACKGROUND
[0001] The advent of cloud computing and handheld devices has increased the demand for faster and more reliable access to data. Database performance relies heavily on the average access time of storage by a processor. Systems heretofore utilize various techniques to enhance the performance of data transfers between processors and storage.
BRIEF DESCRIPTION OF THE DRAWINGS
[0002] The advantages of the present examples are better understood by referring to the following detailed description and the attached drawings, in which:
[0003] Fig. 1 is a block diagram of a computing device that may be used to assist a flush of a cache;
[0004] Fig. 2A is a diagram of a system with data transfers in a load-store model as described herein;
[0005] Fig. 2B is a diagram of a system with data transfers with a hardware cache assist in a load-store model as described herein; and
[0006] Fig. 3 is a process flow diagram of a method for a hardware flush assist.
[0007] The same numbers are used throughout the disclosure and the figures to reference like components and features. Numbers in the 100 series refer to features originally found in Fig. 1 ; numbers in the 200 series refer to features originally found in Fig. 2; and so on.
DETAILED DESCRIPTION
[0008] Most central processing unit (CPU) architectures enable cache
management instructions which explicitly flush modified regions of the cache to memory under programmatic control. The region of the cache may be a cache line. Additionally, this is type of instruction is often termed a flush operation when the cache line is also invalidated, or a clean operation when the cache line remains valid. As used herein, a flush, flush operation, or flush instruction is the transfer of data from a cache to another level of memory. In some embodiments, the flush operation is performed from the cache to a non-volatile memory. For ease of description, the present techniques are described using a flush, flush operation, or flush instruction. However, the present techniques can be applied to any instruction where data is transferred from a first regions to another location.
[0009] Synchronization barrier instructions to enable notifications to software when all previously-issued flush operations have completed. These barrier instructions prevent race condition hazards that might otherwise occur if, for example, a stored data record were marked as being valid before the content of the record was in fact valid. By flushing the record contents and then using a
synchronization barrier to ascertain that the flush was complete, the software can delay marking the record as valid until its content is known to already be written to persistent memory.
[0010] In CPU architectures that include a blocking direct memory access (DMA) model for non-volatile memory access and a load-store model for volatile memory access, the instructions for flushing and for synchronization barriers are intended for relatively low-volume tasks, such as synchronizing data structures shared between caches lacking hardware coherency. For example, the flushing and synchronization barriers are used to synchronize data and instruction caches in self-modifying code, or to synchronize page table updates with translation caches. As a result, the flush instructions and synchronization barriers may not be well-suited to high volume use. For example, these instructions may lead to poor system performance when applied to high volume usage models. This poor system performance is a result of small tracker sizes, lack of pipelining and concurrency optimization, etc.
[0011] Applying a load-store model to non-volatile memory places demands upon these instructions that can result in high volume use. For example, a database designed to operate directly within non-volatile memory may end up doing most or all of its writes as part of commit sequences, which depend upon flush instructions rather than cache evictions to write the modifications into non-volatile memory. To maintain acceptable system performance when flush operations are applied to a non-volatile memory under a load-store model, hardware may be used to assist the flushing of a cache to non-volatile memory. Embodiments described herein include a memory controller architecture that assists with the process of flushing targeted regions of a cache to overcome performance limitations of the CPU's instruction- driven flush sequences. In some embodiments, based on an initial flush instruction, the cache is then flushed at an address that is offset from the address of the initial flush instruction.
[0012] Fig. 1 is a block diagram of a computing device 100 that may be used to assist a flush of a cache. The computing device 100 may be, for example, a laptop computer, desktop computer, ultrabook, tablet computer, mobile device, or server, among others. The computing device 1 00 may include a central processing unit (CPU) 102 that is configured to execute stored instructions, as well as a memory device 1 04 that stores instructions that are executable by the CPU 102. The computing device 100 may also include a cache 106 and non-volatile memory 1 08. The CPU may be coupled to the memory device 104, cache 106, and non-volatile memory 108 by a bus 1 1 0. Additionally, the CPU 102 can be a single core processor, a multi-core processor, a computing cluster, or any number of other configurations. Furthermore, the computing device 100 may include more than one CPU 102.
[0013] The memory device 104 can include random access memory (RAM), read only memory (ROM), flash memory, or any other suitable memory systems. For example, the memory device 104 may include dynamic random access memory (DRAM). The cache 106 may be a smaller, faster memory that stores a smaller subset of frequently used data for the CPU 102. In some embodiments, the cache 106 is a multi-level cache. Additionally, the cache 106 may be integrated with the memory device 104. A larger data set may be stored in a non-volatile memory 108. The non-volatile memory 108 may be a physical memory such as a hard drive, an optical drive, a thumbdrive, an array of drives, or any combinations thereof. The non-volatile memory 108 may also include remote storage drives. The amount of time for the CPU 102 to access data stored in the non-volatile memory 108 may be slower relative to the amount of time it takes for the CPU 1 02 to access the cache 106.
[0014] The computing device 100 may also include a graphics processing unit (GPU) 1 12. As shown, the CPU 102 may be coupled through the bus 1 1 0 to the GPU 1 12. The GPU 1 12 may be configured to perform any number of graphics operations within the computing device 100. For example, the GPU 1 12 may be configured to render or manipulate graphics images, graphics frames, videos, or the like, to be displayed to a user of the computing device 100. The computing device 100 may also include a memory controller 1 14. The memory controller may include a flush assist 1 1 5, which is a set of hardware that is to provide a pre-flush of the cache when a flush instruction from the core is detected as further described below. In some embodiments, the memory controller is a home agent for the non-volatile memory 108. As used herein, a home agent is an entity that controls access to the non-volatile memory 108. The home agent can keep track of the status of data stored at the non-volatile memory 108.
[0015] The CPU 102 may also be connected through the bus 1 10 to an input/output (I/O) device interface 1 16 configured to connect the computing device 100 to one or more I/O devices 1 18. The I/O devices 1 18 may include, for example, a keyboard and a pointing device, wherein the pointing device may include a touchpad or a touchscreen, among others. The I/O devices 1 18 may be built-in components of the computing device 100, or may be devices that are externally connected to the computing device 100.
[0016] The CPU 102 may be linked through the bus 1 10 to a display interface 120 configured to connect the computing device 100 to display devices 1 22. The display devices 122 may include a display screen that is a built-in component of the computing device 100. The display devices 122 may also include a computer monitor, television, or projector, among others, that is externally connected to the computing device 100. The computing device 100 may also include a network interface controller (NIC) 124 may be configured to connect the computing device 100 through the bus 1 10 to a network 1 26. The network 126 may be a wide region network (WAN), local region network (LAN), or the Internet, among others.
[0017] The block diagram of Fig. 1 is not intended to indicate that the computing device 1 00 is to include all of the components shown in Fig. 1 . Further, the computing device 100 may include any number of additional components not shown in Fig. 1 , depending on the details of the specific implementation.
[0018] In examples, the non-volatile memory may be mapped for direct load-store access by the CPU. In a load-store architecture, the CPU may access a memory address of the non-volatile memory via load and store operations. Values for an operation can be loaded from the non-volatile memory and placed in the cache. Following the operation, the result is to be stored back to the non-volatile memory. In the load-store model, CPU performance can largely on the speed at which data is transferred between the cache and non-volatile memory. Most CPU caches are designed to function with pressure-eviction as the primary method of writing modified data to memory. Thus, there is little control of the precise moment when
modification to non-volatile stored data (i.e. persistence) occurs. However, data integrity concerns, such as database and file system Atomicity, Consistency, Isolation, Durability (ACID) requirements depend upon some measure of control of write commitment timing. By pre-flushing the cache, the modification of the nonvolatile store data can be performed quick enough to meet the database and file system ACID requirements.
[0019] Fig. 2A is a diagram of a system 200A with data transfers in a load-store model as described herein. The system 200A includes a core 202, a cache 204, a home agent (HA) 206, and a memory 208. The core 202 may be a processing unit, such as the CPU 102 (Fig. 1 ) described above. Similarly, the cache may be the cache 106 (Fig. 1 ) described above. The home agent 206 is to control access to the memory 208. In some embodiments, the home agent 206 is a memory controller 1 14 (Fig. 1 ) as described above. Moreover, the memory 208 may be a non-volatile memory 108 (Fig. 1 ) as described above.
[0020] Under normal operations, the core 202 issues a flush 21 OA to the cache 204. In response to the flush 21 OA from the core 202, the cache 204 proceeds to execute the flush by issuing a dirty write back flush 21 OB to the home agent 206. The home agent 206 then writes the data to the memory 208 with a write 21 OC. Upon completion of the write 21 OC, the memory 208 issues a write done 21 OD to the home agent 206 to indicate that the write is complete. Subsequently, the home agent issues a complete 21 OE to the cache 204. The cache 204 then issues a complete 21 OF to the core 202. A flush 212A is sent to the cache 204 upon receipt of the complete 21 OF, which indicates that the flush 21 OA instruction has completed. Thus, the flush 212A waits for completion 21 OF of the flush 21 OA. Likewise, the flush 214A waits for the completion 212F of the flush 212A, and the flush 21 6A waits for the completion 214F of the flush 214A. Each of the flush 21 OA, 212A, 214A, and 216A are illustrated as ordered and occurring one at a time for ease of description. However, the flushes may be performed in parallel. The number of flushes performed in parallel may be determined according to the capabilities of the core 202.
[0021] As illustrated, the time that it takes to complete each of the flush 21 OA, 212A, 214A, and 216A are dependent in part upon a dirty write back flush 21 0B, 212B, 214B, and 216B. A dirty area of the cache is one that has been updated by the CPU. The dirty area of the cache is incoherent with the corresponding data address in memory. A dirty write back occurs to update the corresponding data address with data from the cache, thus creating a coherent region of the cache. The core 202 issues flush instructions that walks through an area of memory, region by region, in order to create cache coherency. Writes to non-volatile memory, such as each write 210C, 21 2C, 214C, and 216C can consume a large amount. The write latency of non-volatile memory is several orders of magnitude higher than that of volatile memory. In a load-store architecture, the write latency that occurs with dirty write backs can cause the system to fail to meet database ACID requirements. The ACID requirements are a set of properties that guarantee that database transactions are processed reliably.
[0022] Dirty write backs are a normal part of volatile memory operations.
Moreover, snoops are a normal part of volatile memory operations. Processors typically support high snoop rates along with many concurrent snoops and many concurrent resulting dirty write backs. In some embodiments, a snoop is a speculative technique where cache activity is monitored in order to locate any activity that may cause regions of the cache to become invalid according to a cache protocol. The snoops can be applied to a cache flushing to non-volatile memory, and a pre-flush can be performed based on the snoop.
[0023] Fig. 2B is a diagram of a system 200B with data transfers with a hardware flush assist in a load-store model as described herein. The system 200B is similar to Fig. 2A, and includes a core 202, a cache 204, a home agent (HA) 206, and a memory 208 as described above. The home agent 206 monitors the cache for activity that can cause incoherent regions. When the core 202 issues the flush 21 OA, the home agent 206 may also issue one or more snoops. As illustrated, the home agent 206 issues snoop 212G, snoop 214G, and snoop 216G. Each snoop is directed to a region of memory offset from the address of the flush 21 OA. In some embodiments, the snoop is offset from the address of the flush 21 OA such that if the core is sequentially stepping though an area of memory, region by region, where all regions are clean, it traverses the address from the flush 21 OA to the offset in the time it takes for a dirty flush to complete. While the snoop 21 2G, snoop 214G, and snoop 216G are illustrated separately, the snoops may occur in parallel or at the same time.
[0024] Accordingly, while the dirty write back flush 21 OB and write 21 OC are executed, the snoops 212G, 214G, and 21 6G cause a series of speculative memory writes. Reference number 220 illustrates data transfers as a result of the snoops 212G, 214G, and 21 6G. The dirty write back flush 212B, 214B, and 216B each occur as a result of their respective snoop. A set of memory writes 222 is to pre- flush the regions of memory that would be subsequently flushed by the flush 21 2A, flush 214A, and flush 216A. The memory writes 222 includes the writes 212C, 214C, and 216C. The series of memory writes 222 results in a series of write dones 224. The write dones 224 includes each write done 21 OD, 212D, 214D, and 21 6D. Since the write done 21 OC has issued, the home agent issues a complete 21 OE to the cache 204. The cache 204 then issues a complete 21 OF to the core 202.
[0025] A flush 212A is sent to the cache 204 upon receipt of the complete 21 OF, which indicates that the flush 21 OA instruction has completed. However, the area of the cache to be flushed according to the core 202 instruction has been previously flushed via the snoop 212G, memory writes 222, and write dones 224. A flush clean 212G instruction is sent to the home agent 206, which can immediately return the complete 212E since a series of write dones 224 has previously indicated that the instructed write to memory 208 is complete. In this manner, each flush instruction from the CPU encounters a pre-flushed region of memory that is clean. No write to non-volatile memory is performed, and the cache is made coherent in less time, without non-volatile memory latency being associated with each flush instruction on a dirty region of the cache. Note that Fig. 2B illustrates a single flush instructions for ease of description. As noted above, several flush instructions may be performed in parallel.
[0026] Fig. 3 is a process flow diagram of a method 300 for a hardware flush assist. At block 302, a flush instruction is detected a flush instruction at address N. Flush instructions result in activity visible to the home agent, as the home agent is responsible for issuing snoops to other caches in other parts of the system.
Accordingly, the flush activity is a trigger for snoops according to the present techniques. In some embodiments, a hardware engine is located in the memory controller, which is also the home agent for the memory region. The hardware engine takes advantage of the high-performance, highly concurrent snoop capabilities, to assist software flush loops, by "pre-flushing" ahead of the software using snoop flows. When the home agent receives a flush for address N (the instruction may cause a write if dirty or an invalidate if clean), it performs the flush as normal. This flush is blocking, where the underlying flush instruction blocks until persistence is achieved.
[0027] At block 304, a memory location at the address N plus an offset is snooped. When the home agent receives a flush for address N, it also snoops the cache line at another address N+OFFSET, and writes any resulting dirty data to nonvolatile memory. This snoop/write back is non-blocking. It is speculative, designed to pre-clean or pre-flush the memory ahead of the future stream of software-initiated Clean or flush instructions. If the software is sequentially flushing a region of memory, by the time it reaches and attempts to flush address N+OFFSET, it is most likely to encounter an already- clean cache line, because the prior speculative snoop has was issued earlier when cache line N was flushed. Thus, for sequential flushes or cleans of large areas, software flush loops encounter mostly already-clean cache lines. Clean cache line flushes proceed faster than dirty ones, because they do not have to wait for the non-volatile memory device write latency.
[0028] The value of OFFSET is chosen such that, when a software flush loop is progressing sequentially through a memory region for which all cache lines are already clean, it will traverse the range from address N to address N+OFFSET in approximately the amount of time that it takes for a dirty flush to complete to nonvolatile memory. This allows the speculative snoops to pre-flush memory just far enough ahead of the software loop that cache lines are seldom ever hit by flush instructions while still dirty.
[0029] At block 306, a region of memory at the address N plus the offset is pre- flushed. The primary mechanism by which this invention speeds a flush operation, then, is by allowing the software to see mostly low-latency fast flushing clean cache lines, while the home-agent hardware behind the scenes is pre-flushing dirty cache lines before the software flush loop ever reaches them.
[0030] In this manner, the techniques described herein reduce the time associated with cache flushes, without affecting the native flush instructions. The hardware techniques disclosed assists with the performance of software that is coded using only the native flush instructions. In this manner, there is no disruptive recoding of software necessary. Moreover, this approach also works with native flush instructions that have been specifically tailored for load-store mapped nonvolatile memory.
[0031] While the present techniques may be susceptible to various modifications and alternative forms, the embodiments discussed above have been shown only by way of example. However, it should again be understood that the techniques are not intended to be limited to the particular embodiments disclosed herein. Indeed, the present techniques include all alternatives, modifications, and equivalents falling within the true spirit and scope of the appended claims.

Claims

CLAIMS What is claimed is:
1 . An apparatus for a hardware flush assist, comprising:
a processing element, wherein the processing element is to probe a cache line at an offset address and write the cache line at the offset address to a non-volatile memory in response to a flush instruction at a first address.
2. The apparatus of claim 1 , wherein the offset address is to be calculated as an offset of an address N received for a flush.
3. The apparatus of claim 1 , wherein the processing element is a hardware engine.
4. The apparatus of claim 1 , wherein probing the cache line is a snoop of the cache line.
5. The apparatus of claim 1 , wherein flush instructions are monitored by the processing element.
6. The apparatus of claim 1 , wherein the probe and write is non-blocking.
7. A system for a hardware flush assist, comprising:
a cache;
a memory;
a home agent, wherein the home agent is to detect a flush instruction on the cache at an address; and
a memory controller, wherein the memory controller comprises a
hardware engine, and the hardware engine is to snoop a region of the cache at an offset of the address, and write the region to the memory at the offset of the address.
8. The system of claim 7, wherein the memory controller is the home agent.
9. The system of claim 7, wherein the home agent is to detect a plurality of flush instructions on the cache at a plurality of addresses, and the hardware engine is to snoop a region of the cache at an offset of each of the plurality of addresses, and write the region to the memory at the offset of each of the plurality of addresses.
10. The system of claim 7, wherein the offset is a value that is traversed across a clean region of the cache from the address to the offset plus the address in an amount of time that a dirty flush is completed at the non-volatile memory.
1 1 . The system of claim 7, wherein the snoop is speculative.
12. A method for a hardware flush assist, comprising:
detecting a flush instruction at address N;
snooping a memory location at the address N plus an offset; and pre-flushing a region of memory at the address N plus the offset.
13. The method of claim 12, wherein the offset is selected such that the flush instruction traverses a range of addresses in a clean region of memory from the address to the address plus the offset in the time that it takes a dirty flush to complete to non-volatile memory.
14. The method of claim 12, wherein pre-flushing the region of memory is performed prior to a next flush instruction directed the address plus the offset.
15. The method of claim 12, wherein the snooping is concurrent with the flush instruction.
PCT/US2015/042500 2015-07-28 2015-07-28 Hardware flush assist Ceased WO2017019042A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/US2015/042500 WO2017019042A1 (en) 2015-07-28 2015-07-28 Hardware flush assist
US15/747,755 US10489298B2 (en) 2015-07-28 2015-07-28 Hardware flush assist

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2015/042500 WO2017019042A1 (en) 2015-07-28 2015-07-28 Hardware flush assist

Publications (1)

Publication Number Publication Date
WO2017019042A1 true WO2017019042A1 (en) 2017-02-02

Family

ID=57884928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2015/042500 Ceased WO2017019042A1 (en) 2015-07-28 2015-07-28 Hardware flush assist

Country Status (2)

Country Link
US (1) US10489298B2 (en)
WO (1) WO2017019042A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11249908B1 (en) * 2020-09-17 2022-02-15 Arm Limited Technique for managing coherency when an agent is to enter a state in which its cache storage is unused
CN117560422B (en) * 2023-11-27 2025-09-30 海光信息技术股份有限公司 Data processing method and device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6643766B1 (en) * 2000-05-04 2003-11-04 Hewlett-Packard Development Company, L.P. Speculative pre-fetching additional line on cache miss if no request pending in out-of-order processor
US20040158681A1 (en) * 2002-02-12 2004-08-12 Ip-First Llc Write back and invalidate mechanism for multiple cache lines
EP1555611A2 (en) * 2004-01-16 2005-07-20 IP-First LLC Microprocessor and apparatus for performing fast speculative pop operation from a stack memory cache
US20100235670A1 (en) * 2006-09-22 2010-09-16 Keller James B Fast L1 Flush Mechanism
US20140365736A1 (en) * 2013-06-10 2014-12-11 Lsi Corporation Hardware Based Cache Scan with Divert Node Handling

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5710906A (en) 1995-07-07 1998-01-20 Opti Inc. Predictive snooping of cache memory for master-initiated accesses
US6408363B1 (en) * 2000-05-04 2002-06-18 Hewlett-Packard Company Speculative pre-flush of data in an out-of-order execution processor system
US6691210B2 (en) 2000-12-29 2004-02-10 Stmicroelectronics, Inc. Circuit and method for hardware-assisted software flushing of data and instruction caches
US8285940B2 (en) * 2008-02-29 2012-10-09 Cadence Design Systems, Inc. Method and apparatus for high speed cache flushing in a non-volatile memory
US9678882B2 (en) * 2012-10-11 2017-06-13 Intel Corporation Systems and methods for non-blocking implementation of cache flush instructions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6643766B1 (en) * 2000-05-04 2003-11-04 Hewlett-Packard Development Company, L.P. Speculative pre-fetching additional line on cache miss if no request pending in out-of-order processor
US20040158681A1 (en) * 2002-02-12 2004-08-12 Ip-First Llc Write back and invalidate mechanism for multiple cache lines
EP1555611A2 (en) * 2004-01-16 2005-07-20 IP-First LLC Microprocessor and apparatus for performing fast speculative pop operation from a stack memory cache
US20100235670A1 (en) * 2006-09-22 2010-09-16 Keller James B Fast L1 Flush Mechanism
US20140365736A1 (en) * 2013-06-10 2014-12-11 Lsi Corporation Hardware Based Cache Scan with Divert Node Handling

Also Published As

Publication number Publication date
US10489298B2 (en) 2019-11-26
US20180217933A1 (en) 2018-08-02

Similar Documents

Publication Publication Date Title
JP7762783B2 (en) Victim cache with support for draining write miss entries
JP6707605B2 (en) Information sharing techniques between different cache coherence domains
CN108463808B (en) Event triggered programmable prefetcher
US7921275B2 (en) Method for enabling direct prefetching of data during asychronous memory move operation
US7941627B2 (en) Specialized memory move barrier operations
US9465744B2 (en) Data prefetch ramp implemenation based on memory utilization
KR100243853B1 (en) Method and apparatus for an improved memory architecture
US9645929B2 (en) Speculative permission acquisition for shared memory
US8356151B2 (en) Reporting of partially performed memory move
US20050154866A1 (en) Systems and methods for executing across at least one memory barrier employing speculative fills
JPH0619786A (en) Method and apparatus for maintenance of cache coference
EP4264905B1 (en) Data placement with packet metadata
US10552334B2 (en) Systems and methods for acquiring data for loads at different access times from hierarchical sources using a load queue as a temporary storage buffer and completing the load early
US10754791B2 (en) Software translation prefetch instructions
KR20230054447A (en) How to Execute Atomic Memory Operations in the Event of a Race
US20090198975A1 (en) Termination of in-flight asynchronous memory move
JP3195303B2 (en) Method and apparatus for maintaining coherency between an instruction cache and a data cache
US11687460B2 (en) Network cache injection for coherent GPUs
US20070005899A1 (en) Processing multicore evictions in a CMP multiprocessor
US10489298B2 (en) Hardware flush assist
CN105408877B (en) Method and apparatus for writing modified cache data to backing storage while retaining write access
US10740233B2 (en) Managing cache operations using epochs
US20150052293A1 (en) Hidden core to fetch data
US6484230B1 (en) Method and system for speculatively processing a load instruction before completion of a preceding synchronization instruction
US10025717B1 (en) Multi-dimensional prefetching

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15899833

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15747755

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15899833

Country of ref document: EP

Kind code of ref document: A1