WO2014006732A1 - データ訂正方法、マルチプロセッサシステム、及びプロセッサ - Google Patents

データ訂正方法、マルチプロセッサシステム、及びプロセッサ Download PDF

Info

Publication number
WO2014006732A1
WO2014006732A1 PCT/JP2012/067241 JP2012067241W WO2014006732A1 WO 2014006732 A1 WO2014006732 A1 WO 2014006732A1 JP 2012067241 W JP2012067241 W JP 2012067241W WO 2014006732 A1 WO2014006732 A1 WO 2014006732A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
memory
command
cache
error
Prior art date
Application number
PCT/JP2012/067241
Other languages
English (en)
French (fr)
Inventor
俊之 牟田
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2012/067241 priority Critical patent/WO2014006732A1/ja
Publication of WO2014006732A1 publication Critical patent/WO2014006732A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1064Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in cache or content addressable memories

Definitions

  • the present invention relates to a technique for dealing with a correctable error occurring in data on a memory shared by a plurality of processors.
  • a memory serving as a main storage device is usually used as a shared resource of the plurality of processors.
  • An error may occur in the data stored in the memory. In addition to the error caused by the memory itself, the error may occur during transfer. If an error occurs in the necessary data, the subsequent processing cannot be performed properly. For this reason, many multiprocessor systems that require high reliability support a memory that can store ECC (Error Correcting Code).
  • ECC memory The memory that can store the ECC is hereinafter referred to as “ECC memory” for convenience.
  • ECC Error Correction Code
  • a correctable error occurs when data is written to or read from memory, as well as when it is transferred. As a result, a plurality of correctable errors may occur in the same data. For example, there is a possibility that a correctable error occurs in the data stored in the memory itself, and a correctable error also occurs when the read data is transferred. If a plurality of such correctable errors occur, there is a high possibility that the error cannot be corrected as a result. For this reason, when a correctable error is detected, it is desirable to respond immediately to the error.
  • the data on the memory is usually read into the cache memory and used for the processor.
  • an error control determination unit that detects correctable errors and corrects errors can be placed between multiple cache memories and ECC memories, so that correctable errors can be handled immediately.
  • the error control determination unit corrects the data, and the corrected data is stored in the cache memory to which the corrected data is to be written. It comes to write.
  • the cache memories are connected by wiring, and a logic circuit such as an OR gate, an AND gate, and an inverter is used. Yes.
  • the cache memory is arranged outside the processor.
  • most cache memories have a plurality of cache lines. Data read out to each cache memory is determined for each cache memory. The correspondence relationship between the cache lines changes at any time by reading or expelling data from any cache memory. For this reason, when a cache memory having a plurality of cache lines is employed, both the number of wires and the scale of the combination of logic circuits are very large in the conventional multiprocessor system. As a result, the technique employed in the conventional multiprocessor system is practically impractical.
  • the error control determination unit performs the transition to the modified state in the cache line in which the correction data is stored. From this, it is conceivable to cause the error control determination unit to perform the state transition of each cache line in each cache memory.
  • the data read to each cache memory is determined for each cache memory, and the correspondence relationship between the cache lines between the cache memories changes from time to time. For this reason, the error control determination unit must be able to identify the correspondence relationship of cache lines between different cache memories.
  • the error control determination unit In order to be able to specify the correspondence relationship between the cache lines, the error control determination unit must monitor the operation of each cache memory. For this reason, the error control determination unit must perform complicated control in order to cope with a correctable error. The more complicated the control, the longer it takes to apply and the higher the cost. If this is taken into consideration, it seems important to deal with correctable errors with simpler control.
  • an object of the present invention is to provide a technique for dealing with a correctable error that has occurred in memory data shared by a plurality of processors while suppressing control complexity.
  • One system to which the present invention is applied includes a plurality of processors having a cache memory, a memory shared by the plurality of processors, and a cache memory read from the memory and mounted on any of the plurality of processors.
  • An error correction unit that detects a correctable error that occurs in the stored data and outputs correction data that corrects the error, and a cache line state of the cache memory in which the correction data output by the error correction unit is stored
  • a command issuing unit for issuing a command for shifting to an update state indicating that the content of the data of the cache line is updated.
  • FIG. 1 is a diagram illustrating a configuration example of a multiprocessor system according to the present embodiment.
  • the multiprocessor system according to the present embodiment includes a total of four processors 1 (1-0 to 1-3), a crossbar network 2, a memory control unit 3, and a memory 4 as a main storage device. I have. Each processor 1, memory control unit 3, and memory 4 are each connected to a crossbar network 2.
  • Each processor 1 is a processor according to the present embodiment, and includes one processor core 11 and a cache memory 12.
  • the number of processor cores 11 may be two or more.
  • a plurality of cache memories 12 may be provided.
  • the cache memory 12 shown in FIG. 1 is a secondary cache memory used for storing data received via the crossbar network 2, for example.
  • the cache memory 12 is a cache memory according to the present embodiment.
  • the processor 1 according to the present embodiment is realized by mounting the cache memory 12 according to the present embodiment.
  • the memory 4 is a resource shared by each processor 1, and includes four memory banks 41 (41-0 to 41-3).
  • Each memory bank 41 is an access management unit controlled by the memory control unit 3 and corresponds to one or more memory modules.
  • Each memory module is equipped with one or more memory cells 41a.
  • the number of processors 1 is four, but the number of processors 1 is not particularly limited.
  • the memory 4 includes four memory banks 41, but the number of the memory banks 41, the type of the memory banks 41, and the like are not particularly limited.
  • the crossbar network 2 is a network that enables parallel access from an arbitrary processor 11 to an arbitrary memory bank 41. Although the crossbar is not shown in FIG. 1, if the data read or written to each memory bank 41 is 72 bits, the crossbar network 2 has a number of crossbars capable of 72-bit data transfer. I have. In the case of 72-bit data, 8 bits out of 72 bits are ECC data.
  • FIG. 1 shows four arbitration units 21 (21-0 to 21-3) and four selectors 22 (22-0 to 22-3).
  • Each of the four arbitration units 21 is a mechanism for selecting one of the requests (commands) from the four processors 1 and outputting the request to the corresponding memory bank 41 and the memory control unit 3.
  • Each arbitration unit 21 includes a selector 211 for selecting one command. Although not particularly illustrated, each arbitration unit 21 includes four memories that store requests from the respective processors 1 and a control unit that determines the processor 1 that causes the selector 211 to select a command. Each of the four memory banks 41 is connected to a crossbar group.
  • the four selectors 22 are used for selecting the processor 1 as a transfer destination of data read from each memory bank 41. Thereby, each selector 22 is connected to the crossbar group.
  • the selection control of each selector 22 is performed by, for example, the memory control unit 3.
  • the cache memory 12 mounted on the processor 1-0 is denoted as “cache 0”.
  • “cache 3” represents the cache memory 12 mounted in the processor 1-3. Therefore, the data read from each memory bank 41 is transferred to each processor 1 via the corresponding selector 22.
  • the cache memory 12 of each processor 1 includes a tag unit 121, a data unit 122, an arbitration unit 123, a miss control unit 124, a tag (TAG) state generation unit 125, a comparator 126, a CE (Correctable Error) control unit 127, and 2 Two ECC correction units 128 and 129 are provided.
  • a tag unit 121 a data unit 122, an arbitration unit 123, a miss control unit 124, a tag (TAG) state generation unit 125, a comparator 126, a CE (Correctable Error) control unit 127, and 2
  • TAG tag
  • CE Correctable Error
  • the processor core 11 issues a command to the cache memory 12 when necessary data or data to be written occurs, for example.
  • a command code indicating the type of command and an address are stored.
  • the write command for requesting data writing stores data to be written in addition to the command code and address.
  • a command issued from the processor core 11 is output to the miss control unit 124, the tag unit 121, and the data unit 122 via the arbitration unit 123.
  • the tag unit 121 and the data unit 122 each have the same number of entries.
  • One cache line includes one entry in the tag part 121 and one entry in the data part 122.
  • the cache memory 12 employs the direct map method.
  • the direct map method there is only one entry (space) in the data portion 122 that can store data corresponding to an address. Therefore, in the direct map method, one cache line includes one entry in the tag unit 121 and one corresponding entry in the data unit 122.
  • the address stored in the command includes an index address used for an index of the cache line and a tag address stored in each entry of the tag unit 121.
  • the address configuration itself is not particularly important. For this reason, a particularly detailed description is omitted.
  • the index address and tag address of the command output from the arbitration unit 123 are input to the tag unit 121 and used to read the tag address stored in the entry of the tag unit 121 specified by the index address.
  • the tag address read from the tag unit 121 is input to the comparator 126 together with the tag address of the command output from the arbitration unit 123, and the comparison result of the two tag addresses is output from the comparator 126 as hit information. . If the tag addresses match, the hit information indicates that the target data exists, that is, a hit. If the tag addresses do not match, the target data does not exist, that is, a miss hit occurs. It represents.
  • the data to be read includes ECC data.
  • Data read from the data unit 122 is output to the ECC correction unit 128.
  • the ECC correction unit 128 detects a correctable error (correctable error) using the ECC data included in the input data, and corrects the error when a correctable error is detected. As a result, when a correctable error has not occurred or when a correctable error has occurred, the ECC correction unit 128 outputs appropriate data. Here, it is assumed that the data output from the ECC correction unit 128 is input to the processor core 11.
  • the hit information output from the comparator 126 is output to the miss control unit 124 together with the processor core 11 side.
  • the miss control unit 124 performs control for responding to a miss hit. For example, when the read command does not hit, the miss control unit 124 determines a cache line for storing data requested by the read command, and generates a command for reading the requested data to the determined cache line. .
  • the generated command is transferred to the memory control unit 3 via the crossbar network 2. Thereby, the memory control unit 3 reads the requested data from the memory bank 41 in which the requested data is stored.
  • the read data is transferred via the crossbar network 2 to the processor 1 that is the command output source.
  • the data read from each memory bank 41 and transferred to the processor 1 includes ECC data.
  • the data transferred to the processor 1 is input to the ECC correction unit 129, and the ECC correction unit 129 detects and corrects a correctable error. Accordingly, the corrected data is output from the ECC correction unit 129 when a collectable error is detected.
  • the data output from the ECC correction unit 129 is written in the corresponding entry in the data unit 122. Regardless of whether or not the collectable error has been corrected, a shared state is set for the cache line from which data has been newly read.
  • the ECC correction unit 129 When the ECC correction unit 129 detects a collectable error, the ECC correction unit 129 notifies the miss control unit 124 of the occurrence of the collectable error. In response to the notification from the ECC correction unit 129, the miss control unit 124 outputs the index address and tag address of the command in which a collectable error has occurred to the CE control unit 127.
  • the collectable error occurring in the data transferred from the memory 4 may be detected by the collectable error occurring in the data on the memory 4. This possibility means that the content of data on the cache memory 12 may be different from the content of data on the memory 4. Therefore, the CE control unit 127 generates a command for transitioning the cache line storing the corrected error corrected data to the modify state using the index address and the tag address input from the miss control unit 124. Output.
  • the command output from the CE control unit 127 is input to the error control unit 124 and the like via the arbitration unit 123.
  • a write prefetch command is employed as a command to be generated by the CE control unit 127.
  • the write prefetch command is a cache determination access for setting an address to be written in the future in a cache hit state in advance, and is a command for generating an operation for shifting to a hit state if a miss occurs.
  • the command to be generated by the CE control unit 127 may be a command that causes the cache state to transition to the modify state as a result. For this reason, the command is not limited to the write prefetch command.
  • the miss control unit 124 that has input the write prefetch command refers to the cache line state data specified by the index address and the tag address in the input write prefetch command, and confirms the cache state. As a result of the confirmation, when the cache state is the invalid state or the share state, the miss control unit 124 broadcasts a message requesting invalidation of the cache line.
  • This message is also processed by the tag state generation unit 125 in the cache memory 12 mounted on the other processor 1.
  • the tag state generation unit 125 receives this message, if there is a cache line specified by the message, the tag state generation unit 125 changes the cache state of the cache line to the invalid state and returns a response.
  • the miss control unit 124 of the cache memory 12 that has transmitted the message waits for reception of a response from the cache memory 12 of the other processor 1, and then sends the cache state of the corresponding cache line to the tag state generation unit 125 as a modified state. Transition to.
  • the corrected data is stored in the cache line, and a command for changing the cache line to the modify state is issued. .
  • the data in which the correctable error is corrected can be reflected in the memory 4 by the write back performed when the error is driven out.
  • the command to be issued is a command that causes the cache memory 12 to process. For this reason, it is not necessary to transmit / receive special information between the cache memories 12. Thereby, the wiring used for the connection between the cache memories 12 does not need to be increased.
  • the arbitration unit 123 is provided to process the command issued by the CE control unit 127 and the command from the processor core 11 side in an appropriate order. For this reason, the command may be issued when a collectable error occurs. Since the write prefetch command issued by the CE control unit 127 is an existing command, a known method (algorithm) may be employed as the arbitration method by the arbitration unit 123. As described above, when a collectable error occurs, an existing command is issued, and the corrected data is shifted to a state where it can be reflected on the memory 4, so that the control for dealing with the collectable error is true. On top, it will be very simple.
  • FIG. 2 is a diagram for explaining state transition in the MSI protocol.
  • FIG. 3A and FIG. 3B are diagrams for explaining the operation outline of the cache memory for each command and for each cache state.
  • FIG. 3A shows an operation outline when the cache memory 12 processes a command issued in its own processor 1
  • FIG. 3B shows an operation outline according to the command processing by the cache memory 12 of another processor 1.
  • FIG. 4 is a timing chart showing the flow of operations coordinated among the processor core, cache memory, interconnect, and memory when the read command misses. Next, the operation of the cache memory 12 will be specifically described with reference to FIGS.
  • the command cannot be executed depending on the cache status other than the miss hit.
  • a read command cannot be executed even when the cache state is the invalid state ST3. Therefore, in the description of FIG. 4, a command cannot be executed due to a miss hit or a cache state is collectively referred to as “miss”.
  • FIG. 2 is an abbreviation for Coherency ⁇ Read
  • “ CRI ” is an abbreviation for CoherencyidInvalidate
  • “ CI ” is a Coherency Invalidate
  • “ WB ” is a Write Back
  • “ NOP ” is an abbreviation for No Operation.
  • Messages are transmitted and received between the cache memories 12 in order to realize cache coherency.
  • the message is labeled “Snoop”.
  • “DT” represents a snoop data response.
  • FIG. 2 represents “write”, “read”, “replace”, “read prefetch”, and “write prefetch” in addition to CR, CRI, and CI as commands. These are the following commands:
  • the CR is a command for reading data on the memory 4.
  • the CRI is a command for requesting all the cache memories 12 to invalidate the cache line having the data while reading the data on the memory 4.
  • the CI is a command for requesting all cache memories 12 to invalidate a designated cache line.
  • the write command is a command for updating cache line data.
  • the read is a command for reading the cache line data.
  • the replace is a command for expelling the cache line, that is, for writing back the data in the cache line.
  • the cache line in the invalid state ST3 is a target for reading data on the memory 4.
  • the cache line in the invalid state ST3 is a miss hit. Therefore, when the cache line that is the target of the read command or the read prefetch command is in the invalid state ST3, the miss control unit 124 is activated and CR is issued, and the data from the memory 4 is read to the cache line. It is. By reading this data, the cache state transitions from the invalid state ST3 to the share state ST2 (SQ1).
  • the ECC correction unit 129 When a collectable error occurs in the data transferred from the memory 4, the ECC correction unit 129 notifies the error control unit 124 to that effect. As a result, the CE control unit 127 is activated, and the CE control unit 127 issues a write prefetch command. For this reason, the write prefetch command issued by the CE control unit 127 is targeted for the cache line in the share state ST2.
  • the write command issued to the cache line in the invalid state ST3 and the write prefetch command also become a miss hit. From this, the miss control unit 124 is activated and a CRI is issued. Thereby, the data read from the memory 4 is stored in the cache line, and the cache state transits from the invalid state ST3 to the modify state ST1 (SQ2). The invalid state ST3 is maintained even if the other cache memory 12 issues any command of CR, CRI, and CI.
  • the cache state transitions to the invalid state ST3 due to the CI and CRI issued by the other cache memory 12 (SQ3).
  • the transition to the invalid state ST3 is performed by processing the snoop broadcast from the other cache memory 12 by the tag state generation unit 125 and updating the state data of the corresponding cache line.
  • the replace command is a command for evicting the cache line. Therefore, the replace command makes a transition from the share state ST2 to the invalid state ST3 (SQ3).
  • both the write command and the write prefetch command are miss hits.
  • the miss control unit 124 is activated and the CI is broadcast, and the other cache memory 12 returns a response.
  • This response is processed by the tag state generating unit 125, and the corresponding cache line state data is updated to the content representing the modified state ST1 (SQ4).
  • the share state ST2 is maintained even if a read command or a read prefetch command hits or a CR snoop is received (SQ5).
  • the cache line in the modified state ST1 transits to the invalid state ST3 by receiving a replace command or CRI snoop (SQ6).
  • a replace command the cache line data is written back. Data in which the collectable error is corrected is reflected on the memory 4 by the replace command.
  • the cache state transitions to the share state ST2 upon receipt of the CR snoop (SQ7).
  • the cache line data is written back, and the cache memory 12 that issued the CR acquires the data after being updated by the write back.
  • the modified state ST1 is maintained even if any of the read command, write command, read prefetch command, and write prefetch command is hit (SQ8).
  • the cache state of the cache line includes the type of command to be processed, the cache state at the time of processing the command, whether or not a hit has occurred, Transitions according to operation.
  • the cache line in the modified state ST1 is written back unless another cache memory 12 executes CRI.
  • the cache line in which the corrected error corrected data is stored is reflected on the memory 4 at the time of write-back by making a transition to the modified state ST1.
  • the data actually written on the memory 4 by the write back is corrected data or data whose contents are updated from the corrected data.
  • Reading of data on the memory 4 to the cache memory 12 is performed when a read command misses.
  • the processor core 11, the cache memory 12, the interconnect, and the memory 4 operate as shown in FIG.
  • the interconnect here corresponds to the crossbar network 2 or the crossbar network 2 and the cache memory 12 of each processor 1. It is assumed that the read command is issued by the processor core 11.
  • FIG. 4 shows only sequences considered necessary for explanation in order to facilitate understanding.
  • the miss control unit 124 issues a CR for reading the data requested by the read command from the memory 4.
  • the issued CR is transferred to the memory control unit 3 via the interconnect, that is, the crossbar network 2, and data requested by the CR is read from the memory 4 under the control of the memory control unit 3.
  • the read data is transferred to the cache memory 12 that issued the CR via the interconnect, that is, the crossbar network 2.
  • the data transferred to the cache memory 12 is output to the data unit 122 via the ECC correction unit 129 and stored in the corresponding entry (cache line).
  • the stored data is output to the processor core 11.
  • the cache state of the cache memory storing the data is the share state ST2.
  • the ECC correction unit 129 When the ECC correction unit 129 detects a collectable error in the data transferred from the memory 4 (in the case of “read miss (collectable error)” in FIG. 4), the ECC correction unit 129 outputs the corrected data to the data unit 122. At the same time, the error control unit 124 is notified that a collectable error has occurred. In response to this notification, the miss control unit 124 outputs the index address and tag address of the cache line in which the correction data is stored to the CE control unit 127 (SA1).
  • the CE control unit 127 generates a write prefetch command using the index address and the tag address input from the miss control unit 124, and outputs them to the arbitration unit 123 (SA2).
  • the arbitrating unit 123 performs arbitration on the command from the processor core 11 and the prefetch command output from the CE control unit 127 according to a predetermined algorithm, and outputs the selected command.
  • the miss control unit 124 that has input the write prefetch command broadcasts a CI snoop to the crossbar network 2 (SA3).
  • the cache memory 12 of the other processor 1 changes the cache state of the corresponding cache line to the invalid state ST3 (SA4), and transmits a response to the crossbar network 2 (SA5).
  • the response DT is received via the crossbar network 2 to the cache memory 12 of the processor 1 that broadcasts the CI.
  • the interconnect here corresponds to the crossbar network 2 and each processor 1.
  • the cache memory 12 that has received the response changes the cache state of the corresponding cache line from the shared state ST2 to the modified state ST1. Thereafter, the data in the cache line is read or updated as needed in accordance with a command issued from the processor core 11.
  • the miss control unit 124 selects a cache line for storing data to be read from the memory 4 according to a predetermined algorithm. At this time, if the miss control unit 124 selects a cache line that has been changed to the modified state ST1 by the write prefetch command issued by the CE control unit 127 (in the case of “read miss & write back” in FIG. 4), the following The following sequence occurs.
  • the miss control unit 124 issues a CR when a read command miss hits, and reads data stored in the selected cache line from the memory 4. Since the sequence at this time is the same as that at the time of a normal miss-hit, the description is omitted.
  • the miss control unit 124 uses the data stored in the cache line to request a data write command (hereinafter referred to as “write-back command” for convenience). Is generated and issued, and transmitted to the crossbar network 2 (SA11). The command transmitted to the crossbar network 2 is transmitted to the memory control unit 3 and the corresponding memory bank 41 via the arbitration unit 21 (SA12).
  • the memory control unit 3 processes the received write-back command, and stores the data stored in the write-back command in the corresponding memory bank 41 (SA13). Thereafter, the memory control unit 3 transmits a response addressed to the processor 1 that has transmitted the write-back command to the crossbar network 2 (SA14). The cache memory 12 that has issued the write-back command receives a response via the crossbar network 2 (SA15).
  • the sequence for the above write back is the same as the normal write back sequence. For this reason, it is possible to avoid the necessity of performing special control after that by changing the cache state of the cache line storing the corrected data from the share state ST2 to the modify state ST1.
  • FIG. 5 is a flowchart showing the operation flow of the cache memory according to the present embodiment.
  • attention is paid to one command, and the flow of processing the command is shown.
  • a command only a read command or a read system of a read prefetch command and a write system of a write command and a write prefetch command are assumed. It is assumed that the command hits, in other words, it is assumed that a miss that cannot execute the command occurs only when the cache state is inappropriate.
  • the operation of the cache memory 12 according to the present embodiment will be described in detail with reference to FIG.
  • the command waits until it is input to the arbitration unit 123 and selected by the arbitration unit 123 regardless of the processor core 11 or the CE control unit 127 (S1).
  • the arbitration unit 123 is selected (S1: n)
  • the selected command is input to the miss control unit 124
  • the index address of the selected command is output to the tag unit 121
  • the tag address is output to the comparator 126. (S2).
  • the comparator 126 can output hit information.
  • hit information always represents a hit.
  • the miss control unit 124 determines whether the input command is a read system or a write system (S3). When the input command determines that the input command is the write system (S3: write), the miss control unit 124 checks the cache state of the cache line specified by the input command (S4).
  • the cache state is the modify state ST1 and the miss control unit 124 determines (S4: modify)
  • the data in the command is stored in the corresponding entry of the data unit 122, and the command is processed by the processor core 11.
  • a response indicating that is output (S5) Thereby, the command processing is completed.
  • the miss control unit 124 issues a CI or CRI and performs a snoop corresponding to the issued command. Broadcast (S6). Thereafter, the miss control unit 124 waits to receive a response from the cache memory 12 of each processor 1 or from the cache memory 12 and the memory 4 of each processor 1 (S7).
  • the miss control unit 124 When the command issued by the miss control unit 124 is CI, only the snoop is broadcast. In that case, after waiting for a response from the cache memory 12 of each processor 1 (S7: n), the tag state generation unit 125 changes the cache state of the corresponding cache line from the shared state ST2 to the modified state ST1. . Thereby, the command processing is completed.
  • the tag state generation unit 125 waits for reading of data from the memory 4 and reception of a response from the cache memory 12 of each processor 1 (S7: n), and the tag state generation unit 125 moves the corresponding cache line from the invalid state ST3. Transition to the modify state ST1.
  • the data read from the memory 4 is stored in the corresponding entry of the data part 122, and a response is output to the processor core 11 (S8). After that is done, the command processing is complete.
  • the miss control unit 124 checks the cache state of the cache line specified by the input command (S9).
  • the cache state is the modified state ST1 or the share state ST2 and the miss control unit 124 determines (S9: modify / share)
  • the cache line data specified by the command is output to the processor core 11 as a response. Thereby, the command processing is completed.
  • the miss control unit 124 issues a CR and broadcasts a snoop according to the issued command (S11). Thereafter, the miss control unit 124 waits to receive a response DT from the cache memory 12 of each processor 1 or data read from the memory 4 (S12). When a response DT from each cache memory 12 or data from the memory 4 is received (S12: n), the miss control unit 124 then determines whether or not a collectable error has occurred in the data from the memory 4. Perform (S13).
  • the ECC correction unit 129 When the ECC correction unit 129 does not notify the occurrence of a collectable error (S13: n), the data is stored in the corresponding entry of the data unit 122 and output to the processor core 11.
  • the corresponding entry of the tag unit 121 stores the tag address of the command and state data indicating the share state ST2 (S15 above). Thereby, the command processing is completed.
  • the miss control unit 124 activates the CE control unit 127 and outputs the index address and tag address of the command to the CE control unit 127. . Accordingly, the miss control unit 124 causes the CE control unit 127 to generate and issue a write prefetch command (S14).
  • Data read from the memory 4 is corrected by the ECC correction unit 129, stored in a corresponding entry of the data unit 122, and output to the processor core 11.
  • the corresponding entry of the tag unit 121 stores the tag address of the command and state data indicating the share state ST2 (S15 above). Thereby, the command processing is completed.
  • the detection and correction of the collectable error occurring in the data read from the memory 4 is performed in the cache memory 12, but may be performed outside the cache memory 12. This is because the cache memory 12 can reflect appropriate data on the memory 4 by issuing a write prefetch command if it can recognize the occurrence of a collectable error and acquire data with the correctable error corrected.
  • Components such as the ECC correction unit 129 may be provided in each memory bank 41 or in the crossbar network 2.
  • the multiprocessor system may include a plurality of memories 4 having different connection forms.

