Memory controller and method for scrubbing memory without using explicit atomic operations
Summary by NHIP
Memory scrubbing without atomic ops
The memory controller scrubs memory by issuing commands that avoid explicit atomic read-correct-write operations. It waits for pending writes to a cacheline, loads a scrub write command with a data dependency on a subsequent scrub read, corrects single-bit and single-symbol errors, and ensures processor reads receive higher priority than scrub reads.
Claim Score by NHIP
Abstract
A memory controller includes scrub circuitry that performs scrub cycles in a way that does not delay processor reads to memory during the scrub cycle. Atomicity of the scrub operation is assured by protocols set up in the memory controller, not by using an explicit atomic read-correct-write operation. The result is a memory controller that efficiently scrubs memory while minimizing the impact of scrub cycles on system performance.

Term
Term ended
Expired 9 June 2025, 1.3 years ago.
- Priority and filed
- Granted
- Expired
- Today
8 claims: 2 independent, 6 dependent
- 1Broadest claimClaim Score 62, broad(NHIP)A method for scrubbing a memory, the method comprising the steps of:(A) issuing a scrub write command to a cacheline that includes a specified address;(B) waiting for any writes to the same cacheline that are in a write queue to execute;(C) loading the scrub write command into the write queue specifying a data dependency on a subsequent scrub read command;(D) issuing a scrub read command to read data from the address;(E) processing the data to correct all single-bit and single-symbol errors;(F) indicating that the data dependency in step (C) is satisfied;and (G) the scrub write command writing the processed data to the address in memory.
- 5A memory controller comprising:a write queue for write operations to a memory coupled to the memory controller;a scrub controller that issues a scrub write command to a cacheline that includes a specified address;in response to the scrub write command issued by the scrub controller, the memory controller performing the steps of: (A) waiting for any writes to the same cacheline that are in the write queue to execute;(B) loading the scrub write command into the write queue specifying a data dependency on a subsequent scrub read command;the scrub controller issuing a scrub read command to read data from the address;in response to the scrub controller issuing the scrub read command, the memory controller performing the steps of: (C) processing the data to correct all single-bit and single-symbol errors;(D) indicating that the data dependency in step (B) is satisfied once the data is processed in step (C);and (E) processing the scrub write command in the write queue to write the processed data to the specified address in the memory.
Independent claims2
26 paragraphs in 4 sections, as filed
BACKGROUND OF THE INVENTION
1. Technical Field
This invention generally relates to computer system memory, and more specifically relates to ways of scrubbing computer system memory to correct errors.
2. Background Art
Since the dawn of the computer age, computer systems have evolved into extremely sophisticated devices that may be found in many different settings. Computer systems typically include a combination of hardware (e.g., semiconductors, circuit boards, etc.) and software (e.g., computer programs). One key component in any computer system is memory.
Modern computer systems typically include dynamic random-access memory (DRAM). DRAM is different than static RAM in that its contents must be continually refreshed to avoid losing data. A static RAM, in contrast, maintains its contents as long as power is present without the need to refresh the memory. This maintenance of memory in a static RAM comes at the expense of additional transistors for each memory cell that are not required in a DRAM cell. For this reason, DRAMs typically have densities significantly greater than static RAMs, thereby providing a much greater amount of memory at a lower cost than is possible using static RAM.
Modern DRAM memory controllers use a technique known as “scrubbing” to automatically detect and correct soft errors that may arise in memory that are typically caused by alpha particles. Sophisticated error correction circuitry has been developed that allow detecting any single-bit error, or any single-symbol error in a DRAM. A single-bit error occurs when one bit at a specified address changes state unexpectedly. A single-symbol error occurs when multiple bits within a packet (or symbol) at a specified address in a single DRAM chip change state unexpectedly. During a typical scrub cycle, a cache line is read, causing a corresponding read of the data from memory. The error correction circuitry detects if there are any single-bit or single-symbol errors, and if so, generates the correct data, which is then written to the cacheline, and in turn, back to the memory. In this manner, the scrub circuitry may successfully recover from any single-bit or single-symbol errors in memory. In many computer systems, the scrub circuitry tries to scrub all of system memory at least one each day. A brief description of memory scrubbing is found in IBM Enterprise X-Architecture Technology, First Edition 2002, pp. 19-21, which is incorporated herein by reference.
A scrub cycle typically occurs when there are no pending processor reads or writes to memory. Once the scrub cycle starts, the entire read-correct-write sequence is performed as an atomic operation to assure data integrity. If processor reads occur just after the read operation in the scrub cycle, the processor reads have to wait until the atomic read-correct-write scrub operation is performed. As a result, prior art memory controllers negatively affect system performance when performing scrub cycles. Without a way for performing scrub cycles in a way that does not make processor read cycles wait, the computer industry will continue to be plagued with decreased performance during scrub cycles.
DISCLOSURE OF INVENTION
A memory controller includes scrub circuitry that performs scrub cycles in a way that does not delay processor reads to memory during the scrub cycle. Atomicity of the scrub operation is assured by protocols set up in the memory controller, not by using an explicit atomic read-correct-write operation. The result is a memory controller that efficiently scrubs memory while minimizing the impact of scrub cycles on system performance.
The foregoing and other features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings.
BRIEF DESCRIPTION OF DRAWINGS
The preferred embodiments of the present invention will hereinafter be described in conjunction with the appended drawings, where like designations denote like elements, and:
<figref idref="DRAWINGS">FIG. 1</figref> is a block diagram of a memory controller in accordance with the preferred embodiments;
<figref idref="DRAWINGS">FIG. 2</figref> is a flow diagram of a method for scrubbing memory in accordance with the preferred embodiments;
<figref idref="DRAWINGS">FIG. 3</figref> is a sample timing diagram showing the function of the memory controller of <figref idref="DRAWINGS">FIG. 1</figref>;
<figref idref="DRAWINGS">FIG. 4</figref> is a block diagram of a prior art memory controller;
<figref idref="DRAWINGS">FIG. 5</figref> is a flow diagram of a prior art method for scrubbing memory; and
<figref idref="DRAWINGS">FIG. 6</figref> is a sample timing diagram showing the function of the prior art memory controller of <figref idref="DRAWINGS">FIG. 4</figref>.
BEST MODE FOR CARRYING OUT THE INVENTION
A prior art memory controller and method are first presented herein to provide a context for the discussion of the preferred embodiments. Referring to <figref idref="DRAWINGS">FIG. 4</figref>, a prior art memory controller <b>400</b> includes a scrub controller <b>410</b>, a read queue <b>420</b>, a write queue <b>430</b>, and command formatting logic <b>440</b>. A read command <b>450</b> from a processor may be written to the read queue <b>420</b>, or may alternatively be passed via the fast read path <b>480</b> to the command formatting logic <b>440</b>. The read queue <b>420</b> includes a plurality of entries that are processed by the memory controller <b>400</b>. A write command <b>460</b> from the processor may be written to the write queue <b>430</b>. The write queue <b>430</b> includes a plurality of entries that are processed by the memory controller <b>400</b>. In this prior art memory controller <b>400</b>, read operations have priority over write operations, so the read queue <b>420</b> is serviced until all its entries have been processed, at which time one or more entries in the write queue <b>430</b> may be processed. The command formatting logic <b>440</b> presents appropriate commands to the memory via the memory command interface <b>470</b>, such as read and write commands to memory.
The scrub controller <b>410</b> includes the logic to perform scrub cycles at periodic intervals, typically during times when other memory accesses are not pending. The scrub controller <b>410</b> issues a special command to the write queue <b>430</b>. This command is referred to herein as a “read-correct-write” operation. This operation is so designated due to its atomic operation. Atomic operation means that once the read-correct-write operation is commenced, all other accesses to the memory are delayed until the read-correct-write operation is complete. During the read-correct-write cycle, the scrub controller reads a cache line from memory, uses internal error correction circuitry (not shown) to determine whether there is a single-bit or single-symbol error in the read data, corrects the data, and writes the corrected data back to the cacheline. The result is that single-bit and single-symbol errors in memory are dynamically corrected by the scrub controller.
A prior art method <b>500</b> for the scrub controller <b>410</b> in <figref idref="DRAWINGS">FIG. 4</figref> is shown in <figref idref="DRAWINGS">FIG. 5</figref>. Method <b>500</b> begins when a scrub cycle needs to be performed (step <b>510</b>). Scrub operations are written to the write queue, so if the write queue is full (step <b>512</b>=YES), method <b>500</b> must wait until the write queue is not full (step <b>514</b>). Once there is room in the write queue to write the scrub operation (step <b>512</b>=NO), the atomic read-correct-write scrub operation is written to the write queue (step <b>520</b>). Because the operations in the read queue have priority over operations in the write queue, if the read queue is not empty (step <b>522</b>=NO), method <b>500</b> waits until the read queue is empty (step <b>524</b>). Once the read queue is empty (step <b>522</b>=YES), the atomic read-correct-write scrub operation is executed by the memory controller (step <b>530</b>). As long as the read-correct-write scrub operation is not complete (step <b>540</b>=NO), any processor accesses are delayed until completion of the read-correct-write operation (step <b>550</b>). Once the read-correct-write cycle completes (step <b>540</b>=YES), the delayed processor accesses are then allowed to occur (step <b>560</b>).
By delaying processor accesses that occur during the atomic read-correct-write cycle, each subsequent processor access suffers the delay time that resulted from waiting for the read-correct-write cycle to complete. The result is a decrease in system performance caused by this delay. The delay can be seen graphically in the timing diagram of <figref idref="DRAWINGS">FIG. 6</figref>. The timing diagram includes the signals for the processor bus, the processor commands to the read queue, scrub write and read signals, and DRAM signals that include Address/Bank, Row Address Select (RAS), Column Address Select (CAS), Chip Select, and Write Enable. The specific example shown in <figref idref="DRAWINGS">FIG. 6</figref> shows three scrub cycles before a burst of processor reads. Between time T<b>0</b> and T<b>1</b>, the Scrub Read-Correct-Write (RCW) is valid, and the Scrub RCW ACK acknowledges the occurrence of the Scrub RCW Valid signal. At time T<b>1</b>, data for the first scrub cycle is read. At time T<b>2</b>, data for the first scrub cycle is written back to memory. At time T<b>3</b>, the Scrub RCW Valid signal is asserted, followed by the Scrub RCW ACK. The read for the second scrub cycle occurs at T<b>4</b>, while the write occurs at T<b>5</b>. At time T<b>6</b>, the Scrub RCW Valid signal is asserted, followed by the Scrub RCW ACK. The read for the third scrub cycle occurs at T<b>7</b>. Note, however, that there is a burst of activity on the processor bus just after time T<b>7</b>. We assume for this example that this is a burst of memory reads by the processor. The processor read commands are written to the read queue as shown at T<b>8</b> and just after T<b>9</b> and just after T<b>10</b>. Note, however, that the reads are not yet allowed to happen. Because the scrub read started at time T<b>7</b>, the processor cycles must be delayed until the completion of the atomic read-correct-write operation. For this reason, the processor commands to the read queue do not show up on the DRAM bus signals during time period T<b>8</b>-T<b>9</b>, because the atomic read-correct-write scrub cycle is still pending. Once the scrub write occurs at time T<b>9</b>, the delayed processor reads are allowed to occur. Note that each read operation in the burst of reads shown from T<b>8</b>-T<b>11</b> on the processor bus is delayed by the amount of time D<b>1</b> it takes the atomic read-correct-write signal to complete. We assume the processor bus read burst stops by T<b>11</b>, as shown in <figref idref="DRAWINGS">FIG. 6</figref>, but the read operations to the DRAM continue into periods T<b>11</b>-T<b>12</b> and T<b>12</b>-T<b>13</b> because of the delay D<b>1</b> from T<b>8</b> to T<b>10</b> that is caused by waiting for the explicit atomic read-correct-write operation to complete. The timing diagram of <figref idref="DRAWINGS">FIG. 6</figref> clearly shows performance degradation caused by the prior art atomic read-correct-write cycles used to scrub memory.
The preferred embodiments eliminate the use of the explicit read-correct-write operation, and replace it with a protocol that assures that processor read cycles are not delayed due to scrub cycles that are in progress. Referring to <figref idref="DRAWINGS">FIG. 1</figref>, a memory controller <b>100</b> in accordance with the preferred embodiments includes a scrub controller <b>110</b>, a read queue <b>120</b>, a write queue <b>130</b>, and command formatting logic <b>140</b>. A read command <b>150</b> from a processor may be written to the read queue <b>120</b>, or may alternatively be passed via the fast read path <b>180</b> to the command formatting logic <b>140</b>. The read queue <b>120</b> includes a plurality of entries that are processed by the memory controller <b>100</b>. A write command <b>160</b> from the processor may be written to the write queue <b>130</b>. The write queue <b>130</b> includes a plurality of entries that are processed by the memory controller <b>100</b>. In the memory controller <b>100</b> of the preferred embodiments, read operations have priority over write operations (similar to the prior art), so the read queue <b>120</b> is serviced until all its entries have been processed, at which time one or more entries in the write queue <b>130</b> may be processed. The command formatting logic <b>140</b> presents appropriate commands to the memory via the memory command interface <b>170</b>.
Note that many of the features in <figref idref="DRAWINGS">FIG. 1</figref> correspond to similar features in prior art memory controller <b>400</b> in <figref idref="DRAWINGS">FIG. 4</figref>. For example, the read queue <b>120</b>, write queue <b>130</b>, command formatting logic <b>140</b>, read command <b>150</b>, write command <b>160</b>, memory command interface <b>170</b>, and read fast path <b>180</b> could be the same as the corresponding features <b>420</b>, <b>430</b>, <b>440</b>, <b>450</b>, <b>460</b>, <b>470</b> and <b>480</b>, respectively, shown in <figref idref="DRAWINGS">FIG. 4</figref>. Note, however, that is equally within the scope of the preferred embodiments for each of the items <b>120</b>-<b>180</b> to have different or additional functions when compared with the prior art items <b>420</b>-<b>480</b>.
The scrub controller <b>110</b> includes the logic to perform scrub cycles when needed (e.g., at periodic intervals), typically during times when other memory accesses are not pending. Instead of having a single interface to the write queue as in the prior art (shown in <figref idref="DRAWINGS">FIG. 4</figref>), the scrub controller <b>110</b> of the preferred embodiments has a read interface for writing to the read queue <b>120</b> and a write interface for writing to the write queue <b>130</b>. The memory controller <b>100</b> then implements a protocol in internal logic that assures that processor read cycles are not delayed during a scrub cycle. The internal logic is represented by method <b>200</b> in <figref idref="DRAWINGS">FIG. 2</figref>, which represents a method in accordance with the preferred embodiments for the memory controller <b>100</b> to perform a scrub cycle. Method <b>200</b> begins when a scrub cycle is needed (step <b>202</b>). The scrub controller issues a scrub write command for a cacheline to the write queue (step <b>210</b>). If there are other writes in the write queue for the same cacheline (step <b>212</b>=YES), method <b>200</b> waits until all other writes to the same cacheline have been executed (step <b>214</b>). At this point, there are no other writes in the write queue for the same cacheline (step <b>212</b>=NO). If the write queue is full (step <b>216</b>=YES), method <b>200</b> waits until the write queue is not full (step <b>218</b>). Once the write queue is not full (step <b>216</b>=NO), a scrub write command is loaded into the write queue with a specified data dependency on a scrub read command that has not yet been issued (step <b>220</b>). This data dependency is a feature that is already available in known memory controllers. A latch with an output NeedDDone (need data done) is provided in prior art memory controllers to indicate when data for a pending read is not yet in the memory controller's central data buffer. Once the data is read into the central data buffer, the NeedDDone latch is cleared to indicate that the data dependency has been satisfied. The preferred embodiments recognize that the presence of the NeedDDone signal allows implementing a scrub cycle in a way that does not use explicit atomic operations, such as the read-correct-write cycle shown in the prior art memory controller of <figref idref="DRAWINGS">FIG. 4</figref>.
Once the scrub write is written to the write queue in step <b>220</b>, the memory controller <b>100</b> assures that subsequent writes to the same cacheline are not executed before the scrub write (step <b>230</b>). The memory controller <b>100</b> also assures that subsequent writes to different cachelines may be processed before the scrub write is processed (step <b>240</b>) because the scrub write does not affect the other pending writes to different cachelines. The scrub controller <b>110</b> then issues a scrub read command for the cacheline (step <b>250</b>). The scrub read command is issued to the read queue <b>120</b> or to the read fast path (bypass) <b>180</b> (step <b>260</b>). Once the data has been read by the scrub read command, the data is processed to correct all single-bit and single-symbol errors (step <b>270</b>), and the processed data is written to the central data buffer. With the processed data now in the central data buffer, the data dependency for the scrub write in step <b>220</b> has now been met, so a signal is generated that the pending scrub write operation may proceed (step <b>280</b>). In the preferred embodiments, this is accomplished by the NeedDDone latch being cleared once the data for the cacheline is written to the central data buffer. Because the data dependency has been met, the scrub write may now be performed (step <b>290</b>).
The timing diagram of <figref idref="DRAWINGS">FIG. 3</figref> shows the difference in timing when compared with the prior art timing in <figref idref="DRAWINGS">FIG. 6</figref>. The first scrub read is performed at T<b>1</b>, and the first scrub write is performed at T<b>2</b>, similar to the prior art timing in <figref idref="DRAWINGS">FIG. 6</figref>. Similarly, the second scrub read is performed at T<b>4</b>, the second scrub write is performed at T<b>5</b>, the third scrub read is performed at T<b>7</b>. Note that the burst of processor reads occurs just after T<b>7</b>, as it did in the prior art timing diagram of <figref idref="DRAWINGS">FIG. 6</figref>. These reads are given priority over any pending scrub write cycles. As a result, the burst of processor reads in period T<b>7</b>-T<b>11</b> are processed without delay. Once the burst of processor reads is complete at T<b>11</b>, the scrub write can be performed at T<b>12</b>. The preferred embodiments thus allow processor reads to interrupt a pending scrub cycle to improve system performance, while still assuring data integrity during the scrub cycle. The result is that no explicit atomic operations are used by the scrub controller that could possibly delay pending processor reads. Because processor reads are allowed to interrupt a pending scrub cycle, and are not delayed by an explicit read-correct-write cycle, system performance is improved.
One skilled in the art will appreciate that many variations are possible within the scope of the present invention. Thus, while the invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that these and other changes in form and details may be made therein without departing from the spirit and scope of the invention. For example, while the preferred embodiments are discussed herein with particular regard to DRAMs, the memory controller and methods of the preferred embodiments may be applied to any semiconductor memory that might be susceptible to soft errors.
Contents4
7 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7
Every citation, both waysCites: the store holds 5 of 6
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US2009307523A1 | Cited by | United States of America | Pre-grant |
| US2007168754A1 | Cited by | United States of America | Pre-grant |
| US2005028048A1 | Cites | United States of America | Search report |
| US5495491A | Cites | United States of America | Search report |
| US6560725B1 | Cites | United States of America | Search report |
| US6832340B2 | Cites | United States of America | Search report |
| US6901485B2 | Cites | United States of America | Search report |
| Hillier III et al., IBM U.S. Appl. No. 10/865,250, filed Jun. 10, 2004, “Memory Controller and Method for Copying Mirrored Memory”. | Non-patent | – | Third party observation |
| “IBM Enterprise X-Architecture Technology”, First Edition 2002, “Reaching the summit”. | Non-patent | – | Third party observation |
| Hillier III et al., IBM U.S. Appl. No. 10/865,250, filed Jun. 10, 2004, "Memory Controller and Method for Copying Mirrored Memory". | Non-patent | – | Applicant |
| "IBM Enterprise X-Architecture Technology", First Edition 2002, "Reaching the summit". | Non-patent | – | Applicant |
4 members in 1 office
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 86040404 | United States of America | A | |
| US20040860404 | – | – | – |
Members4
| Document | Office | Kind | |
|---|---|---|---|
| US2005273646A1 | United States of America | A1 | |
| US7257686B2This record | United States of America | B2 | |
| US2007288698A1 | United States of America | A1 | |
| US7516270B2 | United States of America | B2 |
38 transactions on the USPTO file
Allowed after 1 non-final rejection and 1 final rejection.
- Non-final rejections
- 1
- Final rejections
- 1
- RCEs
- 0
- Appeals
- 0
Over time
Point at a mark for the transactionTransactions
| Event | Code | |
|---|---|---|
| Expire PatentEXP. | EXP. | |
| Recordation of Patent Grant MailedPGM/ | PGM/ | |
| Patent Issue Date Used in PTA CalculationAllowedPTAC | PTAC | |
| Issue Notification MailedAllowedWPIR | WPIR | |
| Dispatch to FDCD1935 | D1935 | |
| Application Is Considered Ready for IssuePILS | PILS | |
| Issue Fee Payment VerifiedN084 | N084 | |
| Issue Fee Payment ReceivedIFEE | IFEE | |
| Receipt into PubsR1021 | R1021 | |
| Receipt into PubsR1021 | R1021 | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Response after Final ActionA.NE | A.NE | |
| Mail Final Rejection (PTOL - 326)Final rejectionMCTFR | MCTFR | |
| Final RejectionFinal rejectionCTFR | CTFR | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Response after Non-Final ActionA... | A... | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Mail Non-Final RejectionNon-final rejectionMCTNF | MCTNF | |
| Non-Final RejectionNon-final rejectionCTNF | CTNF | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Correspondence Address ChangeC.ADB | C.ADB | |
| IFW TSS Processing by Tech Center CompleteTSSCOMP | TSSCOMP | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Application Is Now CompleteCOMP | COMP | |
| Application Return from OIPEWROIPE | WROIPE | |
| Application Return TO OIPEROIPE | ROIPE | |
| Application Dispatched from OIPEOIPE | OIPE | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Cleared by OIPE CSRL194 | L194 | |
| IFW Scan & PACR Auto Security ReviewSCAN | SCAN | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Initial Exam Team nnIEXX | IEXX |
7 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Lapsed due to failure to pay maintenance feeLapsedFP | FP | |
| Information on status: patent discontinuationPATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362STCH | STCH | |
| Information on status: patent discontinuationPATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362STCH | STCH | |
| Lapse for failure to pay maintenance feesLapsedLAPS | LAPS | |
| Maintenance fee reminder mailedREMI | REMI | |
| Fee paymentFPAY | FPAY | |
| AssignmentAS | AS |
Numbers
- Publication
- 07257686
- Publication, DOCDB
- 7257686
- Publication, EPODOC
- US7257686
- Application
- 10860404
- Application, DOCDB
- 86040404
- Application, EPODOC
- US20040860404
Titles
- English
- Memory controller and method for scrubbing memory without using explicit atomic operations
Patent term adjustment
- A delay
- +371 daysthe office missed an examination deadline
- Net adjustment
- 371 days
Classification
- CPC, 1
- G06F11/106
- IPC, 3
- G06F12 06
- G06F11 10
- G06F12 00
- USPC, 3
- 711155000
- 711141000
- 714E11052