GB2532545A - Processors and methods for cache sparing stores - Google Patents

Processors and methods for cache sparing stores Download PDF

Info

Publication number
GB2532545A
GB2532545A GB1514646.7A GB201514646A GB2532545A GB 2532545 A GB2532545 A GB 2532545A GB 201514646 A GB201514646 A GB 201514646A GB 2532545 A GB2532545 A GB 2532545A
Authority
GB
United Kingdom
Prior art keywords
store
cache line
processor
store instruction
cache
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.)
Granted
Application number
GB1514646.7A
Other versions
GB2532545B (en
GB201514646D0 (en
Inventor
J Rozario Ranjit
Nangia Era
Chandra Debasish
Sudhakar Ranganathan
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.)
Imagination Technologies Ltd
Original Assignee
Imagination Technologies Ltd
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 Imagination Technologies Ltd filed Critical Imagination Technologies Ltd
Priority to GB1617426.0A priority Critical patent/GB2545061B/en
Publication of GB201514646D0 publication Critical patent/GB201514646D0/en
Publication of GB2532545A publication Critical patent/GB2532545A/en
Application granted granted Critical
Publication of GB2532545B publication Critical patent/GB2532545B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/084Multiuser, multiprocessor or multiprocessing cache systems with a shared cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/38Concurrent instruction execution, e.g. pipeline, look ahead
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3824Operand accessing
    • G06F9/3834Maintaining memory consistency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0888Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using selective caching, e.g. bypass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1021Hit rate improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/45Caching of specific data in cache memory
    • G06F2212/452Instruction code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/608Details relating to cache mapping

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

As store instructions arrive 205 at the load store unit (LSU), the LSU determines 215, based on the destination address 211 for example, whether a counter is allocated to a cache line affected by each store. If not, the LSU allocates 220 a counter. If so, the LSU updates 217 the counter. Also, in response to a store instruction affecting a cache line neighbouring or adjacent to a cache line that has a counter 225 that meets a condition 227 such as a threshold, the LSU characterises that store instruction as one to be effected without obtaining ownership 230 of the affected cache line, and provides that store to be serviced by an element of the shared memory hierarchy, such as an L2 cache. This may reduce churn in a private L1 cache, i.e. cache pollution, when a memory copy operation, or an operation with a similar store pattern, is performed.

Description

PROCESSORS AND METHODS FOR CACHE SPARING STORES
BACKGROUND
Field:
10001] In one aspect, the following relates to processor microarchitecture and memory subsystems, and in one particular aspect, to approaches to processing memory transactions.
Related Art: 10002] Processors require data on which to operate. Many processor architectures support a set of registers (a register file) that store data that can be used as operands for instructions. Access to a register file is fast. However, an amount of data that can be stored in a register file is relatively small (on the order of 32 64 bit words) Main memory is orders of magnitude cheaper and more plentiful than a register file. However, accessing main memory also is orders of magnitude slower than accessing a register file. Cache memories are interposed between a register file and a main memory in order to reduce traffic to and from main memory. Caches are often managed by hardware (rather than controlled by software), although some processor architectures support capabilities to pre-fetch data into a cache, for example. Caches generally operate on a principal of temporal locality of reference to data, which means that data that was recently used is more likely to be used again.
SUNINIARV
10003] In an aspect, a process in a processor comprises receiving a first store instruction to be executed in a load store unit of the processor. The process identifies a destination address from the first store instruction and associates a counter with the destination address. The process also receives subsequent store instructions, and for each subsequent store instruction, determines whether a respective destination address of that store instruction is within a cache line of the first store instruction, and responsively updates the counter. The process determines whether the respective destination address of that store instruction is within a cache line subsequent to the cache line of the first store instruction, and if a current value of the counter meets a criteria, and then characterizes the store instruction to the subsequent cache line as being a store without ownership and emits the store to a shared cache level of a memory hierarchy coupled with the processor.
BRIEF DESCRIPTION OF THE DRAWING
100041 FIG. 1 depicts an example of a multicore processing system, in which different cores have private LI caches and a shared L2 cache, and coherency is managed by a coherency module; 10005_1 FIGs. 2A and 2B depicts block diagrams pertaining to an example processor which
can implement aspects of the disclosure;
10006_1 FIG. 3 depicts aspects of a Load Store unit according to the disclosure; 100071 FIGS. 4 and 5 depict example processes according to the disclosure; and 100081 FIG. 6 depicts a block diagram of an example hardware-oriented block diagram of a machine that can implement aspects of the disclosure.
DETAILED DESCRIPTION
10009] The following disclosure presents an example of a processor that supports storage of data in caches that are expected to conform to a temporality locality reuse model while also more efficiently supporting exceptional memory transactions that are expected to violate a temporal locality.
100101 FIG. 1 depicts an example block diagram of a processing system 31 in which a plurality of processor cores (cores 35 and 36 enumerated) are coupled with a coherence module 38 that includes a Level 2 (L2) cache 76 that is shared among the plurality of processor cores. Here, a processor core can include, for example, as a set of execution resources, including an instruction unit 32, execution pipelines 70, a register file 72, a private Level 1 (L1) data cache 74, a Load/Store Unit (LSU) 66, and a bus 105. Implementations may have processor cores that are single-threaded, multi-threaded, in-order, out of order, superscalar, and so on.
10011] The LI caches 74 may be write back caches, such that changes made by either processor core 35 or 36 to data in its LI cache 74 is not, as a matter of practice, immediately written also to the L2 cache 76, as with a write through cache. Instead, a coherency protocol may be employed that allows cache lines in each LI cache to be maintained in a modified, shared, exclusive, or invalid state, for example. Different cache coherence protocols exist, but in a general case for a write back cache, these protocols all serve to delay traffic to coherence module 38 from processor cores 35 and 36, while also serving to provide current data, on request from the cores and to order transactions from each core.
10012] When a processor core is to execute a store instruction, some approaches to cache coherency will perform a read for ownership of a cache-line-sized memory location that includes the effective address that is the target of the store instruction. The cache line is installed in the LI, which may cause an existing cache line in the LI to be evicted. Such eviction causes a write of the evicted cache line to L2 76, and eventually to a main memory. In many cases, the read for ownership is a desired outcome, so that the data can be localized to a core that may use it several times within a relatively short time span. However, some workloads may benefit from a different approach to store operations. Some workloads may effectively write an entire cache line but not reuse any portion of it. For example, a memory copy operation transfers a dataset from one area in memory to another area in memory. Such an operation does not need to provide temporal locality for portions of the dataset being moved. In such circumstances, by installing each cache line in the Ll cache, the Ll cache is churned such that miss rates for data that does have temporal locality may increase. As such, Applicants appreciate that differentiating memory access operations that do not benefit from caching from those that do yields a variety of benefits.
10013] FIG. 2A depicts an example diagram of functional elements of a processor 50 that supports 64-bit memory addressing according to aspects of the disclosure. The example elements of processor 50 will be introduced first, and then addressed in more detail, as appropriate. This example is of a processor that is capable of out of order execution; however, disclosed aspects can be used in an in-order processor implementation. As such, FIG. 2A depicts functional elements of a microarchitectural implementation of the disclosure, but other implementations are possible. Also, different processor architectures can implement aspects of the disclosure. The names given to some of the functional elements depicted in FIG. 2A may be different among existing processor architectures, but those of ordinary skill would understand from this disclosure how to implement the disclosure on different processor architectures, including those architectures based on preexisting architectures and even on a completely new architecture.
100141 Processor 50 includes a fetch unit 52, which is coupled with an instruction cache 54. Fetch unit 52 is responsible for retrieving data to be interpreted as instructions. Instruction cache 54 is coupled with a decode and rename unit 56. Decode and rename unit 56 is coupled with an instruction queue 58 and also with a branch predictor that includes an instruction Translation Lookaside Buffer (iTLB) 60. Instruction queue 58 is coupled with a ReOrder Buffer (ROB) 62 which is coupled with a commit unit 64. ROB 62 is coupled with reservation station(s) 68 and a Load/Store Unit (LSU) 66. Reservation station(s) 68 are coupled with Out of Order (00) execution pipeline(s) 70. Execution pipeline(s) 70 and LSB 66 each couple with a register file 72. LSU 66 performs loads and stores of data to and from memory. For example, LSU 66 may execute loads and stores of different sizes (e.g., byte, word, and double word.) 100151 Register file 72 couples with an LI data cache(s) 74. LI cache(s) 74 couple with an N-way interleaved L2 cache 76. Applications of the disclosure can be applied to direct-mapped caches and to fully associative caches, and an N-way interleaved cache is an example. In one example, N is 8 or 16, depending on a size of L2 cache 76. Processor 50 may also have access to further memory hierarchy elements 78. Fetch unit 52 obtains instructions from a memory (e.g., L2 cache 76, which can be a unified cache for data and instructions). Fetch unit 52 can receive directives from branch predictor 60 as to which instructions should be fetched.
100161 Functional elements of processor 50 depicted in FIG. 2A may be sized and arranged differently in different implementations. For example, instruction fetch 52 may fetch 1, 2, 4, 8 or more instructions at a time. Decode and rename 56 may support different numbers of rename registers and queue 58 may support different maximum numbers of entries among implementations. ROB 62 may support different sizes of instruction windows, while reservation station(s) 68 may be able to hold different numbers of instructions waiting for operands and similarly LSB 66 may be able to support different numbers of outstanding reads and writes. Instruction cache 54 may employ different cache replacement algorithms and may employ multiple algorithms simultaneously, for different parts of the cache 54. Defining the capabilities of different microarchitecture elements involve a variety of tradeoffs beyond the scope of the present disclosure.
100171 Implementations of processor 50 may be single threaded or support multiple threads. Implementations also may have Single Instruction Multiple Data (SIMD) execution units. Execution units may support integer operations, floating point operations or both. Additional functional units can be provided for different purposes. For example, encryption offload engines may be provided. FIG. 2A is provided to give context for aspects of the disclosure that follow and not by way of exclusion of any such additional functional elements. This is a non-exhaustive enumeration of examples of design choices that can be made for a particular implementation of processor 50.
100181 FIG. 2B depicts that register file 72 of processor 50 may include 32 registers. Each of these registers contains 64-bits. Each register may be identified by a binary code associated with that register. In a simple example, 00000b identifies Register 0, 11111b identifies Register 31, and registers in between are numbered accordingly. Processor 50 performs computation according to specific configuration information provided by a stream of instructions. These instructions are in a format specified by the architecture of the processor. An instruction may specify one or more source registers, and one or more destination registers for a given operation. The binary codes for the registers are used within the instructions to identify different registers. The registers that can be identified by instructions can be known as "architectural registers", which present a large portion, but not necessarily all, of the state of the machine available to executing code. Implementations of a particular processor architectural may support a larger number of physical registers. Having a larger number of physical registers allows speculative execution of instructions that refer to the same architectural registers. Register file 72 may have different numbers and kinds of ports in different implementations. For example, some implementations may supply two ports, while others may supply more. Some implementations may have designated read ports and write ports.
100191 In some implementations, register file 72 has general purpose registers that are 64 bits in length. Cache line sizes may be 128, 256, 512 bits, or more, with most implementations having cache line sizes being either 256 or 512 bits. When data is transferred between memory locations, using the register file as an intermediary, data is transferred in increments equal to a size of the registers. Therefore, multiple store operations are required in order to transfer a cache-line sized portion of data (e.g., 8 for a 256 bit cache line or 16 for a 512 bit cache line).
10020] For convenience, and to generally depict a flow of data within a processor, functional module diagrams of processors often are depicted with separate lines between a register file 72 and various components, such as LI cache, Load/Store unit, an L2, and ALU, and so on. However, physical connectivity between these functional modules differs such a depiction. Rather, there are limited ports on a register file, and when one transaction is occurring, another transaction is not. Therefore, transactions on a register file are not without opportunity cost, and avoiding some such transactions may enable higher performance, by allowing others to proceed.
10021] A memory copy operation presents an example situation in which the algorithm may be trivially encoded by a loop that increments an effective read address and an effective write address, and includes a load instruction from the effective read address directed to a destination register, and a store instruction directing the register contents to the effective write address.
100221 Such a simplistic translation of the memory copy operation does not necessarily map well to specific processor architectures. For example, unrolling the loop to include a series of loads and stores may be a benefit. However, processors may block other pending reads and writes while waiting for a cache line to return. Also, many high performance processor cores support issue of multiple load and/tor store instructions on a single clock, such processors also may be multithreaded, and if supporting these capabilities, also are typically capable of executing instructions out of program order.
100231 In view of these various capabilities, Applicants provide an approach to detecting patterns of stores that present an opportunity to avoid private Ll cache pollution. Such approach can be implemented within a load/store unit of a processor core (e.g., LSU 66), and practiced as a process. More generally, circuitry that is operating under programmatic instruction control may implement aspects of the disclosure.
10024] FIG. 3 depicts aspects of how example AGU 67 may operate according to the disclosure. AGU 67 receives a store instruction 106. This store instruction may a store instruction from any of multiple threads, where threads 102 and 103 are depicted. Each thread for which instructions are being issued may include store instructions and other instructions to be processed. For example, each thread may include load instructions, and arithmetic instructions. In some situations, an instruction stream for a thread may be predominantly store instructions, load instructions or a mixture of load and store instructions. A mixture of instructions also may be affected based on what level of granularity an instruction stream is being considered. For example, a memory copy operation may be succinctly expressed as a loop, where contents of a current memory address is loaded into a register, and then a store instruction stores the contents that register into a different memory location. A respective effective address for each of the load and the store can be incremented. For example, if performing word-sized stores, in a byte-addressable memory, then each of these addresses may be incremented by four.
100251 Although this high-level conception is not incorrect, a compiler may attempt to optimize code to implement such a loop by unrolling the loop so that each iteration through the loop emits a plurality of load instructions and a plurality of store instructions without incrementing the counter. For example, in a processor that supports multiple instruction issue on a given clock cycle, unrolling the loop in such manner may be that four loads and four stores are processed each time through the loop. Latency to satisfy loads are often high relative to completion of other instructions, and may be variable, depending on a location of such data to be loaded.
100261 Also, processors typically address memory more granularly than an amount of data represented in a cache line. For example, load and store instructions may address 4 bytes or 8 bytes of data in a processing system with a 32 byte or a 64 byte cache line. As such, issuing a sequence of loads may cause LSU 66 to service these loads by obtaining ownership of a cacheline containing the effective address of each load. Obtaining ownership would involve installing each cache line in LI cache 74, which may involve evicting existing data for a location in LI cache 74 that will receive the cache line being installed. If a cache line containing the effective address of a store instruction is in LI cache 74, then that store instruction can be completed by updating data in LI cache 74 (assuming that the data is available to be modified under a cache coherency protocol being used). Then, that cache line may be written back to the memory hierarchy (e.g., L2 cache 76 in FIG. 1) at some point, such as according to demand for that cache line by processor core 36. In the case of a memory copy operation, it is unlikely that a cache line for a particular store instruction will be in Ll cache 74, at a time when a first instruction referencing that cache line is received at LSU 66. So, LSU 66 would typically generally a request for ownership of the now-referenced cache line, so that this cache line can be brought into Ll cache 74, for modification according to the store instruction. Loading this cache line into a location of LI cache 74 also may cause eviction of existing data in LI cache 74. In order to evict data from LI cache 74, memory transactions must be serviced.
10027] Although many conceptual processor microarchitecture diagrams show separate connections between an Ll 74, and a memory hierarchy, and between LI 74 and a register file 72, and between various functional units in execution pipelines 70 and register file 72, in reality, many of these conceptually separate data interconnects are implemented using the same physical resources. Therefore, additional transactions in order to service LI 74 may affect a capability to service other functions in processor core 35. Considered specifically in the context of an example of memory copy operations, both the sequence of loads and the sequence of stores has a tendency to churn LI cache, causing a large number of evictions, which in turn generate additional traffic to be serviced by a memory interface.
10028] Although the load and store instructions may initially originate from a single thread and the source code may be readily understandable, by a skilled artisan examining the source code, as causing a certain memory access pattern, from a perspective of LSU 66, the load and store instructions are just instructions to be performed. In a high performance processor, these instructions may be performed out of order, in dependence on readiness of some instructions to be performed and not others (e.g., for a store instruction, calculation of an effective address may have a dependency, or data to be stored may not be available). Also, multiple threads of instructions may be processed by processor core 35, and thus load instructions and store instructions may be arriving at LSU 66 for a plurality of threads. Another cost of this kind of memory access pattern are the updates to different tag structures that consume bandwidth required to service requests for other instructions, such as arithmetic instructions.
10029] FIGs. 3-5 depict an example approach to characterizing store instructions as either store instructions for which ownership of a cache line is to be obtained and those for which ownership of a cache line should not be obtained. In particular, FIG. 3 depicts an example of an implementation of portions of LSU 66, while FIGs. 5 and 6 depict aspects of example processes that can be implemented in LSU 66. In FIG. 3, using store instruction 106 as an example, store instruction 106 references registers Ra and Rd, and specifies an immediate 109. In FIG. 4, at 205, a store instruction is received.
100301 A value from Ra ($Ra 108) is to be added to immediate 109 in order to produce an effective address (EA) 110. A value from Rd ($Rd) is to be stored in EA 110. AGU 67 performs the addition of SRa. 108 and immediate 109 after contents of the register identified by Ra are provided to AGU 67. Pending calculation of EA 110, a location in a store queue 115 may be allocated for store instruction 106 (action 207 of FIG. 4). Once EA 110 is available (actions 209 and 211 of FIG. 4), EA 110 can be populated in the allocated location. Similarly, performance of store instruction 106 may await availability of data from the register identified by Rd. Store queue 115 may contain a field to hold such data (e.g., data fields 125-127, corresponding respectively to EA 110, 121 and 122). Other implementations may perform store operations in store queue 115 in response to data availability, such that data may not be stored in store queue 115 and store queue 115 may not have memory provided for such purpose.
100311 FIG. 3 depicts that a pool of counters 104 couples with AGU 67. Pool of counters 104 includes a plurality of counters, each of which provides a field for storing at least a portion of a memory address (130-132), a counter 135-137, and optionally, a thread identifier 140-142. AGU 67 includes compare logic 111, which is operable to compare at least a portion of EA 110 with values stored in address fields 130-132. In one example, a portion of a full address is stored in address fields 130-132 sufficient to uniquely identify a cache line. For example, in a byte-addressable memory, 32 byte cache line occupies 2'5 address bits, while a 64 byte cache line occupies 21'6 address bits. If 32 bit memory addresses are used, then address fields 130-132 may use 27 or 26 bits, for example. In FIG. 4, compare logic 111 may compare EA 110 with addresses in the address fields 130-132. At 215, if EA 110 is found to match a value in any of these address fields, then the value in the associated counter field is incremented at 217. Otherwise, a counter is allocated, at 220, to EA 110. Such allocation effectively initiates tracking of store instructions that address addresses within the same cache line as EA 110. In an example, each counter may be initialized to 0. Each counter may include a number of bits sufficient to count up to a number of store instruction required to move an entire cache line from one location to another in memory (e.g., for 4 byte stores and 32 byte cache lines, the counter may count up to 8, thus requiring 3 bits).
100321 At 225 in FIG. 4, it is determined whether a store instruction (e.g. store 106) is adjacent to a cache line that is associated with a counter. For example, the store instruction may reference an effective address in a cache line immediately subsequent to a cache line for which a counter is allocated. At 227, it is determined whether the counter value for that adjacent cache line meets a threshold value, and if so, then the store instruction is flagged as a store instruction that is to be serviced without a request for ownership of the cache line including the effective address for that store instruction. For example, cache line 1 may have a counter value of 5, meaning that 5 store instructions have been seen by LSU 66 that have effective addresses in that cache line. Then, LSU 66 receives a store instruction for which an effective address is in cache line 2. LSU 66 accesses the counter value for cache line 1, and compares that value to a threshold, and determines whether to process that received store instruction either with or without a request for ownership. In an example, a threshold may be set at one half, two thirds, three-fourths, or seven-eighths of a total possible number of unique stores to fill a cache line. The threshold may be set based on how aggressively the processor may reorder operations, how many threads are being processed, or which may be concurrently processed by the processor.
100331 At 225, 227 and 230 in FIG. 4, if any respective decision is negative, then the process may continue by receiving a subsequent store instruction at 205.
[0034] FIG. 5 depicts an example process to be implemented in LSU 66, in order to select store instructions to be performed. At 260, readiness of store instructions in store queue 115 is monitored, and it is determined at 262 whether a store instruction is ready for dispatch. At 264, if such store instruction is flagged as a 'no ownership' store, then at 266, that store is dispatched to be serviced in the memory hierarchy. In other words, a cache line containing an effective address of that store instruction is not loaded into Ll cache 74, from the memory hierarchy, and the update made in Ll cache 74. Rather, the update is permitted to be made, for example, within coherence module 38 directly in L2 cache 76.
[0035] At 264, if the store is not flagged as a no ownership store, then ownership of the implicated cache line is obtained. In an example, this may include requesting, at 275, ownership, receiving data for the cache line at 278, installing the cache line at 280, storing the data into the relevant portion of LI cache 74 at 282, and allowing a coherency protocol to determine when that cache line is evicted from LI cache 74 for updating other memories.
[0036] A variety of different structures and techniques may be employed by coherence module 38 and by processor cores 35 and 36 (and/or other processor cores no depicted) in order to maintain coherency. For example, when coherence module 38 updates L2 cache 76, coherence module 38 may broadcast an invalidate signal, which indicates to all other processors that copies of the updated cache line, which may have been in a shared state, are now invalid. In such an approach, other cores would not snoop the LI for the core that issued the store instruction, because the cache line was not brought into that LI. Cores that need the cache line may then fetch the cache line from L2 76. In another implementation, the updated cache line may be broadcast, and cores may detect the cache line and update their LI caches.
[0037] FIG. 6 depicts an example of a machine 505 that implements execution elements and other aspects disclosed herein. FIG. 19 depicts that different implementations of machine 505 can have different levels of integration. In one example, a single semiconductor element can implement a processor module 558, which includes cores 515-517, a coherence manager 520 that interfaces cores 515-517 with an L2 cache 525, an 1/0 controller unit 530 and an interrupt controller 510. A system memory 564 interfaces with L2 cache 525. Coherence manager 520 can include a memory management unit and operates to manage data coherency among data that is being operated on by cores 515-517. Cores may also have access to LI caches that are not separately depicted. In another implementation, an 10 Memory Management Unit (10MMU) 532 is provided. IOMMU 532 may be provided on the same semiconductor element as the processor module 558, denoted as module 559. Module 559 also may interface with I0 devices 575-577 through an interconnect 580. A collection of processor module 558, which is included in module 559, interconnect 580, and IO devices 575-577 can be formed on one or more semiconductor elements. In the example machine 505 of FIG. 7, cores 515-517 may each support one or more threads of computation, and may be architected according to the disclosures herein.
100381 Although some subject matter may have been described in language specific to examples of structural features and/or method steps, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to these described features or acts. For example, a given structural feature may be subsumed within another structural element, or such feature may be split among or distributed to distinct components. Similarly, an example portion of a process may be achieved as a by-product or concurrently with performance of another act or process, or may be performed as multiple separate acts in some implementations. As such, implementations according to this disclosure are not limited to those that have a 1:1 correspondence to the examples depicted and/or described.
[0039] Above, various examples of computing hardware and/or software programming were explained, as well as examples how such hardware/software can intercommunicate. These examples of hardware or hardware configured with software and such communications interfaces provide means for accomplishing the functions attributed to each of them. For example, a means for performing implementations of software processes described herein includes machine executable code used to configure a machine to perform such process. Some aspects of the disclosure pertain to processes carried out by limited configurability or fixed function circuits and in such situations, means for performing such processes include one or more of special purpose and limited-programmability hardware. Such hardware can be controlled or invoked by software executing on a general purpose computer.
100401 Aspects of functions, and methods described and/or claimed may be implemented in a special purpose or general-purpose computer including computer hardware, as discussed in greater detail below. Such hardware, firmware and software can also be embodied on a video card or other external or internal computer system peripherals. Various functionality can be provided in customized FPGAs or ASICs or other configurable processors, while some functionality can be provided in a management or host processor. Such processing functionality may be used in personal computers, desktop computers, laptop computers, message processors, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, game consoles, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, tablets and the like.
100411 Aspects disclosed herein will generally exist in the context of larger systems and components of systems. For example, processing can be distributed over networks, such as local or wide area networks and may otherwise be implemented using peer to peer technologies and the like. Division of tasks can be determined based on a desired performance of the product or system, a desired price point, or some combination thereof In embodiments implementing any of the described units at least partially in software, computer-executable instructions representing unit functionality can be stored on computer-readable media, such as, for example, magnetic or optical disks, flash memory, USB devices, or in networks of storage devices such as NAS or SAN equipment, and the like. Other pertinent information, such as data for processing can also be stored on such media.
[0042] In addition to hardware embodiments (e.g., within or coupled to a Central Processing Unit ("CPU"), microprocessor, microcontroller, digital signal processor, processor core, System on Chip ("SOC"), or any other programmable or electronic device), implementations may also be embodied in software (e.g., computer readable code, program code, instructions and/or data disposed in any form, such as source, object or machine language) disposed, for example, in a computer usable (e.g., readable) medium configured to store the software. Such software can enable, for example, the function, fabrication, modeling, simulation, description, and/or testing of the apparatus and methods described herein. For example, this can be accomplished through the use of general programming languages (e.g., C, C++), GDSII databases, hardware description languages (HDL) including Verilog HDL, VHDL, SystemC Register Transfer Level (RTL) and so on, or other available programs, databases, and/or circuit (i.e., schematic) capture tools. Embodiments can be disposed in computer usable medium including non-transitory memories such as memories using semiconductor, magnetic disk, optical disk, ferrous, resistive memory, and so on.
[0043] As specific examples, it is understood that implementations of disclosed apparatuses and methods may be implemented in a semiconductor intellectual property core, such as a microprocessor core, or a portion thereof, embodied in a Hardware Description Language (HDL)), that can be used to produce a specific integrated circuit implementation. A computer readable medium may embody or store such description language data, and thus constitute an article of manufacture. A non-transitory machine readable medium is an example of computer readable media. Examples of other embodiments include computer readable media storing Register Transfer Language (RTL) description that may be adapted for use in a specific architecture or microarchitecture implementation. Additionally, the apparatus and methods described herein may be embodied as a combination of hardware and software that configures or programs hardware.
[0044] Also, in sonic cases terminology has been used herein because it is considered to more reasonably convey salient points to a person of ordinary skill, but such terminology should not be considered to impliedly limit a range of implementations encompassed by disclosed examples and other aspects.
[0045] Also, a number of examples have been illustrated and described in the preceding disclosure. By necessity, not every example can illustrate every aspect, and the examples do not illustrate exclusive compositions of such aspects. Instead, aspects illustrated and described with respect to one figure or example can be used or combined with aspects illustrated and described with respect to other figures. As such, a person of ordinary skill would understand from these disclosures that the above disclosure is not limiting as to constituency of embodiments according to the claims, and rather the scope of the claims define the breadth and scope of inventive embodiments herein. The summary and abstract sections may set forth one or more but not all exemplary embodiments and aspects of the invention within the scope of the claims.