Landscapes

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

Abstract

 本発明を適用した1システムは、キャッシュメモリを備えた複数のプロセッサと、複数のプロセッサによって共有されるメモリと、を備えていることを前提とする。更に1システムは、メモリから読み出されて複数のプロセッサのうちの何れかに搭載されたキャッシュメモリに格納されるデータに発生した訂正可能なエラーを検出し、該エラーを訂正した訂正データを出力するエラー訂正部と、エラー訂正部が出力する訂正データが格納されたキャッシュメモリのキャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行するコマンド発行部と、を具備する。

Description

データ訂正方法、マルチプロセッサシステム、及びプロセッサ
 本発明は、複数のプロセッサによって共有されるメモリ上のデータに発生した訂正可能なエラーに対応するための技術に関する。
 複数のプロセッサを備えたマルチプロセッサシステムでは、主記憶装置とするメモリは複数のプロセッサの共有リソースとして用いられるのが普通である。メモリに格納されるデータには、エラーが発生する可能性がある。エラーは、メモリ自体の原因により発生する他に、転送時に発生する可能性がある。必要なデータにエラーが発生した場合、以降の処理を適切に行えなくなる。このことから、高い信頼性が要求されるマルチプロセッサシステムの多くは、ECC(Error Correcting Code)を格納可能なメモリをサポートしている。ECCを格納可能なメモリは以降、便宜的に「ECCメモリ」と表記する。
 ECCメモリでは、データと共に、ECCが読み出される。読み出されたECCは、発生したエラーの検出の他に、発生したエラーの訂正に用いられる。このことから、ECCメモリを採用したマルチプロセッサシステムでは、より高い信頼性を実現させることができる。
 訂正可能なエラーは、メモリへのデータの書き込み時、或いは読み出し時の他に、転送時等でも発生する。それにより、訂正可能なエラーが同じデータに複数、発生する可能性がある。例えばメモリに格納されたデータ自体に訂正可能なエラーが発生し、且つ読み出されたデータの転送時にも訂正可能なエラーが発生するというような可能性がある。そのように訂正可能なエラーが複数、発生すると、結果としてエラーが訂正不可能になる可能性が高くなる。このことから、訂正可能なエラーが検出された場合、そのエラーに直ちに対応するのが望ましい。
 現在、メモリ上のデータは、キャッシュメモリに読み出されてプロセッサに用いられるのが普通となっている。従来のマルチプロセッサシステムのなかには、複数のキャッシュメモリとECCメモリとの間に、訂正可能なエラーの検出、及びエラーの訂正を行うエラー制御判定部を配置して、訂正可能なエラーに直ちに対応可能にしたシステムがある。この従来のマルチプロセッサシステムでは、ECCメモリから読み出されたデータに訂正可能なエラーが発生している場合、エラー制御判定部にデータの訂正を行わせ、訂正されたデータを書き込むべきキャッシュメモリに書き込むようになっている。
 エラーを訂正することにより、ECCメモリ上のデータは、キャッシュメモリ上のデータとは一致しなくなる。このことから、従来のマルチプロセッサシステムでは、エラーを訂正したデータをキャッシュメモリに書き込む場合、訂正したデータの格納に用いられるキャッシュラインの状態を、変更(更新)された状態(以降「モディファイ状態」と表記)とする。それにより、他のキャッシュメモリの同じデータが書き込まれたキャッシュラインの状態は、無効状態とされる。そのようにして、従来のマルチプロセッサシステムは、訂正可能なエラーに直ちに対応し、訂正したデータはキャッシュメモリから追い出す際に書き戻すライトバックによりECCメモリに反映させている。
 従来のマルチプロセッサシステムでは、上記のようにキャッシュメモリ間でキャッシュラインの状態遷移を反映させるために、キャッシュメモリ間を配線により接続し、ORゲート、ANDゲート、及びインバータ等の論理回路を用いている。キャッシュメモリは、プロセッサ外に配置されている。しかし、キャッシュメモリの殆どは複数のキャッシュラインを備えている。各キャッシュメモリに読み出されるデータは、キャッシュメモリ毎に決定される。キャッシュラインの対応関係は、何れかのキャッシュメモリでのデータの読み出し、或いは追い出し等により、随時、変化する。このようなことから、複数のキャッシュラインを備えたキャッシュメモリを採用した場合、従来のマルチプロセッサシステムでは、配線数、及び論理回路の組み合わせの規模が共に非常に大きくなる。それにより、従来のマルチプロセッサシステムに採用された手法は、事実上、現実的ではない。
 従来のマルチプロセッサシステムでは、訂正データが格納されたキャッシュラインにおけるモディファイ状態への遷移はエラー制御判定部が行うようになっている。このことから、各キャッシュメモリにおける各キャッシュラインの状態遷移をエラー制御判定部に行わせることが考えられる。しかし、上記のように、各キャッシュメモリに読み出されるデータは、キャッシュメモリ毎に決定され、各キャッシュメモリ間におけるキャッシュラインの対応関係は、随時、変化する。このことから、エラー制御判定部は、異なるキャッシュメモリの間でキャッシュラインの対応関係を特定できなければならない。キャッシュラインの対応関係を特定できるようにするためには、エラー制御判定部は、各キャッシュメモリの動作を監視しなければならない。このようなことから、エラー制御判定部は、訂正可能なエラーに対応するために複雑な制御を行わなければならない。制御が複雑化するほど、適用に時間が掛かるようになり、コストも上昇する傾向がある。このことを考慮するならば、訂正可能なエラーへの対応は、より簡単な制御で行えるようにするのが重要と思われる。
特開2011-100269号公報 特開2010-9102号公報
 1側面では、本発明は、制御の複雑化を抑えつつ、複数のプロセッサに共有されるメモリのデータに発生した訂正可能なエラーに対応するための技術を提供することを目的とする。
 本発明を適用した1システムは、キャッシュメモリを備えた複数のプロセッサと、複数のプロセッサによって共有されるメモリと、メモリから読み出されて複数のプロセッサのうちの何れかに搭載されたキャッシュメモリに格納されるデータに発生した訂正可能なエラーを検出し、該エラーを訂正した訂正データを出力するエラー訂正部と、エラー訂正部が出力する訂正データが格納されたキャッシュメモリのキャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行するコマンド発行部と、を具備する。
 本発明を適用した1システムでは、制御の複雑化を抑えつつ、複数のプロセッサに共有されるメモリのデータに発生した訂正可能なエラーに対応することができる。
本実施形態によるマルチプロセッサシステムの構成例を説明する図である。 MSIプロトコルにおける状態遷移を説明する図である。 自プロセッサ内で発行されるコマンド別、及びキャッシュ状態別のキャッシュメモリの動作概要を説明する図である。 他のプロセッサ内で処理されるコマンド別、及びキャッシュ状態別のキャッシュメモリの動作概要を説明する図である。 リードコマンドがミスする場合に、プロセッサコア、キャッシュメモリ、インターコネクト、及びメモリの間で連携される動作の流れを表すタイミングチャートである。 本実施形態によるキャッシュメモリの動作の流れを表すフローチャートである。
 以下、本発明の実施形態について、図面を参照しながら詳細に説明する。
 図1は、本実施形態によるマルチプロセッサシステムの構成例を説明する図である。図1に表すように、本実施形態によるマルチプロセッサシステムは、計4個のプロセッサ1(1-0~1-3)、クロスバネットワーク2、メモリ制御部3、及び主記憶装置であるメモリ4を備えている。各プロセッサ1、メモリ制御部3、及びメモリ4は、それぞれクロスバネットワーク2と接続されている。
 各プロセッサ1は、本実施形態によるプロセッサであり、1つのプロセッサコア11、及びキャッシュメモリ12を備えている。プロセッサコア11の数は、2つ以上であっても良い。キャッシュメモリ12も複数、備えていても良い。図1に表すキャッシュメモリ12は、例えばクロスバネットワーク2を介して受信したデータの格納に用いられる2次キャッシュメモリである。
 キャッシュメモリ12は、本実施形態によるキャッシュメモリである。本実施形態によるプロセッサ1は、本実施形態によるキャッシュメモリ12を搭載することで実現されている。
 メモリ4は、各プロセッサ1が共有するリソースであり、4つのメモリバンク41(41-0~41-3)を備えている。各メモリバンク41は、メモリ制御部3の制御によるアクセスの管理単位であり、1枚以上のメモリモジュールに相当する。各メモリモジュールには、1つ以上のメモリセル41aが搭載されている。
 なお、本実施形態では、プロセッサ1は4個となっているが、プロセッサ1の数は特に限定されない。また、メモリ4は、4つのメモリバンク41を備えているが、メモリバンク41の数、メモリバンク41の種類等も特に限定されない。
 クロスバネットワーク2は、任意のプロセッサ11から任意のメモリバンク41への並行したアクセスを可能にするネットワークである。図1にはクロスバは表していないが、各メモリバンク41に1回のアクセスで読み出し、或いは書き込むデータが72ビットであった場合、クロスバネットワーク2は72ビットのデータ転送が可能な数のクロスバを備えている。72ビットのデータであった場合、72ビットのうち、8ビットはECCデータである。
 図1には、4つの調停部21(21-0~21-3)、及び4つのセレクタ22(22-0~22-3)を表している。4つの調停部21は、それぞれ、4個のプロセッサ1からの要求(コマンド)のうちの一つを選択し、対応するメモリバンク41、及びメモリ制御部3に出力するための機構である。
 各調停部21は、1つのコマンドを選択するためのセレクタ211を備えている。また、特には図示していないが、各調停部21は、各プロセッサ1からの要求を格納する4つのメモリ、及びセレクタ211にコマンドを選択させるプロセッサ1を決定する制御部を備えている。4つのメモリバンク41はそれぞれクロスバ群と接続されている。
 4つのセレクタ22は、各メモリバンク41から読み出されたデータの転送先とするプロセッサ1の選択に用いられる。それにより、各セレクタ22は、クロスバ群と接続されている。各セレクタ22の選択制御は、例えばメモリ制御部3によって行われる。図1中、プロセッサ1-0に搭載されたキャッシュメモリ12は「キャッシュ0」と表記している。同様に、「キャッシュ3」は、プロセッサ1-3に搭載されたキャッシュメモリ12を表している。このことから、各メモリバンク41から読み出されたデータの各プロセッサ1への転送は、対応するセレクタ22を介して行われる。
 各プロセッサ1のキャッシュメモリ12は、タグ部121、データ部122、調停部123、ミス制御部124、タグ(TAG)ステート生成部125、比較器126、CE(Correctable Error)制御部127、及び2つのECC訂正部128、129を備えている。ここでは、キャッシュプロトコルとしてMSIプロトコルが採用されていると想定する。図1に表す構成は、一例であり、採用するキャッシュプロトコルと共に、特に限定されない。
 プロセッサコア11は、例えば必要なデータ、或いは書き込むべきデータ等が発生した場合、キャッシュメモリ12にコマンドを発行する。データのリードを要求するリードコマンドには、コマンドの種類を表すコマンドコード、及びアドレスが格納される。データのライトを要求するライトコマンドには、コマンドコード、アドレスに加えて、ライトすべきデータが格納される。プロセッサコア11から発行されたコマンドは、調停部123を介してミス制御部124、タグ部121、データ部122に出力される。
 タグ部121及びデータ部122は、それぞれ同じ数のエントリを備える。1つのキャッシュラインは、タグ部121の1エントリと、データ部122の1エントリとを含む。ここでは、便宜的に、キャッシュメモリ12にはダイレクトマップ方式が採用されていると想定する。ダイレクトマップ方式では、アドレスに対応するデータを格納できるデータ部122のエントリ(空間)は1つのみである。このことから、ダイレクトマップ方式では、1つのキャッシュラインは、タグ部121の1エントリと、データ部122の対応する1エントリとを含む構成となる。
 コマンドに格納されるアドレスは、キャッシュラインの索引に用いられるインデックスアドレスとタグ部121の各エントリに格納されているタグアドレスを含む。しかし、アドレスの構成自体は特には重要ではない。このことから、特に詳細な説明は省略する。
 調停部123から出力されたコマンドのインデックスアドレスとタグアドレスは、タグ部121に入力され、そのインデックスアドレスによって指定されるタグ部121のエントリに格納されたタグアドレスの読み出しに用いられる。タグ部121から読み出されたタグアドレスは、調停部123から出力されたコマンドのタグアドレスと共に比較器126に入力され、それら2つのタグアドレスの比較結果がヒット情報として比較器126から出力される。そのヒット情報は、それらのタグアドレスが一致すれば対象のデータが存在する、つまりヒットしたことを表すものとなり、それらのタグアドレスが一致しなければ対象のデータは存在しない、つまりミスヒットしたことを表すものとなる。
 コマンドがリードコマンドであった場合、ヒットによってデータ部122に格納されていた対応するデータが読み出される。読み出されるデータにはECCデータが含まれている。データ部122から読み出されたデータはECC訂正部128に出力される。
 ECC訂正部128は、入力したデータに含まれるECCデータを用いて訂正可能なエラー(コレクタブルエラー)の検出を行い、コレクタブルエラーを検出した場合に訂正を行う。それにより、コレクタブルエラーが発生していない場合、或いはコレクタブルエラーが発生している場合、ECC訂正部128は適切なデータを出力する。ここでは、ECC訂正部128から出力されたデータはプロセッサコア11に入力されると想定する。
 比較器126が出力するヒット情報は、プロセッサコア11側と共に、ミス制御部124に出力される。ミス制御部124は、ミスヒットに対応するための制御を行う。例えばリードコマンドがヒットしなかった場合、ミス制御部124は、そのリードコマンドで要求されたデータを格納するキャッシュラインを決定し、要求されたデータを決定したキャッシュラインに読み出すためのコマンドを生成する。生成されたコマンドはクロスバネットワーク2を介してメモリ制御部3に転送される。それにより、メモリ制御部3は、要求されたデータが格納されているメモリバンク41からその要求されたデータを読み出す。読み出されたデータは、クロスバネットワーク2を介して、コマンドの出力元であるプロセッサ1に転送される。
 各メモリバンク41から読み出されてプロセッサ1に転送されるデータにはECCデータが含まれる。プロセッサ1に転送されたデータは、ECC訂正部129に入力され、ECC訂正部129によるコレクタブルエラーの検出および訂正が行われる。それにより、コレクタブルエラーの検出時には、訂正されたデータがECC訂正部129から出力される。ECC訂正部129から出力されたデータは、データ部122の対応するエントリに書き込まれる。コレクタブルエラーが訂正されたか否かに係わらず、新たにデータが読み出されたキャッシュラインにはシェア状態が設定される。
 ECC訂正部129は、コレクタブルエラーを検出した場合、コレクタブルエラーの発生をミス制御部124に通知する。ミス制御部124は、ECC訂正部129からの通知により、コレクタブルエラーが発生したコマンドのインデックスアドレスとタグアドレスをCE制御部127に出力する。
 メモリ4から転送されたデータに発生しているコレクタブルエラーは、メモリ4上のデータに発生しているコレクタブルエラーによって検出された可能性がある。この可能性は、キャッシュメモリ12上のデータの内容がメモリ4上のデータの内容と異なっている可能性があることを意味する。このことから、CE制御部127は、ミス制御部124から入力したインデックスアドレスとタグアドレス用いて、コレクタブルエラーの訂正後のデータが格納されたキャッシュラインをモディファイ状態に遷移させるためのコマンドを生成して出力する。CE制御部127から出力されたコマンドは調停部123を介してミス制御部124等に入力される。
 本実施形態では、CE制御部127に生成させるコマンドとしてライトプリフェッチコマンドを採用している。ライトプリフェッチコマンドは、将来ライトするアドレスを予めキャッシュヒット状態にするためのキャッシュ判定アクセスであり、ミスであればヒット状態へ遷移させる動作を発生させるコマンドである。CE制御部127に生成させるコマンドは、結果的にキャッシュ状態をモディファイ状態に遷移させるコマンドであれば良い。このことから、コマンドはライトプリフェッチコマンドに限定されない。
 ライトプリフェッチコマンドを入力したミス制御部124は、入力したライトプリフェッチコマンド中のインデックスアドレスとタグアドレスで指定されるキャッシュラインの状態データを参照し、キャッシュ状態を確認する。確認の結果、キャッシュ状態がインバリッド状態、或いはシェア状態であった場合、ミス制御部124は、キャッシュラインの無効化を要求するメッセージをブロードキャストする。
 このメッセージは、他のプロセッサ1に搭載されたキャッシュメモリ12もタグステート生成部125によって処理される。タグステート生成部125は、このメッセージを受信すると、そのメッセージによって指定されるキャッシュラインが存在する場合に、そのキャッシュラインのキャッシュ状態をインバリッド状態に遷移させ、応答を返す。メッセージを送信したキャッシュメモリ12のミス制御部124は、他のプロセッサ1のキャッシュメモリ12からの応答を受信するのを待って、タグステート生成部125に、対応するキャッシュラインのキャッシュ状態をモディファイ状態に遷移させる。
 このようにして、本実施形態では、メモリ4からリードしたデータにコレクタブルエラーが発生した場合、コレクタブルエラーを訂正したデータをキャッシュラインに格納し、そのキャッシュラインをモディファイ状態に遷移させるコマンドを発行する。このため、コレクタブルエラーを訂正したデータは、追い出す際に行われるライトバックにより、メモリ4に反映させることができる。
 発行するコマンドは、キャッシュメモリ12に処理させるコマンドである。このため、キャッシュメモリ12間で特殊な情報を送受信する必要はない。それにより、キャッシュメモリ12間の接続に用いる配線は増やさなくとも良い。
 本実施形態では、CE制御部127が発行したコマンドと、プロセッサコア11側からのコマンドとを適切な順序で処理させるために調停部123を設けている。このため、コマンドの発行は、コレクタブルエラーの発生を契機に行えば良い。CE制御部127が発行するライトプリフェッチコマンドは既存のコマンドであることから、調停部123による調停方法としては周知の方法(アルゴリズム)を採用して良い。このように、コレクタブルエラーの発生を契機に、既存のコマンドを発行し、コレクタブルエラーを訂正したデータをメモリ4上に反映可能な状態に移行させることから、コレクタブルエラーに対応するための制御は事実上、非常に簡単なものとなる。
 図2は、MSIプロトコルにおける状態遷移を説明する図である。図3A及び図3Bは、コマンド別、及びキャッシュ状態別のキャッシュメモリの動作概要を説明する図である。図3Aは、キャッシュメモリ12が自プロセッサ1内で発行されるコマンドを処理する場合の動作概要を表し、図3Bは、他のプロセッサ1のキャッシュメモリ12によるコマンドの処理に応じた動作概要を表している。図4は、リードコマンドがミスする場合に、プロセッサコア、キャッシュメモリ、インターコネクト、及びメモリの間で連携される動作の流れを表すタイミングチャートである。次に図2~図4を参照し、キャッシュメモリ12の動作について具体的に説明する。
 上記のように、コマンドは、ミスヒット以外に、キャッシュ状態によっても実行できない。例えばリードコマンドでは、キャッシュ状態がインバリッド状態ST3であった時にも実行できない。このことから、図4の説明では、ミスヒット、或いはキャッシュ状態によりコマンドを実行できないことを「ミス」と総称している。
 図2、図3A或いは図3Bにおいて、「CR」はCoherency Read、「CRI」はCoherency Read Invalidate、「CI」はCoherency Invalidate、「WB」はWrite Back、「NOP」はNo Operationの略記である。キャッシュメモリ12間では、キャッシュコヒーレンシを実現させるためにメッセージの送受信が行われる。そのメッセージは「スヌープ」と表記している。「DT」はスヌープのデータ応答を表している。
 図2では、コマンドとして、CR、CRI、及びCIの他に、「ライト」「リード」「リプレース」「リードプリフェッチ」及び「ライトプリフェッチ」を表している。これらは、以下のようなコマンドである。
 CRは、メモリ4上のデータを読み出すためのコマンドである。CRIは、メモリ4上のデータの読み出しと共に、そのデータを有するキャッシュラインの無効化を全てのキャッシュメモリ12に要求するためのコマンドである。CIは、指定するキャッシュラインの無効化を全てのキャッシュメモリ12に要求するためのコマンドである。
 ライトコマンドは、キャッシュラインのデータを更新するためのコマンドである。リードは、キャッシュラインのデータを読み出すためのコマンドである。リプレースは、キャッシュラインを追い出す、つまりキャッシュラインのデータをライトバックするためのコマンドである。
 先ず、図2、図3A及び図3Bを参照し、キャッシュメモリ12の動作について具体的に説明する。
 インバリッド状態ST3のキャッシュラインは、メモリ4上のデータを読み出す対象となる。リードコマンド、或いはリードプリフェッチコマンドでは、インバリッド状態ST3のキャッシュラインはミスヒットとなる。このことから、リードコマンド、或いはリードプリフェッチコマンドの対象となるキャッシュラインがインバリッド状態ST3であった場合、ミス制御部124が起動してCRが発行され、このキャッシュラインにメモリ4からのデータが読み出される。このデータの読み出しにより、キャッシュ状態はインバリッド状態ST3からシェア状態ST2に遷移する(SQ1)。
 メモリ4から転送されたデータにコレクタブルエラーが発生した場合、ECC訂正部129からその旨がミス制御部124に通知される。その結果、CE制御部127が起動し、CE制御部127はライトプリフェッチコマンドを発行する。このため、CE制御部127が発行するライトプリフェッチコマンドは、シェア状態ST2のキャッシュラインが対象となる。
 インバリッド状態ST3のキャッシュラインに対して発行されるライトコマンド、及びライトプリフェッチコマンドもミスヒットとなる。このことから、ミス制御部124が起動してCRIが発行される。それにより、キャッシュラインにはメモリ4から読み出されたデータが格納され、キャッシュ状態はインバリッド状態ST3からモディファイ状態ST1に遷移する(SQ2)。インバリッド状態ST3は、他のキャッシュメモリ12がCR、CRI、及びCIの何れのコマンドを発行しても維持される。
 シェア状態ST2のキャッシュラインでは、他のキャッシュメモリ12の発行するCI、及びCRIにより、キャッシュ状態がインバリッド状態ST3に遷移する(SQ3)。インバリッド状態ST3への遷移は、他のキャッシュメモリ12からブロードキャストされるスヌープをタグステート生成部125が処理して、対応するキャッシュラインの状態データを更新することで行われる。リプレースコマンドは、キャッシュラインを追い出すためのコマンドである。このことから、リプレースコマンドは、シェア状態ST2からインバリッド状態ST3に遷移させる(SQ3)。
 シェア状態ST2のキャッシュラインでは、ライトコマンド、及びライトプリフェッチコマンドは共にミスヒットとなる。それにより、ミス制御部124が起動してCIがブロードキャストされ、他のキャッシュメモリ12は応答を返す。この応答はタグステート生成部125によって処理され、対応するキャッシュラインの状態データはモディファイ状態ST1を表す内容に更新される(SQ4)。
 上記のように、CRによってメモリ4から読み出されたデータにコレクタブルエラーが発生した場合、ライトプリフェッチコマンドがCE制御部127から発行される。このため、CRによってメモリ4から読み出されたデータが格納されるキャッシュラインは、インバリッド状態ST3→シェア状態ST2→モディファイ状態ST1、の順序でキャッシュ状態が遷移することとなる。
 シェア状態ST2のキャッシュラインでは、リードコマンド、若しくはリードプリフェッチコマンドがヒットするか、或いはCRのスヌープを受信しても、シェア状態ST2は維持される(SQ5)。
 モディファイ状態ST1のキャッシュラインでは、リプレースコマンド、或いはCRIのスヌープの受信により、インバリッド状態ST3に遷移する(SQ6)。リプレースコマンドの場合、キャッシュラインのデータはライトバックされる。コレクタブルエラーが訂正されたデータは、リプレースコマンドによりメモリ4上に反映される。
 モディファイ状態ST1のキャッシュラインでは、CRのスヌープの受信により、キャッシュ状態はシェア状態ST2に遷移する(SQ7)。キャッシュラインのデータはライトバックされ、CRを発行したキャッシュメモリ12は、ライトバックにより更新された後のデータを取得する。モディファイ状態ST1は、リードコマンド、ライトコマンド、リードプリフェッチコマンド、及びライトプリフェッチコマンドの何れかヒットしても維持される(SQ8)。
 上記のように、MSIプロトコルが採用されたキャッシュメモリ12では、キャッシュラインのキャッシュ状態は、処理するコマンドの種類、コマンドを処理する際のキャッシュ状態、ヒットしたか否か、他のキャッシュメモリ12の動作に応じて遷移する。モディファイ状態ST1となっているキャッシュラインは、他のキャッシュメモリ12がCRIを実行しない限り、ライトバックが行われる。本実施形態では、このことを利用し、コレクタブルエラーを訂正したデータが格納されるキャッシュラインは、モディファイ状態ST1に遷移させることにより、ライトバック時にメモリ4上に反映させるようにしている。ライトバックによりメモリ4上に実際に書き込まれるデータは、訂正されたデータ、或いは訂正されたデータから内容が更新されたデータである。
 メモリ4上のデータのキャッシュメモリ12への読み出しは、リードコマンドがミスした場合に行われる。リードコマンドを実行できない場合、図4に表すように、プロセッサコア11、キャッシュメモリ12、インターコネクト、及びメモリ4は動作する。ここでのインターコネクトは、クロスバネットワーク2、或いはクロスバネットワーク2と各プロセッサ1のキャッシュメモリ12が相当する。リードコマンドは、プロセッサコア11が発行すると想定している。また、図4では、理解を容易とするために、説明上、必要と考えるシーケンスのみを表している。
 リードミスが発生した場合(図4中、単に「リードミス」と表記のケース)、ミス制御部124は、リードコマンドが要求するデータをメモリ4から読み出すためのCRを発行する。発行されたCRは、インターコネクト、つまりクロスバネットワーク2を介してメモリ制御部3に転送され、メモリ制御部3の制御によってCRが要求するデータがメモリ4から読み出される。読み出されたデータは、インターコネクト、つまりクロスバネットワーク2を介して、CRを発行したキャッシュメモリ12に転送される。キャッシュメモリ12に転送されたデータは、ECC訂正部129を介してデータ部122に出力され、対応するエントリ(キャッシュライン)に格納される。格納されたデータは、プロセッサコア11に出力される。データを格納したキャッシュメモリのキャッシュ状態は、シェア状態ST2とされる。
 ECC訂正部129は、メモリ4から転送されたデータにコレクタブルエラーを検出した場合(図4中「リードミス(コレクタブルエラー)」と表記のケース)、コレクタブルエラーを訂正したデータをデータ部122に出力すると共に、コレクタブルエラーが発生している旨をミス制御部124に通知する。その通知により、ミス制御部124は、訂正データが格納されたキャッシュラインのインデックスアドレスとタグアドレスをCE制御部127に出力する(SA1)。
 CE制御部127は、ミス制御部124から入力したインデックスアドレスとタグアドレスを用いてライトプリフェッチコマンドを生成し、調停部123に出力する(SA2)。調停部123は、予め定められたアルゴリズムに従って、プロセッサコア11からのコマンドと、CE制御部127が出力したプリフェッチコマンドとを対象にした調停を行い、選択したコマンドを出力する。
 CE制御部127が出力したライトプリフェッチコマンドを調停部123が選択した場合、ライトプリフェッチコマンドを入力したミス制御部124は、CIのスヌープをクロスバネットワーク2にブロードキャストする(SA3)。他のプロセッサ1のキャッシュメモリ12は、CIのスヌープの受信により、対応するキャッシュラインのキャッシュ状態をインバリッド状態ST3に遷移させ(SA4)、応答をクロスバネットワーク2に送信する(SA5)。それにより、応答DTはクロスバネットワーク2を介して、CIをブロードキャストしたプロセッサ1のキャッシュメモリ12に受信される。このようなことから、ここでのインターコネクトは、クロスバネットワーク2、及び各プロセッサ1が相当する。
 応答を受信したキャッシュメモリ12は、対応するキャッシュラインのキャッシュ状態をシェア状態ST2からモディファイ状態ST1に遷移させる。以降、キャッシュラインのデータは、プロセッサコア11から発行されるコマンドに従って、随時、読み出し、或いは更新される。
 ミス制御部124は、リードミスが発生した場合、メモリ4から読み出すデータを格納させるキャッシュラインを予め定められたアルゴリズムに従って選択する。このとき、CE制御部127が発行したライトプリフェッチコマンドによりモディファイ状態ST1に遷移させたキャッシュラインがミス制御部124によって選択された場合(図4中「リードミス&ライトバック」と表記のケース)、以下のようなシーケンスが発生する。
 ミス制御部124は、リードコマンドのミスヒットによりCRを発行し、選択したキャッシュラインに格納するデータのメモリ4からの読み出しを行う。このときのシーケンスは、通常のミスヒット時と同じであることから、説明は省略する。
 一方、ミス制御部124は、選択したキャッシュラインがモディファイ状態ST1であることから、キャッシュラインに格納されたデータを用いて、データのライトを要求するコマンド(以降、便宜的に「ライトバックコマンド」と表記)を生成・発行し、クロスバネットワーク2に送信する(SA11)。クロスバネットワーク2に送信されたコマンドは、調停部21を介してメモリ制御部3、及び対応するメモリバンク41に送信される(SA12)。
 メモリ制御部3は、受信したライトバックコマンドを処理し、ライトバックコマンドに格納されているデータを対応するメモリバンク41に格納させる(SA13)。その後、メモリ制御部3は、ライトバックコマンドを送信したプロセッサ1宛の応答をクロスバネットワーク2に送信する(SA14)。ライトバックコマンドを発行したキャッシュメモリ12は、クロスバネットワーク2を介して応答を受信する(SA15)。
 上記ライトバックの際のシーケンスは、通常のライトバック時のシーケンスと同じである。このことから、訂正したデータを格納したキャッシュラインのキャッシュ状態をシェア状態ST2からモディファイ状態ST1に遷移させることにより、その後に特別な制御を行う必要性は回避される。
 図5は、本実施形態によるキャッシュメモリの動作の流れを表すフローチャートである。ここでは、理解を容易とするために、1つのコマンドに着目し、コマンドが処理される流れを表している。コマンドとしては、リードコマンド、或いはリードプリフェッチコマンドのリード系、及びライトコマンド、及びライトプリフェッチコマンドのライト系のみを想定している。コマンドはヒットすることを前提、言い換えれば、コマンドを実行できないミスが発生するのはキャッシュ状態が不適切となっているケースのみを想定している。最後に図5を参照し、本実施形態によるキャッシュメモリ12の動作について詳細に説明する。
 コマンドは、プロセッサコア11、及びCE制御部127の何れかに係わらず、調停部123に入力され、調停部123により選択されるのを待つ(S1)。調停部123に選択された場合(S1:n)、選択されたコマンドはミス制御部124に入力され、選択されたコマンドのインデックスアドレスはタグ部121に、タグアドレスは比較器126に出力される(S2)。これにより、比較器126はヒット情報を出力することができる。しかし、ここでは、上記のように、ヒット情報は常にヒットを表すことを想定する。
 ミス制御部124は、入力したコマンドがリード系、及びライト系の何れであるかの判定を行う(S3)。入力したコマンドがライト系とミス制御部124が判定した場合(S3:ライト)、ミス制御部124は、入力したコマンドによって指定されるキャッシュラインのキャッシュ状態の確認を行う(S4)。
 このとき、キャッシュ状態がモディファイ状態ST1とミス制御部124が判定した場合(S4:モディファイ)、コマンド中のデータがデータ部122の対応するエントリに格納され、プロセッサコア11に、コマンドが処理された旨を表す応答が出力される(S5)。それにより、コマンドの処理が完了する。
 一方、キャッシュ状態がインバリッド状態ST3或いはシェア状態ST2とミス制御部124が判定した場合(S4:インバリッド/シェア)、ミス制御部124はCI、或いはCRIを発行し、発行するコマンドに応じたスヌープをブロードキャストする(S6)。その後は、ミス制御部124は、各プロセッサ1のキャッシュメモリ12、或いは各プロセッサ1のキャッシュメモリ12とメモリ4からの応答を受信するのを待つ(S7)。
 ミス制御部124が発行したコマンドがCIだった場合、スヌープのみがブロードキャストされる。その場合、各プロセッサ1のキャッシュメモリ12からの応答を受信するのを待って(S7:n)、タグステート生成部125は対応するキャッシュラインのキャッシュ状態をシェア状態ST2からモディファイ状態ST1に遷移させる。それにより、コマンドの処理が完了する。
 ミス制御部124が発行したコマンドがCRIだった場合、メモリ4からのデータの読み出し、及びスヌープのブロードキャストが行われる。その場合、メモリ4からのデータの読み出し、及び各プロセッサ1のキャッシュメモリ12からの応答を受信するのを待って(S7:n)、タグステート生成部125は対応するキャッシュラインをインバリッド状態ST3からモディファイ状態ST1に遷移させる。メモリ4から読み出されたデータはデータ部122の対応するエントリに格納され、プロセッサコア11には応答が出力される(S8)。そのようなことが行われた後、コマンドの処理が完了する。
 入力したコマンドがリード系とミス制御部124が判定した場合(S3:リード)、ミス制御部124は、入力したコマンドによって指定されるキャッシュラインのキャッシュ状態の確認を行う(S9)。
 このとき、キャッシュ状態がモディファイ状態ST1、或いはシェア状態ST2とミス制御部124が判定した場合(S9:モディファイ/シェア)、コマンドが指定するキャッシュラインのデータが応答としてプロセッサコア11に出力される。それにより、コマンドの処理が完了する。
 一方、キャッシュ状態がインバリッド状態ST3とミス制御部124が判定した場合(S9:インバリッド)、ミス制御部124はCRを発行し、発行するコマンドに応じたスヌープをブロードキャストする(S11)。その後は、ミス制御部124は、各プロセッサ1のキャッシュメモリ12からの応答DT、あるいはメモリ4から読み出されるデータを受信するのを待つ(S12)。各キャッシュメモリ12からの応答DT、あるいはメモリ4からのデータを受信した場合(S12:n)、次にミス制御部124は、メモリ4からのデータにコレクタブルエラーが発生したか否かの判定を行う(S13)。
 ECC訂正部129がコレクタブルエラーの発生を通知しなかった場合(S13:n)、データはデータ部122の対応するエントリに格納され、プロセッサコア11に出力される。タグ部121の対応するエントリには、コマンドのタグアドレス、及びシェア状態ST2を表す状態データが格納される(以上S15)。それにより、コマンドの処理が完了する。
 一方、ECC訂正部129がコレクタブルエラーの発生を通知した場合(S13:y)、ミス制御部124は、CE制御部127を起動し、コマンドのインデックスアドレスとタグアドレスをCE制御部127に出力する。それにより、ミス制御部124は、CE制御部127にライトプリフェッチコマンドを生成・発行させる(以上S14)。メモリ4から読み出されたデータは、ECC訂正部129により訂正された後、データ部122の対応するエントリに格納され、プロセッサコア11に出力される。タグ部121の対応するエントリには、コマンドのタグアドレス、及びシェア状態ST2を表す状態データが格納される(以上S15)。それにより、コマンドの処理が完了する。
 なお、本実施形態では、メモリ4から読み出されたデータに発生したコレクタブルエラーの検出、及び訂正は、キャッシュメモリ12内で行っているが、キャッシュメモリ12外で行うようにしても良い。これは、キャッシュメモリ12では、コレクタブルエラーの発生の認識、コレクタブルエラーが訂正されたデータの取得を行えるのであれば、ライトプリフェッチコマンドの発行により、適切なデータをメモリ4上に反映できるからである。ECC訂正部129のような部品は、各メモリバンク41内、或いはクロスバネットワーク2内に設けても良い。
 また、メモリ4は、1つのみとなっているが、メモリ4の数、接続形態、等も本実施形態に限定されない。マルチプロセッサシステムは、異なる接続形態のメモリ4を複数、備えていても良い。