Claims (23)

  1. CLAIMS1. A process implemented in a processor, comprising: receiving a first store instruction to be executed in a load store unit of the processor; identifying a destination address from the first store instruction; associating a counter with the destination address; and receiving subsequent store instructions, and for each subsequent store instruction, determining whether a respective destination address of that store instruction is within a cache line of the first store instruction, and responsively updating the counter, determining whether the respective destination address of that store instruction is within a cache line subsequent to the cache line of the first store instruction, and if a current value of the counter meets a criteria, then characterizing the store instruction to the subsequent cache line as being a store without ownership and emitting the store to a shared cache level of a memory hierarchy coupled with the processor.
  2. 2. The process implemented in a processor of Claim 1, wherein, for each subsequent store instruction, the determining whether a respective destination address of each subsequent that store instruction is within a cache line of the first store instruction, is performed responsively to calculating, within an address generation unit of the load store unit, the respective destination address.
  3. 3. The process implemented in a processor of Claim 1 or 2, further comprising requesting ownership of the cache line for the first store instruction.
  4. 4. The process implemented in a processor of any preceding Claim, further comprising allocating the counter, from a pool of counters, prior to associating the counter with the destination address.
  5. 5. The process implemented in a processor of any preceding Claim, further comprising, within the load store unit, tracking each store instmction according to which thread, of a plurality of threads, issued that store instruction.
  6. 6. The process implemented in a processor of any preceding Claim, wherein the associating the counter with the destination address comprises associating the counter with a most-significantbit portion of the destination address.
  7. 7. The process implemented in a processor of Claim 6, wherein the most-significant-bit portion of the destination address uniquely identifies a cache line within a Level 2 cache of the memory hierarchy.
  8. 8. The process implemented in a processor of any preceding Claim, further comprising, if the store instruction to the subsequent cache line is not characterized as a store without ownership, then generating a signal to request ownership of the subsequent cache line by the processor, and upon receiving data for the subsequent cache line from the memory hierarchy, installing the data for the subsequent cache line in a Level 1 cache.
  9. 9. The process implemented in a processor of any preceding Claim, wherein each load instruction stores 64 bits, and each cache line is 512 bits.
  10. 10. A process implemented in a processor, comprising: counting, for each of a plurality of cache lines within a memory hierarchy, a number of store instructions received by a Load Store Unit (LSU) of the processor that identify an effective address within each respective cache line; and treating each store instruction as a store that requests ownership of the cache line containing the effective address of that store instruction, unless a count of a number of store instructions received for a neighboring cache line is greater than a pre-determined value, and then dispatching the store instruction to be serviced by the memory hierarchy, without obtaining ownership of that cache line.
  11. 11. A processor, comprising: a private Level One (L I) cache; a register file; an interface to a memory hierarchy shared with one or more other processors; a decoder configured to decode instructions from data, the instructions comprising a store instruction, which identifies a register in the register file and specifies an effective address to which data in the identified register is to be stored; and a Load/Store Unit (LSU) configured to receive decoded store instructions, the LSU comprising a set of counters, each capable of being associated with an address of cache line that contains the effective address from a decoded store instruction, and operable to determine whether other received decoded store instructions are within the first cache line, and responsively updating that counter, and, responsive to receiving a decoded store instruction that is within a cache line neighboring a cache line associated with a counter, and a value of that counter meeting a criteria, then outputting that store instruction for servicing by the memory hierarchy, without gaining ownership of the cache line according to a coherency protocol used within the memory hierarchy.
  12. 12. The processor of Claim 11, wherein the effective address in each store instruction is specified according to an addressing mode, of a plurality of addressing modes supported by the processor.
  13. 13. The processor of Claim 12, wherein the plurality of addressing modes supported by the processor includes a register-indirect mode, in which a store instruction specifies a register and an immediate value to be added to the contents of the specified register, in order to determine the effective address.
  14. 14. The processor of Claim 13, wherein the LSU receives the contents of the specified register and the immediate value and determines the effective address within an address generation unit
  15. 15. The processor of Claim 14, wherein the LSU comprises a buffer that maintains data for outstanding store operations waiting to be performed, and the LSU is configured to characterize each outstanding store operation as either a store with ownership or a store without ownership in response to determining the effective address within the address generation unit.
  16. 16. The processor of any of Claims 11 to 15, wherein the processor is capable of supporting multiple independent threads of execution, and the LSU is configured to allocate counters per-thread.
  17. 17. The processor of any of Claims 11 to 16, wherein each cache line stores data for at least 8 store instructions.
  18. 18. The processor of any of Claims 11 to 17, wherein each cache line stores 512 bits, and each store instruction addresses either 32 bits or 64 bits of data.
  19. 19. A processor, comprising: a private Level One (Li) cache; a register file; an interface to a memory hierarchy shared with one or more other processors; a decoder configured to decode instructions from data, the instructions comprising a store instruction, which identifies a register in the register file and specifies an effective address to which data in the identified register is to be stored; and a Load/Store Unit (LSU) configured to receive decoded store instructions, the LSU comprising a set of counters, each capable of being associated with an address of cache line that contains the effective address from a decoded store instruction, and operable to determine whether other received decoded store instructions are within the first cache line, and responsively updating that counter, and, responsive to receiving a decoded store instruction that is within a cache line neighboring a cache line associated with a counter, and a value of that counter meeting a criteria, then outputting that store instruction for servicing by the memory hierarchy, without gaining ownership of the cache line according to a coherency protocol used within the memory hierarchy.
  20. 20. A process, comprising: issuing, from an instruction decode unit in a processor, store instructions that each specify information for use in calculating an effective address, and a register containing data to be stored at the effective address in a memory hierarchy; upon calculating the effective address of each store instruction, counting a number of store instructions received for a cache line containing the effective address; and responsive to receiving a store instruction for a cache line that is either directly before or directly after a cache line for which a number of received store instructions received is greater than a threshold, characterizing that received store instruction as a store instruction for which ownership of that cache line should not be requested by the processor, from the memory hierarchy.
  21. 21. The process of Claim 20, wherein, if any store instruction has not been characterized as a store for which ownership of a respective cache line should not be requested, the process further comprises requesting ownership of that respective cache line, and upon receiving data for that respective cache line, installing that data in a location in an Ll cache private to the processor.
  22. 22. The process of Claim 20 or 21, further comprising buffering store instructions waiting to be performed and opportunistically performing store instructions as dependencies are removed.
  23. 23. A processor substantially as described herein with reference to any of Figures I to 6.