Claims (5)

  1.  キャッシュメモリを備えた複数のプロセッサが共有するメモリから読み出されたデータに発生している訂正可能なエラーを訂正するためのデータ訂正方法であって、
     前記メモリから読み出されたデータに前記訂正可能なエラーが発生した場合に、該エラーを訂正した訂正データをエラー訂正部に生成させ、
     前記エラーが発生したデータを要求するプロセッサが備えたキャッシュメモリのキャッシュラインに、前記訂正データを格納させ、
     前記訂正データを前記キャッシュラインに格納した前記キャッシュメモリを備えたプロセッサである第1のプロセッサに、該キャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行させ、
     前記第1のプロセッサが備えたキャッシュメモリに、前記訂正データを格納したキャッシュラインのデータを前記メモリに反映させる、
     ことを特徴とするデータ訂正方法。
  2.  キャッシュメモリを備えた複数のプロセッサと、
     前記複数のプロセッサによって共有されるメモリと、
     前記メモリから読み出されて前記複数のプロセッサのうちの何れかに搭載されたキャッシュメモリに格納されるデータに発生した訂正可能なエラーを検出し、該エラーを訂正した訂正データを出力するエラー訂正部と、
     前記エラー訂正部が出力する前記訂正データが格納された前記キャッシュメモリのキャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行するコマンド発行部と、
     を具備することを特徴とするマルチプロセッサシステム。
  3.  データが格納されるキャッシュラインを複数、備えた記憶部と、
     外部のメモリから読み出されたデータに発生した訂正可能なエラーを検出し、該エラーを訂正した訂正データを前記記憶部に出力するエラー訂正部と、
     前記エラー訂正部が前記訂正データを出力した場合に、該訂正データが格納されたキャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行するコマンド発行部と、
     を具備することを特徴とするプロセッサ。
  4.  前記コマンド発行部が発行するコマンドと、プロセッサコア側からのコマンドとを入力し、調停を行う調停部、を更に具備する、
     ことを特徴とする請求項3記載のプロセッサ。
  5.  データが格納されるキャッシュラインを複数、備えた記憶部と、
     外部のメモリから読み出されたデータに発生した訂正可能なエラーを検出し、該エラーを訂正した訂正データを前記記憶部に出力するエラー訂正部と、
     前記エラー訂正部が前記訂正データを出力した場合に、該訂正データが格納されたキャッシュラインの状態を、該キャッシュラインのデータの内容が更新されていることを表す更新状態に移行させるコマンドを発行するコマンド発行部と、
     を具備することを特徴とするキャッシュメモリ。
PCT/JP2012/067241 2012-07-05 2012-07-05 データ訂正方法、マルチプロセッサシステム、及びプロセッサ WO2014006732A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/067241 WO2014006732A1 (ja) 2012-07-05 2012-07-05 データ訂正方法、マルチプロセッサシステム、及びプロセッサ

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/067241 WO2014006732A1 (ja) 2012-07-05 2012-07-05 データ訂正方法、マルチプロセッサシステム、及びプロセッサ

Publications (1)

Publication Number Publication Date
WO2014006732A1 true WO2014006732A1 (ja) 2014-01-09

Family

ID=49881522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/067241 WO2014006732A1 (ja) 2012-07-05 2012-07-05 データ訂正方法、マルチプロセッサシステム、及びプロセッサ

Country Status (1)

Country Link
WO (1) WO2014006732A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021144606A (ja) * 2020-03-13 2021-09-24 Necプラットフォームズ株式会社 キャッシュ制御装置、キャッシュシステムおよびキャッシュ制御方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59215095A (ja) * 1983-05-20 1984-12-04 Hitachi Ltd 階層記憶装置の制御方式
JPS6246358A (ja) * 1985-08-23 1987-02-28 Fujitsu Ltd エラ−処理方式
JPH05165719A (ja) * 1991-12-18 1993-07-02 Nec Eng Ltd メモリアクセス処理装置
JPH05289947A (ja) * 1992-04-14 1993-11-05 Hitachi Ltd Eccチェック方式
JP2010009102A (ja) * 2008-06-24 2010-01-14 Toshiba Corp キャッシュメモリ、コンピュータシステム、及びメモリアクセス方法
JP2011100269A (ja) * 2009-11-05 2011-05-19 Renesas Electronics Corp キャッシュシステム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59215095A (ja) * 1983-05-20 1984-12-04 Hitachi Ltd 階層記憶装置の制御方式
JPS6246358A (ja) * 1985-08-23 1987-02-28 Fujitsu Ltd エラ−処理方式
JPH05165719A (ja) * 1991-12-18 1993-07-02 Nec Eng Ltd メモリアクセス処理装置
JPH05289947A (ja) * 1992-04-14 1993-11-05 Hitachi Ltd Eccチェック方式
JP2010009102A (ja) * 2008-06-24 2010-01-14 Toshiba Corp キャッシュメモリ、コンピュータシステム、及びメモリアクセス方法
JP2011100269A (ja) * 2009-11-05 2011-05-19 Renesas Electronics Corp キャッシュシステム

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021144606A (ja) * 2020-03-13 2021-09-24 Necプラットフォームズ株式会社 キャッシュ制御装置、キャッシュシステムおよびキャッシュ制御方法