GB1514646.7A 2014-08-19 2015-08-18 Processors and methods for cache sparing stores Expired - Fee Related GB2532545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
GB1617426.0A GB2545061B (en) 2014-08-19 2015-08-18 Cache sparing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US201462039356P 2014-08-19 2014-08-19

Publications (3)

Publication Number Publication Date
GB201514646D0 GB201514646D0 (en) 2015-09-30
GB2532545A true GB2532545A (en) 2016-05-25
GB2532545B GB2532545B (en) 2017-04-19

Family

ID=54258775

Family Applications (2)

Application Number Title Priority Date Filing Date
GB1617426.0A Expired - Fee Related GB2545061B (en) 2014-08-19 2015-08-18 Cache sparing
GB1514646.7A Expired - Fee Related GB2532545B (en) 2014-08-19 2015-08-18 Processors and methods for cache sparing stores

Family Applications Before (1)

Application Number Title Priority Date Filing Date
GB1617426.0A Expired - Fee Related GB2545061B (en) 2014-08-19 2015-08-18 Cache sparing

Country Status (2)

Country Link
US (1) US10108548B2 (en)
GB (2) GB2545061B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2547912B (en) * 2016-03-02 2019-01-30 Advanced Risc Mach Ltd Register access control
CN107229593B (en) * 2016-03-25 2020-02-14 华为技术有限公司 Cache consistency operation method of multi-chip multi-core processor and multi-chip multi-core processor
US10331357B2 (en) * 2016-08-19 2019-06-25 Advanced Micro Devices, Inc. Tracking stores and loads by bypassing load store units
WO2018115920A1 (en) * 2016-12-20 2018-06-28 Intel Corporation Methods and apparatus to perform memory copy operations
US10606755B2 (en) 2017-06-30 2020-03-31 Intel Corporation Method and system for performing data movement operations with read snapshot and in place write update
WO2019100186A1 (en) * 2017-11-21 2019-05-31 Intel Corporation Power management for partial cache line sparing
US11055226B2 (en) 2018-06-29 2021-07-06 Intel Corporation Mitigation of cache-latency based side-channel attacks
US10824567B2 (en) * 2018-12-04 2020-11-03 International Business Machines Corporation Selectively preventing pre-coherence point reads in a cache hierarchy to reduce barrier overhead

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2335764A (en) * 1998-03-27 1999-09-29 Motorola Ltd Selective caching of memory accesses based on access history
US20070079070A1 (en) * 2005-09-30 2007-04-05 Arm Limited Cache controller
US20100005241A1 (en) * 2008-04-08 2010-01-07 Changkyu Kim Detection of streaming data in cache
US20100088473A1 (en) * 2008-10-03 2010-04-08 Koji Kobayashi Vector computer system with cache memory and operation method thereof

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4386399A (en) * 1980-04-25 1983-05-31 Data General Corporation Data processing system
CH672816A5 (en) * 1986-10-03 1989-12-29 Pantex Stahl Ag
CA1300758C (en) * 1988-03-07 1992-05-12 Colin H. Cramm Mechanism for lock-up free cache operation with a remote address translation unit
JP2675981B2 (en) * 1993-09-20 1997-11-12 インターナショナル・ビジネス・マシーンズ・コーポレイション How to avoid snoop push operations
US5574922A (en) * 1994-06-17 1996-11-12 Apple Computer, Inc. Processor with sequences of processor instructions for locked memory updates
US5717895A (en) * 1994-12-01 1998-02-10 Cray Research, Inc. Associative scalar data cache with write-through capabilities for a vector processor
US6473832B1 (en) * 1999-05-18 2002-10-29 Advanced Micro Devices, Inc. Load/store unit having pre-cache and post-cache queues for low latency load memory operations
US6412046B1 (en) * 2000-05-01 2002-06-25 Hewlett Packard Company Verification of cache prefetch mechanism
US6725334B2 (en) * 2000-06-09 2004-04-20 Hewlett-Packard Development Company, L.P. Method and system for exclusive two-level caching in a chip-multiprocessor
US6651153B1 (en) * 2001-02-16 2003-11-18 Unisys Corporation Methods for predicting cache memory performance in a proposed computer system
US6886079B2 (en) * 2001-06-21 2005-04-26 International Business Machines Corporation Dynamic history based mechanism for the granting of exclusive data ownership in a non-uniform memory access (NUMA) computer system
US6775748B2 (en) * 2002-01-24 2004-08-10 Intel Corporation Methods and apparatus for transferring cache block ownership
US7089371B2 (en) * 2002-02-12 2006-08-08 Ip-First, Llc Microprocessor apparatus and method for prefetch, allocation, and initialization of a block of cache lines from memory
US6968417B1 (en) * 2002-03-21 2005-11-22 Advanced Micro Devices, Inc. Method and apparatus for reducing latency in a peripheral interface circuit of an I/O node of a computer system
US7210006B2 (en) * 2002-06-28 2007-04-24 Sun Microsystems, Inc. Computer system supporting read-to-write-back transactions for I/O devices
US7216205B2 (en) * 2004-01-12 2007-05-08 Hewlett-Packard Development Company, L.P. Cache line ownership transfer in multi-processor computer systems
US9477602B2 (en) * 2008-08-08 2016-10-25 Intel Deutschland Gmbh Cache refill control
US8533400B2 (en) * 2011-01-28 2013-09-10 Freescale Semiconductor, Inc. Selective memory access to different local memory ports and method thereof
US9824009B2 (en) * 2012-12-21 2017-11-21 Nvidia Corporation Information coherency maintenance systems and methods

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2335764A (en) * 1998-03-27 1999-09-29 Motorola Ltd Selective caching of memory accesses based on access history
US20070079070A1 (en) * 2005-09-30 2007-04-05 Arm Limited Cache controller
US20100005241A1 (en) * 2008-04-08 2010-01-07 Changkyu Kim Detection of streaming data in cache
US20100088473A1 (en) * 2008-10-03 2010-04-08 Koji Kobayashi Vector computer system with cache memory and operation method thereof

Also Published As

Publication number Publication date
GB2545061B (en) 2018-02-07
GB2532545B (en) 2017-04-19
GB2545061A (en) 2017-06-07
US10108548B2 (en) 2018-10-23
GB201514646D0 (en) 2015-09-30
GB201617426D0 (en) 2016-11-30
US20160055083A1 (en) 2016-02-25

Similar Documents

Publication Publication Date Title
US10108548B2 (en) Processors and methods for cache sparing stores
US9448936B2 (en) Concurrent store and load operations
JP5615927B2 (en) Store-aware prefetch for data streams
US7493451B2 (en) Prefetch unit
US11030108B2 (en) System, apparatus and method for selective enabling of locality-based instruction handling
US20180349280A1 (en) Snoop filtering for multi-processor-core systems
US9361233B2 (en) Method and apparatus for shared line unified cache
CN108885586B (en) Processor, method, system, and instruction for fetching data to an indicated cache level with guaranteed completion
US9727475B2 (en) Method and apparatus for distributed snoop filtering
US9471494B2 (en) Method and apparatus for cache line write back operation
US9547593B2 (en) Systems and methods for reconfiguring cache memory
WO2008005687A2 (en) Global overflow method for virtualized transactional memory
US20200104259A1 (en) System, method, and apparatus for snapshot prefetching to improve performance of snapshot operations
US20160117250A1 (en) Apparatus and Method of Throttling Hardware Pre-fetch
US8327121B2 (en) Data cache receive flop bypass
US10705962B2 (en) Supporting adaptive shared cache management
WO2017172220A1 (en) Method, system, and apparatus for a coherency task list to minimize cache snooping between cpu and fpga
US10133669B2 (en) Sequential data writes to increase invalid to modified protocol occurrences in a computing system
US20180285279A1 (en) System, Apparatus And Method For Overriding Of Non-Locality-Based Instruction Handling
US10657070B2 (en) Apparatus and method for shared least recently used (LRU) policy between multiple cache levels
US8108621B2 (en) Data cache with modified bit array
CN111095203A (en) Inter-cluster communication of real-time register values
US9195465B2 (en) Cache coherency and processor consistency
US20180121353A1 (en) System, method, and apparatus for reducing redundant writes to memory by early detection and roi-based throttling
US10942851B2 (en) System, apparatus and method for dynamic automatic sub-cacheline granularity memory access control

Legal Events

Date Code Title Description
732E Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)

Free format text: REGISTERED BETWEEN 20200102 AND 20200108

732E Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)

Free format text: REGISTERED BETWEEN 20200109 AND 20200115

PCNP Patent ceased through non-payment of renewal fee

Effective date: 20200818