Similar Documents

Publication Publication Date Title
CN108885583B (zh) 高速缓存存储器访问
TW591384B (en) Method and system for speculatively invalidating lines in a cache
AU2013217351B2 (en) Processor performance improvement for instruction sequences that include barrier instructions
US9372808B2 (en) Deadlock-avoiding coherent system on chip interconnect
US6636949B2 (en) System for handling coherence protocol races in a scalable shared memory system based on chip multiprocessing
US8108619B2 (en) Cache management for partial cache line operations
US8504779B2 (en) Memory coherence directory supporting remotely sourced requests of nodal scope
JP4474570B2 (ja) キャッシュコヒーレンシ制御方法
US11789868B2 (en) Hardware coherence signaling protocol
US20110087841A1 (en) Processor and control method
JP2005234854A (ja) マルチプロセッサシステム
JP2000250883A (ja) 不均等メモリ・アクセス・システムにおいてトランザクションのキャンセルによるデータ損失を避けるための方法およびシステム
JP2000250884A (ja) 不均等メモリ・アクセス・コンピュータ・システムにおいてエヴィクション・プロトコルを提供するための方法およびシステム
US6996693B2 (en) High speed memory cloning facility via a source/destination switching mechanism
JP2009252165A (ja) マルチプロセッサシステム
JP5499987B2 (ja) 共有キャッシュメモリ装置
JP2004199677A (ja) キャッシュを動作させるためのシステム及び方法
JP5408713B2 (ja) キャッシュメモリ制御システム及びキャッシュメモリの制御方法
JP5021978B2 (ja) マルチプロセッサシステム及びその動作方法
WO2014006732A1 (ja) データ訂正方法、マルチプロセッサシステム、及びプロセッサ
JP2011008674A (ja) 二重化情報処理システム及び同期化方法
US20090300313A1 (en) Memory clearing apparatus for zero clearing
US6986013B2 (en) Imprecise cache line protection mechanism during a memory clone operation
JP6028470B2 (ja) 演算処理装置、情報処理装置および演算処理装置の制御方法
JP5375876B2 (ja) マルチプロセッサシステム

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: 12880667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12880667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP