WO2016195702A1 - Compressed data block mapping - Google Patents

Compressed data block mapping Download PDF

Info

Publication number
WO2016195702A1
WO2016195702A1 PCT/US2015/034368 US2015034368W WO2016195702A1 WO 2016195702 A1 WO2016195702 A1 WO 2016195702A1 US 2015034368 W US2015034368 W US 2015034368W WO 2016195702 A1 WO2016195702 A1 WO 2016195702A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
mapping
data
line
compressed
Prior art date
Application number
PCT/US2015/034368
Other languages
French (fr)
Inventor
Rajeev Balasubramonian
Gregg B. Lesartre
Robert Schreiber
Naveen Muralimanohar
Original Assignee
Hewlett Packard Enterprise Development Lp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett Packard Enterprise Development Lp filed Critical Hewlett Packard Enterprise Development Lp
Priority to PCT/US2015/034368 priority Critical patent/WO2016195702A1/en
Publication of WO2016195702A1 publication Critical patent/WO2016195702A1/en

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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • 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/1041Resource optimization
    • G06F2212/1044Space efficiency 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/40Specific encoding of data in memory or cache
    • G06F2212/401Compressed data

Definitions

  • Electronic devices such as computers, may include memory.
  • a computer may include static random access memory (SRAM) and dynamic random access memory (DRAM).
  • SRAM and DRAM share the characteristic power must be continuously supplied in order to retain data stored in the memory. If the power is removed, the stored data may be lost.
  • SRAM and DRAM share the characteristic power must be continuously supplied in order to retain data stored in the memory. If the power is removed, the stored data may be lost.
  • Another type of memory that is becoming more prevalent is non-voiatile random access memory (NVRAM). NVRAM may have the characteristic that once data is stored to the NVRAM, the data remains persistent, even if power is no longer supplied to the device.
  • FIG. 1 depicts an example of a device that may use the data writing to a subset of memory devices techniques described herein.
  • FIG. 2 depicts another example of a device that may use the data writing techniques described herein.
  • FIGS. 3(a-c) depict examples of write / read patterns in accordance with the data writing techniques described herein.
  • FIG. 4 depicts an example high level flow diagram of the data writing techniques described herein.
  • FIG. 5(a,b) depicts another example high level flow diagram of the data writing techniques described herein.
  • FIG. 6 depicts an example system including write based on mapping according to the techniques described herein.
  • FIGS. 7(a-d) depict examples of using bit vectors and a busy vector to permit concurrent writes according to techniques described herein.
  • FIG. 8 is an example high level flow diagram for writing data according to a mapping according to techniques described herein.
  • FIG. 9 is another example high level flow diagram for writing data according to a mapping according to techniques described herein.
  • FIG. 10 depicts an example of a device including converting data blocks according to the techniques described herein.
  • FIG. 1 1 is an example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
  • FIG. 12 is another example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
  • FIG. 13 is an example high level flow diagram for changing the mapping used by compressed data blocks.
  • FIG. 14 is another example high level flow diagram for changing the mapping used by compressed data blocks.
  • NVRAM NVRAM
  • Other devices such as NVRAM are able to store data without the need to continuously supply power.
  • power is needed when the data is originally written.
  • existing forms of NVRAM e.g. FLASH memory
  • new types of NVRAM currently being developed e.g. memristor, phase change RAM, spin torque transfer RAM
  • memristor, phase change RAM, spin torque transfer RAM do not require the continuous supply of power in order to maintain the persistence of data stored thereon.
  • these devices do use power when originally writing the data to the device. This use of power may be referred to as write energy.
  • SRAM and DRAM also require write energy to store data, and as such the techniques described herein are equally applicable to SRAM and DRAM.
  • Many electronic devices such as computers, include a memory controller to manage storing and retrieving data from memory.
  • the memory controller may not individually read and write bytes of data from the memory. Rather, the memory controller may operate on groups of bytes, referred to as a line of data.
  • memory is typically operated on in units equivalent to the size of a cacheline in the processor. For example, if a processor has a cacheline size of 64 bytes, the memory controller may receive / provide data to the processor in units of 64 bytes.
  • a line may refer to a data block that is provided to the memory controller to be written to memory or is provided by the memory for use by the electronic device. The techniques described herein are not limited to any particular line size.
  • the memory may be divided across several memory devices which may be referred to as a rank. For example, for a given line, the memory devices that store the data that make up the line are all in the same rank.
  • a rank of memory devices may store multiple lines. For example, for a 84 byte line, there may be 9 memory devices in the rank. Each of the first 8 memory devices (e.g. a memory chip) may store 8 bytes of the line.
  • the 9 ih memory device may be used to store an Error Correction Code (ECC).
  • ECC Error Correction Code
  • the nine memory devices that make up the rank may store large numbers of lines.
  • rank of memory Although a specific example of a rank of memory is described, it should be understood that the techniques described herein are not limited to any particular layout of memory devices in a rank.
  • the techniques described herein provide for receiving a line of data to be written to memory.
  • the line may be examined to determine If the line can be compressed. If so, the line may be compressed, and a header describing the compression may be added to the line. An ECC for the overall line may be calculated.
  • the compression may result in fewer than the total number of memory devices within the rank being needed to store the compressed line. As such, the memory devices that are not needed are not written, thus saving the write energy that would have otherwise been used to write to those devices, in some cases the data may be encrypted prior to being written to the memory devices.
  • the line that is stored may contain the data needed to determine if the line is compressed, and if so, how the line should be decompressed. For example, if the ECC does not use ail bits available on the ECC storage device for the line, then the extra bits may be used to indicate if the line is compressed or not. In other implementations, different techniques, described below, may be used to determine if the line is compressed. When the data is to be read, it may be determined if the line is encrypted and/or compressed. The line may then be decrypted and/or decompressed and provided to the requestor.
  • the techniques described herein are Operating System (OS) independent and as such the OS is not required to have any knowledge of the compression occurring in the memory system. In other words the techniques described herein are completely transparent to the OS, applications, or other software running on the system. No OS, application, or other code modification is required.
  • OS Operating System
  • writes to the memory devices are based on a mapping, instead of always writing a compressed block to the rank of memory in the same order, a mapping may be used. For example, if a compressed line would use four memory devices to store the line, the mapping would determine which four devices are used. By using the mapping, it can be ensured that the first memory devices in the rank are not always selected.
  • the writes to memory devices are spread based on the mapping, it may be possible to increase memory write bandwidth by performing multiple writes in parallel. For example, if a first line is to be stored on the first three memory devices and a second line is to be stored on the last three memory devices, the lines may be written in parallel. Because there is no overiap in the memory devices used, each device can be commanded to write a different line. Furthermore, the mapping may even out power dissipation of the memory devices. Using the techniques described herein, power may be dissipated over ail the devices in a more even manner, because the mapping ensures that the same set of memory devices are not always used.
  • the techniques described herein further provide for a mechanism for wear leveling amongst memory devices.
  • One characteristic of certain types of memory such as memristor based NVRAM, is that the memory may be susceptible to wear. In a memory cell, wear limits the number of times a memory location can be reliably read/written. For example, if a particular memory address on a memory device is repeatedly written, at some point, that address may no longer be capable of reliably storing the data that was written.
  • the techniques described herein provide for a mechanism to partially mitigate the effects of memory wear.
  • the mapping described above may be periodically altered, such that the same memory devices are not used indefinitely. For example, if a compressed line uses three memory devices, a first version of the mapping may indicate which three memory devices to use. Absent the techniques described herein, the same three memory devices would always be used, assuming the same compression is used for the line. If the same devices are always used, those devices may wear at a greater rate.
  • mapping For example, if a first version of the mapping causes certain memory devices to be used when storing a compressed line, a second version of the mapping may cause different devices to be used. Because different devices are used, the amount of wear on a given device may be reduced.
  • a background circuit may be used to convert lines stored using the first mapping to the second mapping. During the time period of the conversion, both mappings may be maintained. Reading a line uses the mapping used when the line was stored. During the period when the lines are being converted, an indicator may be read to determine if the line has been converted, if so, the new mapping may be used, if not, the old mapping may be used.
  • FIG. 1 depicts an example of a device that may use the data writing to a subset of memory devices techniques described herein.
  • System 100 may include a memory controller 1 10 coupled to a plurality of memory devices 150-1 ...9. Although 9 memory devices are depicted, it should be understood that this is to aid in the description. The techniques described herein are not limited to any particular number of memory devices.
  • the memory controller 1 10 may be a device that is a standalone device, or it may be integrated within a larger device (e.g., a processor, part of a chipset). The techniques described herein are not limited to any particular implementation.
  • the memory controller may include a data block compression circuit 1 15, an ECC generation circuit 120, and a memory device write circuit 125.
  • the memory controller and each of these circuits may be implemented as hardware circuits, or as a combination of hardware circuits and instructions readable and executable by the hardware circuits.
  • the memory controller may be implemented as logic on an integrated circuit, as an application specific integrated circuit (ASIC), as an FPGA, or in any other suitable manner.
  • ASIC application specific integrated circuit
  • the data block compression circuit may be a circuit to receive a block of data and compress that block of data.
  • the compression circuit may implement Base Delta Immediate (BD!) compression, which may allow a 84 byte data block to be compressed to a data block ranging from 0 to 64 bytes.
  • BD Base Delta Immediate
  • a block that cannot be compressed may be stored in raw form.
  • a block that can be compressed may have a compression header generated by the compression circuit 1 15.
  • the compression header may contain information that may be used to later assist in decompression.
  • the compression may indicate the process that was used to compress the data block and how that data block can be decompressed.
  • the ECC generation circuit 120 may be circuitry used to calculate an ECC for the block of data.
  • the ECC may be used to determine if there has been an error in the data. Many ECCs can be used to correct for single bit errors and detect multiple bit errors.
  • the ECC may be used to determine if the data block has been compressed, in the example being described, there are 8 bytes provided for an ECC. If the ECC being used does not use ali 8 bytes, one or more bits may be used to indicate that the data block is compressed.
  • the ECC generation circuit may insert those bits into the ECC in such implementations. These bits may be referred to as compression metadata. However, if the ECC uses ali 8 bytes, an alternate mechanism for determining if the data block is encrypted is described below, with respect to FIG. 3.
  • the memory device write circuit 125 may be used to write bytes of data to memory devices.
  • the memory device write circuit may be coupled to memory devices that make up a rank of memory.
  • the memory device write circuit may write the line to the individual memory devices that make up the rank.
  • the system 100 may also include a plurality of memory devices 150-1 ...9 that make up a memory rank.
  • System 100 is shown with a memory rank made up of 9 devices, however, it should be understood that this is for purposes of ease of description and not by way of limitation.
  • the techniques described herein are suitable for use with memory ranks comprising any number of memory devices.
  • Each memory device may store a particular range of bytes for a given line.
  • memory device 150-1 may store bytes 0-7 for each line
  • memory device 150-2 may store bytes 8-15, and so on.
  • the rank of memory may store any number of lines, as is shown by lines 1 -n. The techniques described herein are not limited to ranks storing any particular number of lines. What should be understood is that a rank of memory may store many lines, and an individual memory device within the rank may store a portion of each line.
  • a request to write a block of data may be received by the memory controller. This is depicted by the "DATA BLOCK IN" arrow.
  • the block is either compressible or it is not compressible. Each of these two situations is now described.
  • the data block compression circuit is not able to compress the data block.
  • uncompressib!e data blocks are stored in their raw form.
  • the biock of data is 64 bytes long and may be store uncompressed.
  • the ECC generation circuit may generate an ECC over the 64 bytes and the ECC is appended to the line.
  • the memory device write may then receive the uncompressed data block as well as the appended ECC and write the line to memory devices 150-1 ...9.
  • the biock of data 175 is show as being written to line 1 within the memory devices. It should be noted that is such cases, each memory device is written to, and as such write energy is used for writing to all 9 memory devices.
  • the received block of data 178 may be compressible.
  • the compression circuit 1 15 is able to compress the data block to a smaller number of bytes.
  • the compression circuit may then append a compression header to the compressed bytes.
  • the compression header may be described as metadata that describes the compression. As shown by the hashes on line 176, assume that the
  • compressed data and compression header uses bytes 0-23 (24 bytes total).
  • the ECC may then generate an ECC covering the 24 bytes of compression header and data plus 40 bytes of padding.
  • the memory device write circuit may then write the compressed line to the memory devices.
  • memory devices 150-1 -3 in line 3 of the memory devices may be used to store the compression header and
  • the generated ECC may be stored in memory device 150-9. However, it is not necessary to write any data to memory devices 150-4-8, as indicated by the blacked out boxes, in comparison to the uncompressed case described above, only 4 memory devices instead of 9 are written to. As mentioned above, each write to a memory device requires write energy. By reducing the total number of memory devices written to, compression enables a reduction in the total amount of write energy needed to write a line of data.
  • the techniques described herein also provide for a mechanism to reduce the amount of read energy needed when reading a line of data. This technique is described in further detail below, but what should be understood for now is that the portions of the line not written (e.g. the portions in black) are not use to store valid data. In other words, the portions of each line in black remain unused.
  • FIG. 2 depicts another example of a device that may use the data writing techniques described herein. Many of the elements of FIG. 2 are very similar to the elements in FIG. 1 and are similarly numbered. For ease of description, the description of those elements is not duplicated.
  • System 200 may include a memory controller 220, which is very similar to memory controller 1 10.
  • the memory controller may include a data block compression / decompression circuit 215, an ECC generation / validation circuit 220, a memory device write circuit 225, a background scrubber circuit 230, and an encryption / decryption controller 235.
  • System 200 may also include memory devices 250-1 ...9, which are essentially the same as those described with respect to FIG. 1.
  • Data block compression / decompression circuit 215 performs a similar function to the similarly numbered element in FIG. 1 .
  • circuit 215 may also perform decompression.
  • the circuit may use the compression header contained in a compressed line and use that information in order to decompress the compressed line back into the uncompressed block.
  • circuit 215 is depicted as a single circuit performing both compression and decompression, it should be understood that this is only an example implementation. Other implementations may use different circuit to perform these functions.
  • System 200 may also include ECC generation / validation circuit 220.
  • circuit 220 may generate an ECC to ensure that a line does not contain errors.
  • Circuit 220 may also include functionality to validate the ECC. Circuit 220 may examine a line of data and validate that the ECC indicates that there are no errors in the line. As above, although depicted as a single generate / validate circuit, this is only an example implementation. Other implementations may use different circuits for each of these functions.
  • System 200 may also include a memory device read / write circuit 225.
  • the memory device read /write circuit may be very similar to the equivalent circuit in FIG. 1 , with the exception that the memory devices can be both read and written. The description is not repeated here.
  • System 200 may also include a background scrubber circuit 230.
  • the background scrubber circuit may examine the memory devices 250-1 ...9 as a task that runs continuously in the background, setting unused portions of lines to a high resistance state. As mentioned above, some portions of lines may remain unused (e.g. the black boxes). For some memory technologies (e.g.
  • the amount of read energy used is dependent on the values stored at the designated location, and in the same array. Reads and writes to arrays with more high resistance values may require less energy to perform the read or write. For memory devices storing unused portions of the line, setting the resistance value to a high state reduces the amount of energy needed when reading or writing the line.
  • background scrubber circuit may operate. If the system load increases such that the background scrubber's energy usage becomes problematic, the system can temporarily halt the background scrubber circuit.
  • System 200 may also include an encryption / decryption controller 235.
  • the encryption decryption controller may include an encryption / decryption selection circuit 237 and at least one encryption /decryption circuit 239-1 ...n.
  • the encryption / decryption controller may be used to encrypt and decrypt lines that are stored to the memory devices.
  • the encryption may help improve security in the system. For example, as mentioned above, NVRAM may retain its contents even when power is no longer supplied. A malicious actor could physically steal one or more of storage devices 250-1 ...9. The data on these devices could then be retrieved by the malicious actor. By encrypting the data, it may be ensured that even in such a situation, the stolen devices would remain unreadable.
  • the controller 235 may include an encryption / decryption selection circuit.
  • the encryption / decryption selection circuit 237 may be responsible for dividing up a data block into smaller blocks of a fixed size. In some cases, the smaller blocks may be padded with a value, such as 0.
  • the circuit 237 may be used to divide up the block and pad as needed. Operation of the circuit 237 is described in further detail below, with respect to FIG. 3(a-c).
  • the controller 235 may also include at least one encryption / decryption circuit 239-1 ...n.
  • the encryption / decryption circuit 239 may be used to encrypt / decrypt the fixed size blocks of data generated by the circuit 237. In some cases, there may be a single circuit, and blocks are encrypted / decrypted serially. In other implementations, there may be multiple circuits 239, and encryption / decryption of the fixed size blocks may occur in parallel.
  • system 200 provides circuits to both encrypt and decrypt fixed size blocks of data.
  • compression / decompression circuit 215 may examine the compression metadata to determine if the line is compressed. For example, the bits taken from the ECC bytes above may be examined to determine if the block is compressed, if the line is not compressed, the ECC generation / validation circuit 220 may validate the line 276b by determining if the ECC indicates there are any errors. If no errors are present, the uncompressed line 276c may be sent out of the memory controller as indicated by the data block out arrow.
  • the data block compression / decompression circuit 215 may examine the compression header metadata that was appended to the compressed line to determine how the line was compressed. The line may be padded based on the compression header and the ECC validated. If the line is valid the circuit 215 may decompress the line, resulting in an uncompressed line 276c.
  • uncompressed data block 276c may be sent as the data block out.
  • FIGS. 3(a-c) depict examples of write / read patterns in accordance with the data writing techniques described herein.
  • FIGS. 3(a-c) continue with the examples that were started in FIGS. 1 and 2.
  • FIG. 3a depicts the encryption process. For example, assume that an uncompressible block of data 377a is received. As should be understood, not ail data blocks are able to be compressed. The case of a compressible data block is described further below.
  • the encryption / decryption controller 235 may be used to encrypt the data block.
  • the encryption / decryption selection circuit 237 may divide the data block 377a into fixed size units.
  • the fixed size units may be 16 bytes each, resulting in the 64 byte data block being divided Into 4 fixed size encryption blocks.
  • the encryption / decryption circuit(s) 239-1 ... n may then encrypt each of the fixed size blocks 377b.
  • the encryption of each block may occur in parallel.
  • the techniques described herein are also suitable for use with a single encryption circuit, wherein the blocks are serially encrypted.
  • the ECC generation / validation circuit 220 may then generate an ECC to ensure that the line contains no errors.
  • the ECC may be appended to the line 377c and the line stored in the memory devices. As indicated, because no compression was done, all memory devices are written and there is no saving of write energy. The process of decrypting the line is described in further detail below,
  • FIG. 3b depicts an example of receiving a compressible block of data, compressing the block, encrypting the block, decrypting the block, decompressing the block, and returning the original compressible block.
  • a compressible block of data 378a may be received.
  • the data block compression / decompression circuit 215 may be used to compress the data block and append a compression header 378b.
  • the compression header 378b may be used to compress the data block and append a compression header 378b.
  • compressed data block and header is shown as being 36 bytes long.
  • the encryption / decryption selection circuit 237 may then divide the compressed block into fixed sized encryption units 378c.
  • the fixed size encryption units may be 16 bytes long.
  • the compressed block may be divided into a first complete encrypt block for bytes 0-15 and a second complete encrypt block for bytes 16-31 .
  • the remaining bytes, 32-35 may then be padded (e.g. padded with zeroes) to result in a third encrypt block spanning bytes 32-47. It should be noted that no data is being stored in bytes 48-63.
  • Blocks may then be encrypted by the encryption / decryption circuits 239-1 ...n.
  • the energy used in the encryption process may be reduced because the total number of blocks to be encrypted has been reduced. For example, unlike the case above with the uncompressib!e block where 4 blocks were encrypted, here, only 3 blocks are encrypted. Thus the energy used by the encryption blocks may be saved.
  • the ECC generation / validation circuit 220 may then generate an ECC to protect the line. For example, a 16 byte block of zeroes may be appended to the 3 encrypted blocks. An ECC may be generated and appended to the line 378d. The line may then be written to the memory devices by the memory device read / write circuit 225.
  • the mechanism for decrypting and decompressing the data is slightly different than that which was described above.
  • some spare bits in the ECC bytes may have been used to identify if the block was compressed or not. if it was compressed, the compression header could be examined. However, this examination does not work in cases where the line is encrypted, because the compression header would be unreadable (e.g. it is encrypted), in other words, even if there were bits available in the ECC bytes to indicate the line was encrypted, the compression header could not be deciphered to determine how to decrypt the block.
  • the ECC may use all the available bytes and no spare bits may be available to determine if the line is encrypted.
  • a compressed line may result in either 1 , 2, 3 or 4 encrypted blocks.
  • An uncompressed line results in 4 encrypted blocks.
  • an ECC is generated for the line, padding with zeroes as needed.
  • the ECC generation / validation circuit 220 may attempt to validate the line under each of the four possible scenarios. As shown in 378e, the four possibilities may be 1 ) one encrypted block, three pad blocks 2) two encrypted blocks, two pad blocks, 3) three encrypted block, one pad block, and 4) four encrypted blocks. With selection of the right ECC it is highly unlikely that more than one of the four possibilities described above would be properly validated by the ECC. Thus, of the four possibilities, the one that is successfully validated determines how many encrypted blocks are present.
  • the encryption / decryption selection circuit 237 may be made aware of how many encrypted blocks are in the line. The selection circuit may then cause the decryption circuits 239-1 ...n to decrypt the determined number of encrypted blocks. Just as above in the encryption process, because a reduced number of decryptions may need to be performed, the energy used in decrypting may be reduced.
  • the encrypt / decrypt circuits 239-1 ...n may then be used to decrypt the number of blocks 378f determined by the selection circuit 237.
  • FIG. 3c describes an alternative mechanism to determine if a block has been compressed. As mentioned above, some ECCs may utilize all available space, leaving no bits available to indicate if a block is compressed or not. An alternative mechanism for determining the compression status of a data block may make use of an invalid ECC.
  • a compressible block 379a may be received. The compressible block may be compressed. For example, as shown, the compressed block (including compression header) may reside in bytes 0-40. A valid ECC covering those 40 bytes may then be generated and appended to the compressed block.
  • the valid ECC may be generated by either padding out the compressed block to the size needed by the ECC generation circuit 220. For example, if the ECC generation circuit expects a 64 byte block, then the compressed block can be padded with zeroes. In the alternative, an ECC that does not depend on a specific block size may be generated and data regarding the generation placed in the compression header.
  • An invalid ECC may then be generated.
  • the invalid ECC may be guaranteed to fail.
  • the compressed block e.g. bytes 0-40
  • the valid ECC e.g. bytes 41-48
  • unused devices e.g. bytes 49-63
  • the invalid ECC may be stored as a line 379b, in cases where some compression was possible. In cases where no compression is possible, the ECC generated would be the valid ECC to cover the full data block.
  • FIG. 4 depicts an example high level flow diagram of the data writing techniques described herein.
  • a block of data to be written to a line in a rank of memory may be received.
  • the rank of memory may comprise a set of memory devices. As described above, the rank may be made up of any number of memory devices. The techniques described herein are not limited to a specific number of memory devices within a rank.
  • the block of data may be compressed.
  • one possible compression mechanism is BDI compression.
  • the compressed block of data may be written to a subset of memory devices that comprise the line. The unwritten portions of the line are not used to store valid data. By writing the compressed block of data to a subset of memory devices, the total amount of write energy is reduced.
  • each line stores one line sized block of data.
  • the OS does not need to consider the possibiiity that a single line may hold data from two separate original blocks of data.
  • FIG. 5(a,b) depicts another example high level flow diagram of the data writing techniques described herein, in block 505, just as above in block 410, a block of data to be written may be received.
  • the block of data may be compressed.
  • the compressed block of data may be divided into an integer number of encryption block units.
  • the encryption circuit may operate on a fixed size block.
  • the compressed block may be divided in accordance with the fixed size block.
  • blocks may be padded if necessary to arrive at the fixed encryption block size.
  • each encryption block unit may be encrypted.
  • the techniques described herein are not limited to any particular type of encryption. Any encryption mechanism is suitable for use with the techniques described herein, in block 525, metadata indicating the result of the compression may be appended to the block of data. This metadata may include the compression header or may include using spare bits within the ECC to indicate if the block is compressed. As explained above, the particular type of metadata used is dependent on if extra bits are available and if encryption is being used.
  • a valid ECC may be generated for the compressed block of data.
  • the valid ECC may be used to verify a compressed line, in block 535, the valid ECC may be appended to the compressed block of data.
  • an invalid ECC may be generated, in block 545, the invalid ECC may be appended to the line. As mentioned above, if the ECC validation of the line fails, this may indicate that the line has been compressed.
  • the compressed block of data may be written to a subset of the memory devices that comprise the line.
  • the unwritten portions of the line may not be used to store valid data.
  • portions of the line that are not used to store valid data may be set to a high resistance state using a background scrubber. As described above, setting unused portions of a line to a high resistance state may reduce the amount or energy used during a read or write of the memory devices.
  • a line in a rank of memory may be read. Reading the line may include reading all memory devices that comprise the rank. In other words, ail memory devices, even those which may not be storing valid data for the line are read.
  • metadata indicating the result of the compression may be retrieved from a block header. As mentioned above, in the case of an unencrypted line, the compression header is readily available.
  • an attempt to validate the line using the invalid ECC may be made.
  • a validation fail may indicate that the block of data has been compressed.
  • the block of data may be parsed to locate the valid ECC.
  • the validation failure with the invalid ECC may indicate a compressed block. The location of the valid ECC may be determined by parsing the compression header to determine where the valid ECC is and how the block was compressed.
  • the line may be validated using the ECC for ail possible integer numbers of encrypted units.
  • the ECC for ail possible integer numbers of encrypted units.
  • there may be a limited number of possible encrypted blocks e.g. 1 , 2, 3, or 4.
  • the validation attempts may be made on each of these limited possibilities, and a successful validation may indicate how many encrypted blocks are present.
  • the determining granularity is the compression granularity.
  • the ECC check could be performed assuming one device, two devices, and so on, up to the maximum number of devices.
  • the ECC check that succeeds may determine how compressed the block is.
  • the number of encrypted units may be determined based on the successful validation.
  • the determined number of encrypted units may be decrypted. As described above, by only decrypting the number of encrypted units present, the energy used for decryption may be reduced.
  • the line may be decompressed based on the determined number of encrypted units.
  • FIG. 6 depicts an example system including write based on mapping according to the techniques described herein.
  • System 800 may include all of the components previously described with respect to FIGS. 1 and 2, however those components are not shown for purposes of clarity.
  • System 800 depicts mainly those components used for writes based on mapping.
  • system 600 contains all the functionality previously described.
  • System 600 may include a memory controller 610.
  • the memory controller may include a data block mapping circuit 660, a memory device write circuit 625, and memory devices 650-1 ...9.
  • the data block mapping circuit 660 may include the functionality used to provide the write based on mapping techniques described herein.
  • the data block mapping circuit may include a mapping 661.
  • the mapping may determine how a data block is written to the various memory devices.
  • the mapping may be an array. Each line of the array may be considered the mapping to be used for that line. For example, as shown, the mapping for lines 0 through 7 is shown.
  • the mapping may be selected to minimize the memory device overlap of any two adjacent lines. For this purpose, the first and last line may be considered adjacent. Minimizing the overlap may be helpful in increasing the probability that multiple lines may be written in parallel, as will be described below.
  • a mapping may be selected based on the line being written. For example, the line number being written may be divided (mod) by the total lines shown in the mapping (e.g. 8). The remainder may determine the selected mapping. For example, if line 8 is being written, the remainder will be 0, thus the mapping for line 0 is selected. Likewise, if line 13 is being written, the remainder will be 5, then the mapping for line 5 may be selected.
  • the memory devices used for that line can be determined. As shown, the 9 boxes to the right of each line indicate the memory devices that are to be used to write that line, as well as the order in which those memory devices are to be written. It should be noted that order does not imply sequential writes of memory devices. In fact, the devices may be written in parallel. For purposes of this description the write order indicates how bytes of the line are mapped to the memory devices (e.g. first 8 bytes on device x, second 8 bytes on device y, etc.). Thus, when writing a line, the particular memory device used may be dependent both on the line being written as well as the size of that line. Operation of the mapping is described in further detail with respect to an example below.
  • the memory device write circuit 625 includes all of the
  • the circuit may include a write queue 626 and a busy vector 627.
  • the write queue may be a queue that holds lines that are waiting to be written to the memory devices. An example portion of a write queue 626a is shown. Each entry in the write queue may include the data block (e.g. the compressed block) 626b, the line number to be written 626c, and a bit vector 626d. As will be explained in further detail below, the bit vector may be used to indicate which memory devices will be used to write a particular block of data as well as being used to determine which writes may occur in parallel. [0081]
  • the circuit 625 may also inciude a busy vector 627.
  • the busy vector may indicate which memory devices, or more specifically the
  • the busy vector may have one bit that represents each memory device.
  • a set bit may indicate the memory device (e.g. the communications channel to the memory device) is currently busy, while a clear bit may indicate the device is currently not busy.
  • the busy vector may be used to determine when writes may proceed concurrently.
  • the system 600 may also include memory devices 650-1 ...9. These memory devices are generally the same as those depicted in FIGS. 1 and 2, although more lines are shown.
  • data blocks may be received by the memory controller. Just as above, those data blocks may be compressed. The compressed data blocks may then be placed in write queue 626. As shown, the data blocks 626b contain a hashed portion, which indicates data to be written and a clear portion, which may indicate data that need not be written (e.g. unused space resulting from the compression). Line 626e shows a line in more detail. For example, as shown, bytes 0-31 may include valid data to be written, while bytes 24-71 , shown in black, may not need to be written.
  • each memory device may store 8 bytes of a line.
  • the line 626e is divided into 8 byte segments, labeled A-!. These labels will now be used to describe how the mapping may be used to write a line to the memory devices in memory.
  • the line 626e is to be written to line 8.
  • the line number i.e. line memory address
  • the mapping table e.g. 8
  • the remainder used to determine which line in the mapping to select.
  • line 8 divided by 8 has a remainder of zero, and as such the line 0 mapping may be selected.
  • the memory devices are used in order (e.g. 1 -9).
  • the line 626e contains valid data to be written for bytes 0-31 , corresponding to labels A-D.
  • the first memory device may be used to write bytes 0-7 (e.g. A), the second device used to write byte 8-15(e.g. B), the third device used to write bytes 16-23 (e.g. C) and the fourth device used to write bytes 24-31 (e.g. D).
  • the memory devices that would be used for the write are shown in the bit vector 626d. As shown, the first 4 bits are set, indicating the first four devices will be used. As shown in line 8 in the memory devices, the blocks A-D are written to the first four memory devices in order. The process of writing the blocks is described in further detail with respect to FIG. 7.
  • line 828e is to be written to line 5 (or to a line which results in a remainder of 5).
  • the line 5 mapping will be used.
  • the mapping shown for line 5 indicates that block A goes on device 6, block B on device 8, block c on device 7, and block D on device 9.
  • the busy vector is set to indicate that memory devices 6-9 are used for the write.
  • the memory devices used for writing the same data block 626e are different, depending on which line in the memory device is being used.
  • two additional lines e.g. 6 and 12
  • these lines will use memory devices indicated by their bit vectors. The use of the bit vectors and the busy vector 627 is described in further detail with respect to FIG.7.
  • FIGS. 7(a-d) depict examples of using bit vectors and a busy vector to permit concurrent writes according to techniques described herein.
  • the bit vector may indicate for each entry in the write queue which memory devices (e.g. the communications channels for those memory devices) are going to be used to perform that write. If two different writes will use completely different memory devices, with no overlap, the two (or more) writes may proceed in parallel, because the communications channels to those devices would also contain no overlap. This is because although a memory device may not write two independent lines (e.g. portions of the line stored on that device) simultaneously, there is no need for independent memory devices to ail write the same line. Thus, if one memory device is writing line 0, a different memory device could write line 5, because each device would be receiving commands over a different communication channel.
  • FIG. 7a depicts a write queue containing several lines to be written to the memory devices.
  • the write queue is similar to that described with respect to FIG. 6.
  • no writes are currently in progress (e.g. busy vector is completely clear).
  • the first line in the write queue has the bit vector marked to indicate memory devices 1-4 are to be used.
  • the system may first perform a bitwise AND with the busy vector. If the result is a zero, that means that the bit vector and the busy vector have no common bits set. What this means is that the memory devices used in the busy vector are not the same as those that will be used according to the busy vector.
  • the busy vector is initially empty. As such, the AND operation produces a zero result, indicating that the write may proceed. To update the busy vector to indicate which memory devices are in use, a bitwise OR operation may be performed between the busy vector and the bit vector. The result may then be stored in the busy vector. The end result being that the bits in the busy vector that were previously set remain set, and those memory devices that will become busy with the new write will now have the corresponding bits set.
  • FIG. 7b depicts an attempt to write the second data block in the write queue.
  • the bit vector for the second item in the write queue indicates that the last four memory devices (e.g. 6-9) are to be used for the write. Again, a bitwise AND between the bit vector and the busy vector is performed. Because there is no overlap of busy devices, the resultant value is zero, indicating that the two writes may proceed concurrently.
  • the busy vector may then be updated by performing a bitwise OR between the current busy vector and the bit vector of the newly added write.
  • FIG.7c depicts an attempt to write the third data block in the write queue.
  • the bit vector for the third items indicates that three memory devices (e.g. 2-4) are to be used for the write.
  • FIG.Td depicts an attempt to write the fourth data block in the write queue.
  • the fourth data biock may use 1 memory device (e.g. device 5). Performing a bitwise AND between the bit vector and the busy vector results in a zero value. As mentioned above, a zero value indicates the writes may proceed concurrently.
  • the busy vector may be updated by performing a bitwise OR. It should be noted that all bits in the busy vector are now set, indicating the communications channel to ail memory devices are currently busy with a write. Thus, no new write of a iine may be added, as ail memory devices (e.g. the communications channel to each device) are busy. When the write issues, the bits associated with the memory devices may be cleared. At that point, new writes may proceed.
  • mapping described above is first reversed to put the iine back into the original order. Then, the processing described with respect to FIGS. 1 -5 may occur.
  • a line when a line is read, ail nine devices may be read. Then it may be determined which mapping was used based on the address of the line. The mapping may then be reversed to recover the original line. The steps of determining the encryption / compression may then proceed as described above.
  • FIG. 8 is an example high level flow diagram for writing data according to a mapping according to techniques described herein
  • a block of data to be written to a iine in a rank of memory may be received.
  • the rank of memory may comprise multiple memory devices and the block of data may be written to a number of the memory devices determined by the si2e of the block of data.
  • a biock of data to be written to the memory devices may be received.
  • the number of memory devices needed in order to write the complete biock of data is determined by the size of the block of data. Smaller blocks may require fewer memory devices, while larger blocks may require more memory devices.
  • a memory device mapping for the line may be retrieved.
  • the memory device mapping may determine the order in which the block of data is written to the memory devices within the rank. In other words, the memory device mapping determines which memory devices will be used to write a block of data to the memory devices. In addition, the mapping determines the order in which the data block is written. As described above, the block of data is not necessarily written to memory devices in sequential order, instead, the mapping may control the order of writes, in block 830, the block of data may be written to the memory devices. The write of the block of data to the memory devices may be based on the mapping.
  • FIG. 9 is another example high level flow diagram for writing data according to a mapping according to techniques described herein, in block 905, just as in block 810, a block of data to be written to a line in a rank of memory may be received. The number of memory devices needed to write the line varies based on the size of the block of data. In block 910, just as in block 820, a memory device mapping may be retrieved. The mapping may determine which devices, and in which order, the block of data is written to the memory devices.
  • the block of data may be written to a write queue.
  • the write queue may hold blocks of data that are waiting to be written to a line in a rank of memory devices.
  • the write queue may hold the data blocks until the memory device write circuit is ready to write the line.
  • a bit vector may be set to indicate the memory devices that will be used to write the block of data. As mentioned above, the techniques described herein allow for fewer than the total number of memory devices to be used when writing a line of data to the memory devices.
  • the bit vector may be used to identify which memory devices will be used when writing a specific block of data.
  • the bit vector may be examined to determine if the block of data can be written to the memory devices. For example, if none of the memory devices that are specified in the bit vector are currently being written to, the write may proceed.
  • Block 930 describes a technique to determine if the write can proceed.
  • a bitwise AND of the busy vector and the bit vector may be performed.
  • a resultant zero value may indicate that no devices used in writing the block of data are currently busy, and the write can proceed, in other words, the busy vector maintains a record of which memory devices are currently involved in a write operation. The record is maintained as a busy bit vector.
  • a bitwise AND of the bit vector and busy vector can only be zero when there is no overlap of set bits in each of those two vectors. No overlap indicates that the set of memory devices for each vector are different.
  • the busy vector may be updated based on the bit vector when the write can proceed. If it is determined that a write can proceed, the busy vector is updated to reflect the memory devices that will be used for the write. These memory devices would then be considered busy for later comparison.
  • Block 940 describes a mechanism for updating the busy vector.
  • a bitwise OR may be performed on the busy vector and the bit vector. In other words, the current busy vector is bitwise OR'ed with the bit vector of the line to be written.
  • the resultant values may be stored in the busy vector. The resultant value may be stored as the new busy vector.
  • the bitwise OR operation ensures that the bits will be set for each memory device currently in use, or will be in use when the new block of data is written. Thus the new busy vector is set to indicate all memory devices that would be in use.
  • the block of data may be written when the write can proceed. If the comparisons above indicate that there is no conflict between a new write and any write currently in progress, the new write may proceed. As mentioned above, bandwidth may be increased as multiple writes may occur in parallel.
  • FIG. 10 depicts an example of a device including converting data blocks according to the techniques described herein.
  • Device 1000 may include all of the components previously described with respect to FIGS. 1 , 2, and 8, however those components are not shown for purposes of clarity.
  • Device 1000 depicts mainly those components used for changing mappings. However, if should be understood that device 1000 contains ail the functionality previously described.
  • Device 1000 may include a memory controller 1010, a memory device write circuit 1025, and memory devices 1050-1 ....9. These elements are similar to those described in previous figures and for purposes of clarity, the descriptions are not repeated here.
  • Device 1000 may also include a data block mapping circuit 1060, a mapping 1061 , a data block conversion circuit 1062.
  • the mapping 1061 may include a first mapping 1063 and a second mapping 1064. Also included may be a conversion progress indicator 1065.
  • the data block mapping circuit 1060 is similar to the data block mapping circuit 660 and for purposes of clarity wii! not be described in further detail.
  • the data block conversion circuit 1062 may be used to convert data blocks from a first mapping to a second mapping, as will be described in further detail below.
  • the mapping 1061 may include multiple versions, such as a first mapping 1063 and a second mapping 1064. As explained above, the mapping determines the order in which bytes of a data block are stored in the memory devices 1050.
  • the first mapping and second mapping may be related, such as being derived from one another.
  • the second mapping 1064 may be created by rotating the first mapping 1063. in other words, line 0 of the first mapping becomes line 1 of the second mapping. Line 1 of the first mapping becomes line 2 of the second mapping, and so on. When line 7 of the first mapping is reached, the line numbers roll over, and it becomes line 0 of the second mapping. It should be understood that the single line rotation is merely exemplary.
  • the function may then be modified when a new mapping is to be created. For example, the function may be modified by additionally hashing in a first or second hashing function that may be generated. For example the generation of the function may come from a liner feedback shift register or some other pseudo random source. In this way a predictable progression between mappings would be used that would provide evenly spread access across the memory for the lifetime of the memory devices.
  • the second mapping may be completely independent of the first mapping and is not formed by a rotation or any other derivation of the first mapping.
  • the conversion progress indicator 1065 may be used to indicate the current progress of conversion from the first to the second mapping.
  • the data block conversion circuit may perform the conversion.
  • the data block conversion circuit 1062 may have a conversion progress indicator 1065.
  • the conversion progress indicator may initially be set to the start address of the data blocks. For example, initially, the conversion progress indicator may be set to point to line 0 shown in FIG. 10.
  • the data block conversion circuit may convert the line pointed to from the first mapping to the second mapping (described in further detail below).
  • the conversion progress indicator may then be advanced to the next data block and the process is repeated. The process may be repeated immediately, or it may be triggered periodically, such as each time 100 memory locations are written.
  • the current location of the conversion progress indicator may be read, if the block being read is below the indicator, this means the block has already been converted and the second mapping should be used. If the block is above the indicator, it means the block has not yet been converted and the first mapping should be used. For example, as shown assume the indicator is currently pointing at line 5. Because lines 0-4 are below the indicator, those blocks have already been converted, and the second mapping should be used. Lines 6-n are above the current position of the indicator, indicating those blocks have not yet been converted. As such, the first mapping should be used.
  • line 5 may be in the process of being converted.
  • An access to the line currently being pointed to by the indicator may be slightly delayed, to ensure that the conversion has completed. This may be managed just the same as any occurrence of a read that matches a pending write operation.
  • the conversion process may include reading the data block using the first mapping.
  • the data block may then be stored using the second mapping.
  • Line 5 is shown as an example.
  • the compressed data block shown in line 5 uses 4 memory devices.
  • the first four devices to be used for line 5 are 8, 8, 7, and 9. This is shown in line 5 of FIG. 10, wherein devices 6, 8, 7, and 9 contain the indicators A, C, B, and D respectively.
  • those data blocks are read and then stored again using the second mapping.
  • the mapping for line 5 when using the second mapping 1084 and a compressed block using 4 devices is 5, 2, 4, and 3 (e.g. the same as line 4 for the first mapping, once rotated).
  • the second mapping is used.
  • the data blocks are stored in devices 5(A), 2(B), 4(C), and 3(D).
  • a different set of devices was used to store the same compressed line. Thus, wear on any individual device may be reduced, because changing the mapping may result in changes to the devices that are used.
  • memory device wear may occur when a particular block of data (compressed or uncompressed) is repeatedly written.
  • a mapping may be used such that the repeatedly written data block is rotated through physical memory such that the data block does not spend enough time in any one physical memory location to wear it out.
  • the conversion process described above may be coordinated with the physical address rotation mechanism, such that both the rotation and conversion occur at the same time, in other words, the data may be read, converted to the new mapping, then stored at a line different form the one from which the data block was originally read.
  • the interaction between the wear leveling techniques need not be one to one.
  • the address rotation described above may occur less frequently (e.g. every 3 rd , 5 th , etc.) time the mapping is changed or more frequently than when the mapping is changed.
  • FIG. 1 1 is an example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
  • block 1 1 10 a request to retrieve a block of data stored in a memory devices in a rank of memory may be received.
  • a user may wish to use the data block that has been previously stored.
  • the data block may have been compressed and the particular memory devices used and the order of those memory devices may have been determined by the amount of compression and a mapping.
  • mapping that was used when the data block was stored may be determined.
  • the block of data may be retrieved from the memory devices. For example, the nine memory devices may be read.
  • the retrieved block of data may be ordered based on the determined mapping.
  • the block of data may be decompressed.
  • FIG. 12 is another example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
  • a request to retrieve a block of data stored in memory devices may be received.
  • the block of data may be retrieved from the memory devices.
  • the process moves to block 1215.
  • an address of the block of data may be determined. The determination of the address may actually be part of the request to retrieve the block of data, or it may be determined independently. What should be understood is that each block of data may be identified by an address, and the address associated with that block may be determined.
  • a conversion progress indicator may be retrieved.
  • the conversion progress indicator may indicate the progress of conversion of lines in the rank of memory from a first mapping to a second mapping.
  • one example mapping conversion process involves stepping through each line in the rank of memory devices and converting that line form the first to the second mapping. As each line is converted, the conversion progress indicator is advanced, and the next line is converted.
  • mapping may be determined based on the address and the conversion progress indicator, in other words, if the
  • the first mapping may be used. However, if the conversion progress indicator indicates the block of data has already been converted, the second mapping may be used. In block 1230, the first mapping may be discarded once the conversion progress indicator indicates no lines remain to be converted. In other words, once all lines have been converted, there may no longer be any blocks of data that used the first mapping (e.g. they have all already been converted). Thus, there is no longer a need to maintain the first mapping.
  • the process moves from block 1210 to block 1235.
  • the block of data may be ordered based on a first mapping. In other words, the block of data is ordered, assuming it was originally stored using the first mapping.
  • an attempt to decompress the block of data may be made.
  • the block of data may be ordered using a second mapping.
  • an attempt to decompress the block of data may be made.
  • It may be determined which decompression was successful. A successful decompression may indicate the mapping that was used when the block of data was stored. As explained above, it is highly- unlikely that a block of data stored using the first mapping would be successfully decompressed using the second mapping. Likewise, it is highly unlikely that a block of data stored using the second mapping would be properly
  • the retrieved block of data may be ordered based on the determined mapping.
  • the block of data may be
  • the steps of ordering and decompressing the data may have already occurred as part of the mapping determination process. Furthermore, it should be understood that certain steps may occur in parallel. For example, the attempts at decompression using the first and second mapping may occur substantially in parallel.
  • FIG. 13 is an example high level flow diagram for changing the mapping used by compressed data blocks.
  • a first mapping of compressed data blocks may be periodically replaced with a second mapping of compressed data blocks, in other words, the mapping that is used when storing data blocks to memory devices may be periodically changed.
  • the mapping used when storing data blocks is also needed when the data blocks are retrieved.
  • the compressed data blocks stored with the first mapping may be converted to compressed data blocks stored with the second mapping.
  • the mapping used to store data blocks is needed when reading the data blocks. If a data block is stored with the first mapping, and then an attempt is made to read the data block using the second mapping, the read may fail. Thus, data blocks stored with the first mapping may be converted to data blocks stored with the second mapping.
  • FIG. 14 is another example high level flow diagram for changing the mapping used by compressed data blocks, in block 1405, just as in block 1310, a first mapping may periodically replace a second mapping.
  • the techniques described herein are not limited to any particular period.
  • the period may be daily, weekly, monthly, or any combination thereof.
  • the periods need not be uniform.
  • the mapping may be replace in one instance after a day, but in the next instance after a week, in some example implementations, rather than the period being determined by passage of time, the period may be determined as a function of the number of reads and / or writes to the memory. For example, each time 100 writes are completed to the memory.
  • the first mapping and second mapping may be related.
  • the second mapping may be derived from the first mapping, in other implementations, the first and second mappings may be independent of each other.
  • the process moves to block 1410, in which a conversion progress indicator is set to a start address of the compressed blocks.
  • a conversion progress indicator may be set to point to the first block of data stored on the memory devices.
  • a compressed block indicated by the conversion progress indicator may be read using the first mapping. Because the block has not yet been converted, the first mapping is the appropriate mapping.
  • the compressed block may be reordered based on the second mapping.
  • the reordered compressed block of data may be stored.
  • the conversion progress indicator may be advanced, in other words, the conversion progress indicator is initially set to point to the first block of data. The block is read using the first mapping, reordered using the second mapping, and then stored. The same process then occurs for the next block of data. This process may occur until all blocks of data have been converted. It should be clear that as the conversion progress indicator advances, blocks before the current position have already been converted, while blocks later than the current position have not yet been converted. [0128] In an alternate implementation, the process moves to block 1440, in which a compressed block of data is read.
  • an attempt at decompression may be made using the first mapping. In other words, it is assumed the block was compressed using the first mapping.
  • the block of compressed data may be stored using the second mapping, in an alternate implementation, the conversion may occu as the data blocks are accessed.
  • the alternate implementation described in blocks 1440-1450 may be useful in cases where the conversion process described in blocks 1410-1435 is progressing, but a read request of an address that has not yet been converted is received.
  • the address may be read and it may be determined that block has not yet been converted based on the conversion progress indicator.
  • the block may then be modified and stored, however, when stored, the block may use the second mapping.
  • an assumption that that the first mapping was used would be incorrect.
  • By first attempting to decompress the data block using the first mapping it may be determined that the data block has already been converted to the second mapping and further conversion is not needed. However, if the conversion is successful, this may mean that the first mapping was used, and the conversion to the second mapping should proceed as normal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

Techniques for compressed data block mapping are provided. In one aspect, a request to retrieve a block of data stored in memory devices in a rank of memory may be received. The mapping that was used when the data block was stored may be determined. The retrieved data block may be ordered based on the determined mapping. The block of data may be decompressed.

Description

COMPRESSED DATA BLOCK MAPPING
BACKGROUND
[0001] Electronic devices, such as computers, may include memory. For example, a computer may include static random access memory (SRAM) and dynamic random access memory (DRAM). SRAM and DRAM share the characteristic power must be continuously supplied in order to retain data stored in the memory. If the power is removed, the stored data may be lost. Another type of memory that is becoming more prevalent is non-voiatile random access memory (NVRAM). NVRAM may have the characteristic that once data is stored to the NVRAM, the data remains persistent, even if power is no longer supplied to the device.
BRIEF DESCRIPTION OF THE DRAWI GS
[0002] FIG. 1 depicts an example of a device that may use the data writing to a subset of memory devices techniques described herein.
[0003] FIG. 2 depicts another example of a device that may use the data writing techniques described herein.
[0004] FIGS. 3(a-c) depict examples of write / read patterns in accordance with the data writing techniques described herein.
[0005] FIG. 4 depicts an example high level flow diagram of the data writing techniques described herein.
[0006] FIG. 5(a,b) depicts another example high level flow diagram of the data writing techniques described herein.
[0007] FIG. 6 depicts an example system including write based on mapping according to the techniques described herein. [0008] FIGS. 7(a-d) depict examples of using bit vectors and a busy vector to permit concurrent writes according to techniques described herein.
[0009] FIG. 8 is an example high level flow diagram for writing data according to a mapping according to techniques described herein.
[0010] FIG. 9 is another example high level flow diagram for writing data according to a mapping according to techniques described herein.
[0011] FIG. 10 depicts an example of a device including converting data blocks according to the techniques described herein.
[0012] FIG. 1 1 is an example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
[0013] FIG. 12 is another example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein.
[0014] FIG. 13 is an example high level flow diagram for changing the mapping used by compressed data blocks.
[0015] FIG. 14 is another example high level flow diagram for changing the mapping used by compressed data blocks.
DETAILED DESCRIPTION
[0016] As mentioned above, some memory components in an electronic device, such a SRAM and DRAM require power in order to maintain storage of data. Other devices, such as NVRAM are able to store data without the need to continuously supply power. However, even though power is not needed to retain the persistence of the data, power is needed when the data is originally written. Currently existing forms of NVRAM (e.g. FLASH memory) as well as new types of NVRAM currently being developed (e.g. memristor, phase change RAM, spin torque transfer RAM) do not require the continuous supply of power in order to maintain the persistence of data stored thereon. However, these devices do use power when originally writing the data to the device. This use of power may be referred to as write energy. It should be understood that SRAM and DRAM also require write energy to store data, and as such the techniques described herein are equally applicable to SRAM and DRAM. [0017] Many electronic devices, such as computers, include a memory controller to manage storing and retrieving data from memory. The memory controller may not individually read and write bytes of data from the memory. Rather, the memory controller may operate on groups of bytes, referred to as a line of data. For example, in a computer, memory is typically operated on in units equivalent to the size of a cacheline in the processor. For example, if a processor has a cacheline size of 64 bytes, the memory controller may receive / provide data to the processor in units of 64 bytes. However, techniques described herein are not limited to any particular cacheline size. For the remainder of this description a line may refer to a data block that is provided to the memory controller to be written to memory or is provided by the memory for use by the electronic device. The techniques described herein are not limited to any particular line size.
[0018] The memory may be divided across several memory devices which may be referred to as a rank. For example, for a given line, the memory devices that store the data that make up the line are all in the same rank. A rank of memory devices may store multiple lines. For example, for a 84 byte line, there may be 9 memory devices in the rank. Each of the first 8 memory devices (e.g. a memory chip) may store 8 bytes of the line. The 9ih memory device may be used to store an Error Correction Code (ECC). The nine memory devices that make up the rank may store large numbers of lines.
Although a specific example of a rank of memory is described, it should be understood that the techniques described herein are not limited to any particular layout of memory devices in a rank.
[0019] The techniques described herein provide for receiving a line of data to be written to memory. The line may be examined to determine If the line can be compressed. If so, the line may be compressed, and a header describing the compression may be added to the line. An ECC for the overall line may be calculated. The compression may result in fewer than the total number of memory devices within the rank being needed to store the compressed line. As such, the memory devices that are not needed are not written, thus saving the write energy that would have otherwise been used to write to those devices, in some cases the data may be encrypted prior to being written to the memory devices.
[0020] The line that is stored may contain the data needed to determine if the line is compressed, and if so, how the line should be decompressed. For example, if the ECC does not use ail bits available on the ECC storage device for the line, then the extra bits may be used to indicate if the line is compressed or not. In other implementations, different techniques, described below, may be used to determine if the line is compressed. When the data is to be read, it may be determined if the line is encrypted and/or compressed. The line may then be decrypted and/or decompressed and provided to the requestor.
[0021] The techniques described herein are Operating System (OS) independent and as such the OS is not required to have any knowledge of the compression occurring in the memory system. In other words the techniques described herein are completely transparent to the OS, applications, or other software running on the system. No OS, application, or other code modification is required.
[0022] In one example implementation, writes to the memory devices are based on a mapping, instead of always writing a compressed block to the rank of memory in the same order, a mapping may be used. For example, if a compressed line would use four memory devices to store the line, the mapping would determine which four devices are used. By using the mapping, it can be ensured that the first memory devices in the rank are not always selected.
[0023] Because the writes to memory devices are spread based on the mapping, it may be possible to increase memory write bandwidth by performing multiple writes in parallel. For example, if a first line is to be stored on the first three memory devices and a second line is to be stored on the last three memory devices, the lines may be written in parallel. Because there is no overiap in the memory devices used, each device can be commanded to write a different line. Furthermore, the mapping may even out power dissipation of the memory devices. Using the techniques described herein, power may be dissipated over ail the devices in a more even manner, because the mapping ensures that the same set of memory devices are not always used. [0024] In an example Implementation, the techniques described herein further provide for a mechanism for wear leveling amongst memory devices. One characteristic of certain types of memory, such as memristor based NVRAM, is that the memory may be susceptible to wear. In a memory cell, wear limits the number of times a memory location can be reliably read/written. For example, if a particular memory address on a memory device is repeatedly written, at some point, that address may no longer be capable of reliably storing the data that was written.
[0025] The techniques described herein provide for a mechanism to partially mitigate the effects of memory wear. The mapping described above may be periodically altered, such that the same memory devices are not used indefinitely. For example, if a compressed line uses three memory devices, a first version of the mapping may indicate which three memory devices to use. Absent the techniques described herein, the same three memory devices would always be used, assuming the same compression is used for the line. If the same devices are always used, those devices may wear at a greater rate.
[0026] The techniques described herein provide for periodically changing the mapping, such that different devices may be used. For example, if a first version of the mapping causes certain memory devices to be used when storing a compressed line, a second version of the mapping may cause different devices to be used. Because different devices are used, the amount of wear on a given device may be reduced. A background circuit may be used to convert lines stored using the first mapping to the second mapping. During the time period of the conversion, both mappings may be maintained. Reading a line uses the mapping used when the line was stored. During the period when the lines are being converted, an indicator may be read to determine if the line has been converted, if so, the new mapping may be used, if not, the old mapping may be used.
[0027] FIG. 1 depicts an example of a device that may use the data writing to a subset of memory devices techniques described herein. System 100 may include a memory controller 1 10 coupled to a plurality of memory devices 150-1 ...9. Although 9 memory devices are depicted, it should be understood that this is to aid in the description. The techniques described herein are not limited to any particular number of memory devices.
[0028] The memory controller 1 10 may be a device that is a standalone device, or it may be integrated within a larger device (e.g., a processor, part of a chipset). The techniques described herein are not limited to any particular implementation. The memory controller may include a data block compression circuit 1 15, an ECC generation circuit 120, and a memory device write circuit 125. The memory controller and each of these circuits may be implemented as hardware circuits, or as a combination of hardware circuits and instructions readable and executable by the hardware circuits. For example, the memory controller may be implemented as logic on an integrated circuit, as an application specific integrated circuit (ASIC), as an FPGA, or in any other suitable manner.
[0029] The data block compression circuit may be a circuit to receive a block of data and compress that block of data. For example, the compression circuit may implement Base Delta Immediate (BD!) compression, which may allow a 84 byte data block to be compressed to a data block ranging from 0 to 64 bytes. Although a specific compression technique has been mentioned, the techniques described herein are not limited to any specific compression mechanism.
[0030] A block that cannot be compressed may be stored in raw form. A block that can be compressed may have a compression header generated by the compression circuit 1 15. The compression header may contain information that may be used to later assist in decompression. For example, the compression may indicate the process that was used to compress the data block and how that data block can be decompressed.
[0031] The ECC generation circuit 120 may be circuitry used to calculate an ECC for the block of data. The ECC may be used to determine if there has been an error in the data. Many ECCs can be used to correct for single bit errors and detect multiple bit errors. In some implementations, as will be described in further detail below, the ECC may be used to determine if the data block has been compressed, in the example being described, there are 8 bytes provided for an ECC. If the ECC being used does not use ali 8 bytes, one or more bits may be used to indicate that the data block is compressed. The ECC generation circuit may insert those bits into the ECC in such implementations. These bits may be referred to as compression metadata. However, if the ECC uses ali 8 bytes, an alternate mechanism for determining if the data block is encrypted is described below, with respect to FIG. 3.
[0032] The memory device write circuit 125 may be used to write bytes of data to memory devices. For example, the memory device write circuit may be coupled to memory devices that make up a rank of memory. When it is desired to write a line of data to the rank of memory, the memory device write circuit may write the line to the individual memory devices that make up the rank.
[0033] The system 100 may also include a plurality of memory devices 150-1 ...9 that make up a memory rank. System 100 is shown with a memory rank made up of 9 devices, however, it should be understood that this is for purposes of ease of description and not by way of limitation. The techniques described herein are suitable for use with memory ranks comprising any number of memory devices.
[0034] Each memory device may store a particular range of bytes for a given line. For example, memory device 150-1 may store bytes 0-7 for each line, memory device 150-2 may store bytes 8-15, and so on. The rank of memory may store any number of lines, as is shown by lines 1 -n. The techniques described herein are not limited to ranks storing any particular number of lines. What should be understood is that a rank of memory may store many lines, and an individual memory device within the rank may store a portion of each line.
[0035] In operation, a request to write a block of data may be received by the memory controller. This is depicted by the "DATA BLOCK IN" arrow. At a high level, there are two possibilities when it comes to compressing a block of data. The block is either compressible or it is not compressible. Each of these two situations is now described.
[0036] Assume the received block of data 175 is not compressible. As such, the data block compression circuit is not able to compress the data block. As mentioned above, uncompressib!e data blocks are stored in their raw form. In this case, the biock of data is 64 bytes long and may be store uncompressed. The ECC generation circuit may generate an ECC over the 64 bytes and the ECC is appended to the line. The memory device write may then receive the uncompressed data block as well as the appended ECC and write the line to memory devices 150-1 ...9. As indicated by the matching hashes, the biock of data 175 is show as being written to line 1 within the memory devices. It should be noted that is such cases, each memory device is written to, and as such write energy is used for writing to all 9 memory devices.
[0037] In the second case, the received block of data 178 may be compressible. In the example, assume that the compression circuit 1 15 is able to compress the data block to a smaller number of bytes. The compression circuit may then append a compression header to the compressed bytes. The compression header may be described as metadata that describes the compression. As shown by the hashes on line 176, assume that the
compressed data and compression header uses bytes 0-23 (24 bytes total). The ECC may then generate an ECC covering the 24 bytes of compression header and data plus 40 bytes of padding.
[0038] The memory device write circuit may then write the compressed line to the memory devices. As shown, memory devices 150-1 -3 in line 3 of the memory devices may be used to store the compression header and
compressed data. The generated ECC may be stored in memory device 150-9. However, it is not necessary to write any data to memory devices 150-4-8, as indicated by the blacked out boxes, in comparison to the uncompressed case described above, only 4 memory devices instead of 9 are written to. As mentioned above, each write to a memory device requires write energy. By reducing the total number of memory devices written to, compression enables a reduction in the total amount of write energy needed to write a line of data.
[0039] In addition to reducing the amount of write energy needed, the techniques described herein also provide for a mechanism to reduce the amount of read energy needed when reading a line of data. This technique is described in further detail below, but what should be understood for now is that the portions of the line not written (e.g. the portions in black) are not use to store valid data. In other words, the portions of each line in black remain unused.
[0040] FIG. 2 depicts another example of a device that may use the data writing techniques described herein. Many of the elements of FIG. 2 are very similar to the elements in FIG. 1 and are similarly numbered. For ease of description, the description of those elements is not duplicated. System 200 may include a memory controller 220, which is very similar to memory controller 1 10. The memory controller may include a data block compression / decompression circuit 215, an ECC generation / validation circuit 220, a memory device write circuit 225, a background scrubber circuit 230, and an encryption / decryption controller 235. System 200 may also include memory devices 250-1 ...9, which are essentially the same as those described with respect to FIG. 1.
[0041] Data block compression / decompression circuit 215 performs a similar function to the similarly numbered element in FIG. 1 . In addition, circuit 215 may also perform decompression. For example, the circuit may use the compression header contained in a compressed line and use that information in order to decompress the compressed line back into the uncompressed block. Although circuit 215 is depicted as a single circuit performing both compression and decompression, it should be understood that this is only an example implementation. Other implementations may use different circuit to perform these functions.
[0042] System 200 may also include ECC generation / validation circuit 220. As above with respect to element 120, circuit 220 may generate an ECC to ensure that a line does not contain errors. Circuit 220 may also include functionality to validate the ECC. Circuit 220 may examine a line of data and validate that the ECC indicates that there are no errors in the line. As above, although depicted as a single generate / validate circuit, this is only an example implementation. Other implementations may use different circuits for each of these functions.
[0043] System 200 may also include a memory device read / write circuit 225. The memory device read /write circuit may be very similar to the equivalent circuit in FIG. 1 , with the exception that the memory devices can be both read and written. The description is not repeated here. System 200 may also include a background scrubber circuit 230. The background scrubber circuit may examine the memory devices 250-1 ...9 as a task that runs continuously in the background, setting unused portions of lines to a high resistance state. As mentioned above, some portions of lines may remain unused (e.g. the black boxes). For some memory technologies (e.g.
memristor), the amount of read energy used is dependent on the values stored at the designated location, and in the same array. Reads and writes to arrays with more high resistance values may require less energy to perform the read or write. For memory devices storing unused portions of the line, setting the resistance value to a high state reduces the amount of energy needed when reading or writing the line.
[0044] Although additional write energy is used when setting the memory devices to the high resistance states, this energy can be expended at a time that is convenient for the system. For example, assume that over a period of time there are a large number of memory writes. During such periods, reducing the overall amount of write energy would be useful, as reduction of energy usage in a system may be helpful. For example, reduction in energy usage may allow the system to remain below power usage caps. Thus, omitting the writes to unused devices would be helpful in ensuring the system stays within operating parameters (e.g. total energy usage). However, at a later time, there may not be many writes occurring. During these periods of time, the
background scrubber circuit may operate. If the system load increases such that the background scrubber's energy usage becomes problematic, the system can temporarily halt the background scrubber circuit.
[0045] System 200 may also include an encryption / decryption controller 235. The encryption decryption controller may include an encryption / decryption selection circuit 237 and at least one encryption /decryption circuit 239-1 ...n. The encryption / decryption controller may be used to encrypt and decrypt lines that are stored to the memory devices. The encryption may help improve security in the system. For example, as mentioned above, NVRAM may retain its contents even when power is no longer supplied. A malicious actor could physically steal one or more of storage devices 250-1 ...9. The data on these devices could then be retrieved by the malicious actor. By encrypting the data, it may be ensured that even in such a situation, the stolen devices would remain unreadable.
[0046] The controller 235 may include an encryption / decryption selection circuit. The encryption / decryption selection circuit 237 may be responsible for dividing up a data block into smaller blocks of a fixed size. In some cases, the smaller blocks may be padded with a value, such as 0. The circuit 237 may be used to divide up the block and pad as needed. Operation of the circuit 237 is described in further detail below, with respect to FIG. 3(a-c).
[0047] The controller 235 may also include at least one encryption / decryption circuit 239-1 ...n. The encryption / decryption circuit 239 may be used to encrypt / decrypt the fixed size blocks of data generated by the circuit 237. In some cases, there may be a single circuit, and blocks are encrypted / decrypted serially. In other implementations, there may be multiple circuits 239, and encryption / decryption of the fixed size blocks may occur in parallel.
Furthermore, although shown as a combined encryption / decryption circuit, it should be understood that this functionality may be divided into separate encrypt and decrypt circuits. What should be understood is that system 200 provides circuits to both encrypt and decrypt fixed size blocks of data.
[0048] Operation of system 200 will be described with reference to several examples. These examples will generally start with an uncompressed block of data, and will move through the process of compression, encryption, decryption, and decompression. However, every example, will not include every stage.
[0049] Continuing with example 176 from FIG. 1 , assume that there is a compressed line 276a. The compressed line is also shown as line 3 in memory devices 250-1 ...9. In order to read the line, all 9 memory devices 250-1 ...9 may be read using the memory device read / write circuit. The data block
compression / decompression circuit 215 may examine the compression metadata to determine if the line is compressed. For example, the bits taken from the ECC bytes above may be examined to determine if the block is compressed, if the line is not compressed, the ECC generation / validation circuit 220 may validate the line 276b by determining if the ECC indicates there are any errors. If no errors are present, the uncompressed line 276c may be sent out of the memory controller as indicated by the data block out arrow.
[0050] However, if it is determined that the line is compressed, the data block compression / decompression circuit 215 may examine the compression header metadata that was appended to the compressed line to determine how the line was compressed. The line may be padded based on the compression header and the ECC validated. If the line is valid the circuit 215 may decompress the line, resulting in an uncompressed line 276c. The
uncompressed data block 276c may be sent as the data block out.
[0051] FIGS. 3(a-c) depict examples of write / read patterns in accordance with the data writing techniques described herein. FIGS. 3(a-c) continue with the examples that were started in FIGS. 1 and 2. FIG. 3a depicts the encryption process. For example, assume that an uncompressible block of data 377a is received. As should be understood, not ail data blocks are able to be compressed. The case of a compressible data block is described further below. The encryption / decryption controller 235 may be used to encrypt the data block.
[0052] The encryption / decryption selection circuit 237 may divide the data block 377a into fixed size units. For example, the fixed size units may be 16 bytes each, resulting in the 64 byte data block being divided Into 4 fixed size encryption blocks. The encryption / decryption circuit(s) 239-1 ... n may then encrypt each of the fixed size blocks 377b. As mentioned above, if multiple encryption circuits are provided, the encryption of each block may occur in parallel. However, the techniques described herein are also suitable for use with a single encryption circuit, wherein the blocks are serially encrypted.
[0053] The ECC generation / validation circuit 220 may then generate an ECC to ensure that the line contains no errors. The ECC may be appended to the line 377c and the line stored in the memory devices. As indicated, because no compression was done, all memory devices are written and there is no saving of write energy. The process of decrypting the line is described in further detail below,
[0054] FIG. 3b depicts an example of receiving a compressible block of data, compressing the block, encrypting the block, decrypting the block, decompressing the block, and returning the original compressible block. As shown, a compressible block of data 378a may be received. The data block compression / decompression circuit 215 may be used to compress the data block and append a compression header 378b. In this example, the
compressed data block and header is shown as being 36 bytes long.
[0055] The encryption / decryption selection circuit 237 may then divide the compressed block into fixed sized encryption units 378c. For example, the fixed size encryption units may be 16 bytes long. As shown, the compressed block may be divided into a first complete encrypt block for bytes 0-15 and a second complete encrypt block for bytes 16-31 . The remaining bytes, 32-35 may then be padded (e.g. padded with zeroes) to result in a third encrypt block spanning bytes 32-47. It should be noted that no data is being stored in bytes 48-63. Blocks may then be encrypted by the encryption / decryption circuits 239-1 ...n. It should be noted that the energy used in the encryption process may be reduced because the total number of blocks to be encrypted has been reduced. For example, unlike the case above with the uncompressib!e block where 4 blocks were encrypted, here, only 3 blocks are encrypted. Thus the energy used by the encryption blocks may be saved.
[0056] The ECC generation / validation circuit 220 may then generate an ECC to protect the line. For example, a 16 byte block of zeroes may be appended to the 3 encrypted blocks. An ECC may be generated and appended to the line 378d. The line may then be written to the memory devices by the memory device read / write circuit 225.
[0057] When encryption is performed, the mechanism for decrypting and decompressing the data is slightly different than that which was described above. For example, previously, some spare bits in the ECC bytes may have been used to identify if the block was compressed or not. if it was compressed, the compression header could be examined. However, this examination does not work in cases where the line is encrypted, because the compression header would be unreadable (e.g. it is encrypted), in other words, even if there were bits available in the ECC bytes to indicate the line was encrypted, the compression header could not be deciphered to determine how to decrypt the block. In addition, in some cases, the ECC may use all the available bytes and no spare bits may be available to determine if the line is encrypted.
[0058] In the current example, where a line is 64 bytes long, and the encryption block fixed size is 16 bytes, a compressed line may result in either 1 , 2, 3 or 4 encrypted blocks. An uncompressed line results in 4 encrypted blocks. As mentioned above, an ECC is generated for the line, padding with zeroes as needed. The ECC generation / validation circuit 220 may attempt to validate the line under each of the four possible scenarios. As shown in 378e, the four possibilities may be 1 ) one encrypted block, three pad blocks 2) two encrypted blocks, two pad blocks, 3) three encrypted block, one pad block, and 4) four encrypted blocks. With selection of the right ECC it is highly unlikely that more than one of the four possibilities described above would be properly validated by the ECC. Thus, of the four possibilities, the one that is successfully validated determines how many encrypted blocks are present.
[0059] After the validation, the encryption / decryption selection circuit 237 may be made aware of how many encrypted blocks are in the line. The selection circuit may then cause the decryption circuits 239-1 ...n to decrypt the determined number of encrypted blocks. Just as above in the encryption process, because a reduced number of decryptions may need to be performed, the energy used in decrypting may be reduced.
[0060] The encrypt / decrypt circuits 239-1 ...n may then be used to decrypt the number of blocks 378f determined by the selection circuit 237.
Once the decryption is complete, the compressed block 378g is recovered. At this point, the compression header is no longer encrypted, and can be retrieved from the compressed block. The data block compression / decompression circuit 215 may then be used to decompress the compressed block back to the original compressible block 378h. This step further confirms the size of the block estimated by the ECC validation circuitry. [0061] FIG. 3c describes an alternative mechanism to determine if a block has been compressed. As mentioned above, some ECCs may utilize all available space, leaving no bits available to indicate if a block is compressed or not. An alternative mechanism for determining the compression status of a data block may make use of an invalid ECC. Just as above, a compressible block 379a may be received. The compressible block may be compressed. For example, as shown, the compressed block (including compression header) may reside in bytes 0-40. A valid ECC covering those 40 bytes may then be generated and appended to the compressed block.
[0062] The valid ECC may be generated by either padding out the compressed block to the size needed by the ECC generation circuit 220. For example, if the ECC generation circuit expects a 64 byte block, then the compressed block can be padded with zeroes. In the alternative, an ECC that does not depend on a specific block size may be generated and data regarding the generation placed in the compression header.
[0063] An invalid ECC may then be generated. The invalid ECC may be guaranteed to fail. The compressed block (e.g. bytes 0-40), the valid ECC (e.g. bytes 41-48), unused devices (e.g. bytes 49-63), and the invalid ECC may be stored as a line 379b, in cases where some compression was possible. In cases where no compression is possible, the ECC generated would be the valid ECC to cover the full data block.
[0064] When attempting to retrieve the data block, the line containing the data is first read from all memory devices in the rank. The ECC validation circuit 220 attempts to validate the iine. If the validation is successful, it means the iine was uncompressed, and the data block can be sent out. However, if the ECC validation fails, it may mean that the line is compressed. The compression header may then be examined (perhaps after decryption) to determine how the line was compressed, where the valid ECC is located within the iine, and how that ECC was generated 379c. The block ma then be decompressed and validated using the valid ECC. The original uncompressed block may then be sent out. [0065] FIG. 4 depicts an example high level flow diagram of the data writing techniques described herein. In block 410, a block of data to be written to a line in a rank of memory may be received. The rank of memory may comprise a set of memory devices. As described above, the rank may be made up of any number of memory devices. The techniques described herein are not limited to a specific number of memory devices within a rank.
[0066] In block 420, the block of data may be compressed. As explained above, one possible compression mechanism is BDI compression. However, techniques described herein are not dependent on any particular compression mechanism, in block 430, the compressed block of data may be written to a subset of memory devices that comprise the line. The unwritten portions of the line are not used to store valid data. By writing the compressed block of data to a subset of memory devices, the total amount of write energy is reduced.
Furthermore, by ensuring that the unwritten portions of the line are not used, there is no reason for the OS to be made aware of the compression. As far as the OS is concerned, each line stores one line sized block of data. The OS does not need to consider the possibiiity that a single line may hold data from two separate original blocks of data.
[0087] FIG. 5(a,b) depicts another example high level flow diagram of the data writing techniques described herein, in block 505, just as above in block 410, a block of data to be written may be received. In block 510, just as in block 420, the block of data may be compressed. In block 515, the compressed block of data may be divided into an integer number of encryption block units. As explained above, the encryption circuit may operate on a fixed size block. Thus, the compressed block may be divided in accordance with the fixed size block. As previously mentioned, blocks may be padded if necessary to arrive at the fixed encryption block size.
[0068] In block 520, each encryption block unit may be encrypted. The techniques described herein are not limited to any particular type of encryption. Any encryption mechanism is suitable for use with the techniques described herein, in block 525, metadata indicating the result of the compression may be appended to the block of data. This metadata may include the compression header or may include using spare bits within the ECC to indicate if the block is compressed. As explained above, the particular type of metadata used is dependent on if extra bits are available and if encryption is being used.
[0069] In block 530, a valid ECC may be generated for the compressed block of data. As mentioned above, the valid ECC may be used to verify a compressed line, in block 535, the valid ECC may be appended to the compressed block of data. In block 540, an invalid ECC may be generated, in block 545, the invalid ECC may be appended to the line. As mentioned above, if the ECC validation of the line fails, this may indicate that the line has been compressed.
[0070] In block 550, the compressed block of data may be written to a subset of the memory devices that comprise the line. The unwritten portions of the line may not be used to store valid data. In block 555, portions of the line that are not used to store valid data may be set to a high resistance state using a background scrubber. As described above, setting unused portions of a line to a high resistance state may reduce the amount or energy used during a read or write of the memory devices.
[0071] In block 560, a line in a rank of memory may be read. Reading the line may include reading all memory devices that comprise the rank. In other words, ail memory devices, even those which may not be storing valid data for the line are read. In block 565, metadata indicating the result of the compression may be retrieved from a block header. As mentioned above, in the case of an unencrypted line, the compression header is readily available.
[0072] In block 570, an attempt to validate the line using the invalid ECC may be made. A validation fail may indicate that the block of data has been compressed. In block 575, the block of data may be parsed to locate the valid ECC. As mentioned above, the validation failure with the invalid ECC may indicate a compressed block. The location of the valid ECC may be determined by parsing the compression header to determine where the valid ECC is and how the block was compressed.
[0073] In block 580, the line may be validated using the ECC for ail possible integer numbers of encrypted units. As described above, in the case of an encrypted line, there may be a limited number of possible encrypted blocks (e.g. 1 , 2, 3, or 4). The validation attempts may be made on each of these limited possibilities, and a successful validation may indicate how many encrypted blocks are present. It should be understood that the above description is based on the 16 byte per encryption unit granularity. In some implementations, the determining granularity is the compression granularity. For example, the ECC check could be performed assuming one device, two devices, and so on, up to the maximum number of devices. The ECC check that succeeds may determine how compressed the block is. In block 585 the number of encrypted units may be determined based on the successful validation.
[0074] In block 590, the determined number of encrypted units may be decrypted. As described above, by only decrypting the number of encrypted units present, the energy used for decryption may be reduced. In block 595, the line may be decompressed based on the determined number of encrypted units.
[0075] FIG. 6 depicts an example system including write based on mapping according to the techniques described herein. System 800 may include all of the components previously described with respect to FIGS. 1 and 2, however those components are not shown for purposes of clarity. System 800 depicts mainly those components used for writes based on mapping.
However, it should be understood that system 600 contains all the functionality previously described.
[0076] System 600 may include a memory controller 610. The memory controller may include a data block mapping circuit 660, a memory device write circuit 625, and memory devices 650-1 ...9.
[0077] The data block mapping circuit 660 may include the functionality used to provide the write based on mapping techniques described herein. The data block mapping circuit may include a mapping 661. The mapping may determine how a data block is written to the various memory devices. In one example implementation, the mapping may be an array. Each line of the array may be considered the mapping to be used for that line. For example, as shown, the mapping for lines 0 through 7 is shown. In some example implementations, the mapping may be selected to minimize the memory device overlap of any two adjacent lines. For this purpose, the first and last line may be considered adjacent. Minimizing the overlap may be helpful in increasing the probability that multiple lines may be written in parallel, as will be described below.
[0078] A mapping may be selected based on the line being written. For example, the line number being written may be divided (mod) by the total lines shown in the mapping (e.g. 8). The remainder may determine the selected mapping. For example, if line 8 is being written, the remainder will be 0, thus the mapping for line 0 is selected. Likewise, if line 13 is being written, the remainder will be 5, then the mapping for line 5 may be selected.
[0079] Once a mapping for the line is selected, the memory devices used for that line can be determined. As shown, the 9 boxes to the right of each line indicate the memory devices that are to be used to write that line, as well as the order in which those memory devices are to be written. It should be noted that order does not imply sequential writes of memory devices. In fact, the devices may be written in parallel. For purposes of this description the write order indicates how bytes of the line are mapped to the memory devices (e.g. first 8 bytes on device x, second 8 bytes on device y, etc.). Thus, when writing a line, the particular memory device used may be dependent both on the line being written as well as the size of that line. Operation of the mapping is described in further detail with respect to an example below.
[0080] The memory device write circuit 625 includes all of the
functionality of the memory device write circuit described above. In addition, the circuit may include a write queue 626 and a busy vector 627. The write queue may be a queue that holds lines that are waiting to be written to the memory devices. An example portion of a write queue 626a is shown. Each entry in the write queue may include the data block (e.g. the compressed block) 626b, the line number to be written 626c, and a bit vector 626d. As will be explained in further detail below, the bit vector may be used to indicate which memory devices will be used to write a particular block of data as well as being used to determine which writes may occur in parallel. [0081] The circuit 625 may also inciude a busy vector 627. The busy vector may indicate which memory devices, or more specifically the
communications channel to the memory devices that are currently involved in a write transaction. For example, the busy vector may have one bit that represents each memory device. A set bit may indicate the memory device (e.g. the communications channel to the memory device) is currently busy, while a clear bit may indicate the device is currently not busy. As will be explained below, the busy vector may be used to determine when writes may proceed concurrently.
[0082] The system 600 may also include memory devices 650-1 ...9. These memory devices are generally the same as those depicted in FIGS. 1 and 2, although more lines are shown.
[0083] In operation, data blocks may be received by the memory controller. Just as above, those data blocks may be compressed. The compressed data blocks may then be placed in write queue 626. As shown, the data blocks 626b contain a hashed portion, which indicates data to be written and a clear portion, which may indicate data that need not be written (e.g. unused space resulting from the compression). Line 626e shows a line in more detail. For example, as shown, bytes 0-31 may include valid data to be written, while bytes 24-71 , shown in black, may not need to be written.
[0084] In the example implementation shown in FIG. 6, each memory device may store 8 bytes of a line. As such, the line 626e is divided into 8 byte segments, labeled A-!. These labels will now be used to describe how the mapping may be used to write a line to the memory devices in memory.
[0085] For example, assume that the line 626e is to be written to line 8. As explained above, the line number (i.e. line memory address) may be divided (mod) by the number of entries in the mapping table (e.g. 8) and the remainder used to determine which line in the mapping to select. In this case, line 8 divided by 8 has a remainder of zero, and as such the line 0 mapping may be selected. Referring to the line 0 mapping, it is shown that the memory devices are used in order (e.g. 1 -9). In this example, the line 626e contains valid data to be written for bytes 0-31 , corresponding to labels A-D. Thus, the first memory device may be used to write bytes 0-7 (e.g. A), the second device used to write byte 8-15(e.g. B), the third device used to write bytes 16-23 (e.g. C) and the fourth device used to write bytes 24-31 (e.g. D).
[0086] As shown in the write queue, the memory devices that would be used for the write are shown in the bit vector 626d. As shown, the first 4 bits are set, indicating the first four devices will be used. As shown in line 8 in the memory devices, the blocks A-D are written to the first four memory devices in order. The process of writing the blocks is described in further detail with respect to FIG. 7.
[0087] As another example, assume line 828e is to be written to line 5 (or to a line which results in a remainder of 5). As such, the line 5 mapping will be used. The mapping shown for line 5 indicates that block A goes on device 6, block B on device 8, block c on device 7, and block D on device 9. Just as above, the busy vector is set to indicate that memory devices 6-9 are used for the write. It should be noted that the memory devices used for writing the same data block 626e are different, depending on which line in the memory device is being used. In addition to the lines described above, two additional lines (e.g. 6 and 12) are shown. As shown, these lines will use memory devices indicated by their bit vectors. The use of the bit vectors and the busy vector 627 is described in further detail with respect to FIG.7.
[0088] FIGS. 7(a-d) depict examples of using bit vectors and a busy vector to permit concurrent writes according to techniques described herein. As described above, the bit vector may indicate for each entry in the write queue which memory devices (e.g. the communications channels for those memory devices) are going to be used to perform that write. If two different writes will use completely different memory devices, with no overlap, the two (or more) writes may proceed in parallel, because the communications channels to those devices would also contain no overlap. This is because although a memory device may not write two independent lines (e.g. portions of the line stored on that device) simultaneously, there is no need for independent memory devices to ail write the same line. Thus, if one memory device is writing line 0, a different memory device could write line 5, because each device would be receiving commands over a different communication channel.
[0089] FIG. 7a depicts a write queue containing several lines to be written to the memory devices. The write queue is similar to that described with respect to FIG. 6. For purposes of this description, assume that at the outset, no writes are currently in progress (e.g. busy vector is completely clear). As shown in FIG. 7a, the first line in the write queue has the bit vector marked to indicate memory devices 1-4 are to be used. The system may first perform a bitwise AND with the busy vector. If the result is a zero, that means that the bit vector and the busy vector have no common bits set. What this means is that the memory devices used in the busy vector are not the same as those that will be used according to the busy vector.
[0090] In the present example, the busy vector is initially empty. As such, the AND operation produces a zero result, indicating that the write may proceed. To update the busy vector to indicate which memory devices are in use, a bitwise OR operation may be performed between the busy vector and the bit vector. The result may then be stored in the busy vector. The end result being that the bits in the busy vector that were previously set remain set, and those memory devices that will become busy with the new write will now have the corresponding bits set.
[0091] FIG. 7b depicts an attempt to write the second data block in the write queue. As shown, the bit vector for the second item in the write queue indicates that the last four memory devices (e.g. 6-9) are to be used for the write. Again, a bitwise AND between the bit vector and the busy vector is performed. Because there is no overlap of busy devices, the resultant value is zero, indicating that the two writes may proceed concurrently. The busy vector may then be updated by performing a bitwise OR between the current busy vector and the bit vector of the newly added write.
[0092] FIG.7c depicts an attempt to write the third data block in the write queue. As shown, the bit vector for the third items indicates that three memory devices (e.g. 2-4) are to be used for the write. However, a bitwise AND of the bit vector with the busy vector results in a non-zero value (e.g. 01 1 100000 AND 1 1 1 101 1 1 1 = 01 1 100000). Because the same memory devices would be needed for both writes, the write of iine 8 cannot occur concurrentiy. As such, the item remains in the write queue, and the next element is checked.
[0033] FIG.Td depicts an attempt to write the fourth data block in the write queue. As shown, the fourth data biock may use 1 memory device (e.g. device 5). Performing a bitwise AND between the bit vector and the busy vector results in a zero value. As mentioned above, a zero value indicates the writes may proceed concurrently. The busy vector may be updated by performing a bitwise OR. It should be noted that all bits in the busy vector are now set, indicating the communications channel to ail memory devices are currently busy with a write. Thus, no new write of a iine may be added, as ail memory devices (e.g. the communications channel to each device) are busy. When the write issues, the bits associated with the memory devices may be cleared. At that point, new writes may proceed.
[0094] Although not shown in the figures described herein, it should be understood that when reading a line from the memory devices, the mapping described above is first reversed to put the iine back into the original order. Then, the processing described with respect to FIGS. 1 -5 may occur. In the context of the present example system, when a line is read, ail nine devices may be read. Then it may be determined which mapping was used based on the address of the line. The mapping may then be reversed to recover the original line. The steps of determining the encryption / compression may then proceed as described above.
[0095] FIG. 8 is an example high level flow diagram for writing data according to a mapping according to techniques described herein, in block 810, a block of data to be written to a iine in a rank of memory may be received. The rank of memory may comprise multiple memory devices and the block of data may be written to a number of the memory devices determined by the si2e of the block of data. In other words, a biock of data to be written to the memory devices may be received. The number of memory devices needed in order to write the complete biock of data is determined by the size of the block of data. Smaller blocks may require fewer memory devices, while larger blocks may require more memory devices.
[0096] in block 820, a memory device mapping for the line may be retrieved. The memory device mapping may determine the order in which the block of data is written to the memory devices within the rank. In other words, the memory device mapping determines which memory devices will be used to write a block of data to the memory devices. In addition, the mapping determines the order in which the data block is written. As described above, the block of data is not necessarily written to memory devices in sequential order, instead, the mapping may control the order of writes, in block 830, the block of data may be written to the memory devices. The write of the block of data to the memory devices may be based on the mapping.
[0097] FIG. 9 is another example high level flow diagram for writing data according to a mapping according to techniques described herein, in block 905, just as in block 810, a block of data to be written to a line in a rank of memory may be received. The number of memory devices needed to write the line varies based on the size of the block of data. In block 910, just as in block 820, a memory device mapping may be retrieved. The mapping may determine which devices, and in which order, the block of data is written to the memory devices.
[0098] In block 915, the block of data may be written to a write queue. The write queue may hold blocks of data that are waiting to be written to a line in a rank of memory devices. The write queue may hold the data blocks until the memory device write circuit is ready to write the line. In block 920, a bit vector may be set to indicate the memory devices that will be used to write the block of data. As mentioned above, the techniques described herein allow for fewer than the total number of memory devices to be used when writing a line of data to the memory devices. The bit vector may be used to identify which memory devices will be used when writing a specific block of data.
[0099] In block 925, the bit vector may be examined to determine if the block of data can be written to the memory devices. For example, if none of the memory devices that are specified in the bit vector are currently being written to, the write may proceed. Block 930 describes a technique to determine if the write can proceed. In block 930 a bitwise AND of the busy vector and the bit vector may be performed. A resultant zero value may indicate that no devices used in writing the block of data are currently busy, and the write can proceed, in other words, the busy vector maintains a record of which memory devices are currently involved in a write operation. The record is maintained as a busy bit vector. A bitwise AND of the bit vector and busy vector can only be zero when there is no overlap of set bits in each of those two vectors. No overlap indicates that the set of memory devices for each vector are different.
[0100] In block 935, the busy vector may be updated based on the bit vector when the write can proceed. If it is determined that a write can proceed, the busy vector is updated to reflect the memory devices that will be used for the write. These memory devices would then be considered busy for later comparison. Block 940 describes a mechanism for updating the busy vector. In block 940, a bitwise OR may be performed on the busy vector and the bit vector. In other words, the current busy vector is bitwise OR'ed with the bit vector of the line to be written. In block 945, the resultant values may be stored in the busy vector. The resultant value may be stored as the new busy vector. The bitwise OR operation ensures that the bits will be set for each memory device currently in use, or will be in use when the new block of data is written. Thus the new busy vector is set to indicate all memory devices that would be in use.
[0101] In block 950, the block of data may be written when the write can proceed. If the comparisons above indicate that there is no conflict between a new write and any write currently in progress, the new write may proceed. As mentioned above, bandwidth may be increased as multiple writes may occur in parallel.
[0102] FIG. 10 depicts an example of a device including converting data blocks according to the techniques described herein. Device 1000 may include all of the components previously described with respect to FIGS. 1 , 2, and 8, however those components are not shown for purposes of clarity. Device 1000 depicts mainly those components used for changing mappings. However, if should be understood that device 1000 contains ail the functionality previously described.
[0103] Device 1000 may include a memory controller 1010, a memory device write circuit 1025, and memory devices 1050-1 ....9. These elements are similar to those described in previous figures and for purposes of clarity, the descriptions are not repeated here.
[0104] Device 1000 may also include a data block mapping circuit 1060, a mapping 1061 , a data block conversion circuit 1062. The mapping 1061 may include a first mapping 1063 and a second mapping 1064. Also included may be a conversion progress indicator 1065.
[0105] The data block mapping circuit 1060 is similar to the data block mapping circuit 660 and for purposes of clarity wii! not be described in further detail. The data block conversion circuit 1062 may be used to convert data blocks from a first mapping to a second mapping, as will be described in further detail below.
[0106] The mapping 1061 may include multiple versions, such as a first mapping 1063 and a second mapping 1064. As explained above, the mapping determines the order in which bytes of a data block are stored in the memory devices 1050. In some example implementations, the first mapping and second mapping may be related, such as being derived from one another. As shown, the second mapping 1064 may be created by rotating the first mapping 1063. in other words, line 0 of the first mapping becomes line 1 of the second mapping. Line 1 of the first mapping becomes line 2 of the second mapping, and so on. When line 7 of the first mapping is reached, the line numbers roll over, and it becomes line 0 of the second mapping. It should be understood that the single line rotation is merely exemplary. The rotation may be any number of lines, in yet another example of a derivation of a second mapping from a first mapping may include selecting a mapping based on a manipulation of at least a portion of the address of the data block. For example, a hash function or some other manipulation on the address may be used to select a particular ordering (e.g. a line in the mapping table). The function may then be modified when a new mapping is to be created. For example, the function may be modified by additionally hashing in a first or second hashing function that may be generated. For example the generation of the function may come from a liner feedback shift register or some other pseudo random source. In this way a predictable progression between mappings would be used that would provide evenly spread access across the memory for the lifetime of the memory devices.
Furthermore, in some implementations, the second mapping may be completely independent of the first mapping and is not formed by a rotation or any other derivation of the first mapping. The conversion progress indicator 1065 may be used to indicate the current progress of conversion from the first to the second mapping.
[0107] In operation, it may be desired to switch the mapping from the first mapping 1083 to the second mapping 1064. As should be clear, if a data block has been stored using the first mapping, attempting to use the data block with the second mapping will likely be unsuccessful. The reason for this being the ordering of the individual memory devices may be different in the different mappings, resulting in an improper ordering of the data block, if the data block is ordered improperly, it is likely the decompression operation will fail, in other words, in order to switch from one mapping to another mapping, the data blocks stored with the first mapping may need to be converted to the second mapping.
[0108] The data block conversion circuit may perform the conversion. The data block conversion circuit 1062 may have a conversion progress indicator 1065. The conversion progress indicator may initially be set to the start address of the data blocks. For example, initially, the conversion progress indicator may be set to point to line 0 shown in FIG. 10. The data block conversion circuit may convert the line pointed to from the first mapping to the second mapping (described in further detail below). The conversion progress indicator may then be advanced to the next data block and the process is repeated. The process may be repeated immediately, or it may be triggered periodically, such as each time 100 memory locations are written.
[0109] When data is to be read, the current location of the conversion progress indicator may be read, if the block being read is below the indicator, this means the block has already been converted and the second mapping should be used. If the block is above the indicator, it means the block has not yet been converted and the first mapping should be used. For example, as shown assume the indicator is currently pointing at line 5. Because lines 0-4 are below the indicator, those blocks have already been converted, and the second mapping should be used. Lines 6-n are above the current position of the indicator, indicating those blocks have not yet been converted. As such, the first mapping should be used.
[0110] As shown in FIG. 10, line 5 may be in the process of being converted. An access to the line currently being pointed to by the indicator may be slightly delayed, to ensure that the conversion has completed. This may be managed just the same as any occurrence of a read that matches a pending write operation.
[0111] The conversion process may include reading the data block using the first mapping. The data block may then be stored using the second mapping. Line 5 is shown as an example. The compressed data block shown in line 5 uses 4 memory devices. Based on the first mapping 1063, the first four devices to be used for line 5 (in order) are 8, 8, 7, and 9. This is shown in line 5 of FIG. 10, wherein devices 6, 8, 7, and 9 contain the indicators A, C, B, and D respectively. During the conversion, those data blocks are read and then stored again using the second mapping.
[0112] As shown, the mapping for line 5 when using the second mapping 1084 and a compressed block using 4 devices is 5, 2, 4, and 3 (e.g. the same as line 4 for the first mapping, once rotated). When the compressed data block is stored after the conversion, the second mapping is used. As shown in line 5', the data blocks are stored in devices 5(A), 2(B), 4(C), and 3(D). As should be clear, in this example, a different set of devices was used to store the same compressed line. Thus, wear on any individual device may be reduced, because changing the mapping may result in changes to the devices that are used.
[0113] It should be understood that the techniques described above are fully compatible with non-compression related wear leveling techniques. For example, memory device wear may occur when a particular block of data (compressed or uncompressed) is repeatedly written. To mitigate such a circumstance, a mapping may be used such that the repeatedly written data block is rotated through physical memory such that the data block does not spend enough time in any one physical memory location to wear it out. The conversion process described above may be coordinated with the physical address rotation mechanism, such that both the rotation and conversion occur at the same time, in other words, the data may be read, converted to the new mapping, then stored at a line different form the one from which the data block was originally read. Furthermore, the interaction between the wear leveling techniques need not be one to one. For example, the address rotation described above may occur less frequently (e.g. every 3rd, 5th, etc.) time the mapping is changed or more frequently than when the mapping is changed.
[0114] FIG. 1 1 is an example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein. In block 1 1 10, a request to retrieve a block of data stored in a memory devices in a rank of memory may be received. In other words, a user may wish to use the data block that has been previously stored. As mentioned above, the data block may have been compressed and the particular memory devices used and the order of those memory devices may have been determined by the amount of compression and a mapping.
[0115] In block 1 120, the mapping that was used when the data block was stored may be determined. Several example techniques for the
determination are described below. In block 1 130, the block of data may be retrieved from the memory devices. For example, the nine memory devices may be read. In block 1 140, the retrieved block of data may be ordered based on the determined mapping. In block 1 150, the block of data may be decompressed.
[0116] FIG. 12 is another example high level flow diagram for retrieving data blocks with changed mappings according to techniques described herein. In block 1205, just as in block 1 1 10, a request to retrieve a block of data stored in memory devices may be received. In block 1210, just as in block 1 120, the block of data may be retrieved from the memory devices. [0117] In one example implementation, the process moves to block 1215. In block 1215, an address of the block of data may be determined. The determination of the address may actually be part of the request to retrieve the block of data, or it may be determined independently. What should be understood is that each block of data may be identified by an address, and the address associated with that block may be determined.
[0118] In block 1220, a conversion progress indicator may be retrieved. The conversion progress indicator may indicate the progress of conversion of lines in the rank of memory from a first mapping to a second mapping. As explained above, one example mapping conversion process involves stepping through each line in the rank of memory devices and converting that line form the first to the second mapping. As each line is converted, the conversion progress indicator is advanced, and the next line is converted.
[0119] In block 1225, the mapping may be determined based on the address and the conversion progress indicator, in other words, if the
conversion progress indicator indicates that the address of the block of data has not yet been converted, the first mapping may be used. However, if the conversion progress indicator indicates the block of data has already been converted, the second mapping may be used. In block 1230, the first mapping may be discarded once the conversion progress indicator indicates no lines remain to be converted. In other words, once all lines have been converted, there may no longer be any blocks of data that used the first mapping (e.g. they have all already been converted). Thus, there is no longer a need to maintain the first mapping.
[0120] In another example implementation, the process moves from block 1210 to block 1235. in block 1235, the block of data may be ordered based on a first mapping. In other words, the block of data is ordered, assuming it was originally stored using the first mapping. In block 1240, an attempt to decompress the block of data may be made. In block 1245, the block of data may be ordered using a second mapping. In block 1250 an attempt to decompress the block of data may be made. [0121] In block 1255, It may be determined which decompression was successful. A successful decompression may indicate the mapping that was used when the block of data was stored. As explained above, it is highly- unlikely that a block of data stored using the first mapping would be successfully decompressed using the second mapping. Likewise, it is highly unlikely that a block of data stored using the second mapping would be properly
decompressed using the first mapping. Thus, by determining which
decompression was successful, it may be determined which mapping was used.
[0122] In block 1260, the retrieved block of data may be ordered based on the determined mapping. In block 1285, the block of data may be
decompressed. It should be understood that in some implementations, the steps of ordering and decompressing the data may have already occurred as part of the mapping determination process. Furthermore, it should be understood that certain steps may occur in parallel. For example, the attempts at decompression using the first and second mapping may occur substantially in parallel.
[0123] FIG. 13 is an example high level flow diagram for changing the mapping used by compressed data blocks. In block 1310, a first mapping of compressed data blocks may be periodically replaced with a second mapping of compressed data blocks, in other words, the mapping that is used when storing data blocks to memory devices may be periodically changed. As should be clear, the mapping used when storing data blocks is also needed when the data blocks are retrieved.
[0124] In block 1320, the compressed data blocks stored with the first mapping may be converted to compressed data blocks stored with the second mapping. As mentioned above, the mapping used to store data blocks is needed when reading the data blocks. If a data block is stored with the first mapping, and then an attempt is made to read the data block using the second mapping, the read may fail. Thus, data blocks stored with the first mapping may be converted to data blocks stored with the second mapping.
[0125] FIG. 14 is another example high level flow diagram for changing the mapping used by compressed data blocks, in block 1405, just as in block 1310, a first mapping may periodically replace a second mapping. It should be understood that the techniques described herein are not limited to any particular period. For example, the period may be daily, weekly, monthly, or any combination thereof. Furthermore, the periods need not be uniform. For example, the mapping may be replace in one instance after a day, but in the next instance after a week, in some example implementations, rather than the period being determined by passage of time, the period may be determined as a function of the number of reads and / or writes to the memory. For example, each time 100 writes are completed to the memory. In addition, in some implementations, the first mapping and second mapping may be related. For example, the second mapping may be derived from the first mapping, in other implementations, the first and second mappings may be independent of each other.
[0126] In one example implementation, the process moves to block 1410, in which a conversion progress indicator is set to a start address of the compressed blocks. In other words, and indicator may be set to point to the first block of data stored on the memory devices. In block 1415, a compressed block indicated by the conversion progress indicator may be read using the first mapping. Because the block has not yet been converted, the first mapping is the appropriate mapping.
[0127] In block 1425, the compressed block may be reordered based on the second mapping. In block 1430, the reordered compressed block of data may be stored. In block 1435, the conversion progress indicator may be advanced, in other words, the conversion progress indicator is initially set to point to the first block of data. The block is read using the first mapping, reordered using the second mapping, and then stored. The same process then occurs for the next block of data. This process may occur until all blocks of data have been converted. It should be clear that as the conversion progress indicator advances, blocks before the current position have already been converted, while blocks later than the current position have not yet been converted. [0128] In an alternate implementation, the process moves to block 1440, in which a compressed block of data is read. In block 1445, an attempt at decompression may be made using the first mapping. In other words, it is assumed the block was compressed using the first mapping. In block 1450, upon successful decompression, the block of compressed data may be stored using the second mapping, in an alternate implementation, the conversion may occu as the data blocks are accessed.
[0129] The alternate implementation described in blocks 1440-1450 may be useful in cases where the conversion process described in blocks 1410-1435 is progressing, but a read request of an address that has not yet been converted is received. The address may be read and it may be determined that block has not yet been converted based on the conversion progress indicator. The block may then be modified and stored, however, when stored, the block may use the second mapping. When the conversion progress described in block 1410-1435 reaches this particular data block, an assumption that that the first mapping was used would be incorrect. By first attempting to decompress the data block using the first mapping, it may be determined that the data block has already been converted to the second mapping and further conversion is not needed. However, if the conversion is successful, this may mean that the first mapping was used, and the conversion to the second mapping should proceed as normal.

Claims

We Claim:
1 . A method comprising:
receiving a request to retrieve a block of data stored in memory devices in a rank of memory;
determining the mapping that was used when the block of data was stored;
retrieving the block of data from the memory devices;
ordering the retrieved block of data based on the determined mapping; and
decompressing the block of data.
2. The method of claim 1 wherein determining the mapping further comprises: determining an address of the block of data;
retrieving a conversion progress indicator, the conversion progress indicator indicating the progress of conversion of lines in the rank of memory from a first mapping to a second mapping; and
determining the mapping based on the address and the conversion progress indicator.
3. The method of claim 2 further comprising:
discarding the first mapping once the conversion progress indicator indicates no lines remain to be converted.
4. The method of claim 1 wherein determining the mapping function further comprises:
ordering the block of data using a first mapping;
attempting decompression of the block of data;
ordering the block of data using a second mapping; and
attempting decompression of the block of data;
wherein a successful decompression indicates the mapping that was used when the block of data was stored.
5. A method comprising:
periodically replacing a first mapping of compressed data blocks with a second mapping of compressed data blocks; and
converting compressed data blocks stored with the first mapping to compressed data blocks stored with the second mapping.
6. The method of claim 5 wherein the second mapping is derived from the first mapping.
7. The method of claim 5 wherein the compression based wear leveling is compatible with non-compression related wear leveling.
8. The method of claim 5 wherein the period is daily;
9. The method of claim 5 wherein the period is after a defined number of writes.
10. The method of claim 5 wherein converting compressed blocks further comprises:
setting a conversion progress indicator to a start address of the compressed blocks;
reading a compressed block indicated by the conversion progress indicator using the first mapping;
reordering the compressed block based on the second mapping; and storing the reordered compressed block of data.
1 1. The method of claim 10 further comprising:
advancing the conversion progress indicator.
12. The method of claim 5 wherein converting the compressed block further comprises:
reading the compressed block of data; attempting decompression using the first mapping; and
upon successful decompression, storing the compressed block of data using the second mapping.
13. A device comprising:
a data block conversion circuit to convert compressed data blocks from a first mapping to a second mapping.
14. The device of claim 13 wherein the data block conversion circuit includes a conversion progress indicator which indicates a current data block that is being converted from the first mapping to the second mapping.
15. The device of claim 13 further comprising a data block mapping circuit the data block mapping circuit to periodically switch from a first mapping to a second mapping.
PCT/US2015/034368 2015-06-05 2015-06-05 Compressed data block mapping WO2016195702A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/US2015/034368 WO2016195702A1 (en) 2015-06-05 2015-06-05 Compressed data block mapping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2015/034368 WO2016195702A1 (en) 2015-06-05 2015-06-05 Compressed data block mapping

Publications (1)

Publication Number Publication Date
WO2016195702A1 true WO2016195702A1 (en) 2016-12-08

Family

ID=57442019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2015/034368 WO2016195702A1 (en) 2015-06-05 2015-06-05 Compressed data block mapping

Country Status (1)

Country Link
WO (1) WO2016195702A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190004843A1 (en) * 2017-07-01 2019-01-03 Intel Corporation Technologies for memory replay prevention using compressive encryption

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177861A1 (en) * 2008-01-08 2009-07-09 Mario Mazzola System and methods for memory expansion
US20100332732A1 (en) * 2009-06-29 2010-12-30 Mediatek Inc. Memory systems and mapping methods thereof
US20140068211A1 (en) * 2012-08-31 2014-03-06 International Business Machines Corporation Converting a first address mapping function for mapping addresses to storage locations to a second address mapping function
US8738860B1 (en) * 2010-10-25 2014-05-27 Tilera Corporation Computing in parallel processing environments
EP2752770A1 (en) * 2013-01-07 2014-07-09 Samsung Electronics Co., Ltd Apparatus and method of converting address and data of memory in a terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177861A1 (en) * 2008-01-08 2009-07-09 Mario Mazzola System and methods for memory expansion
US20100332732A1 (en) * 2009-06-29 2010-12-30 Mediatek Inc. Memory systems and mapping methods thereof
US8738860B1 (en) * 2010-10-25 2014-05-27 Tilera Corporation Computing in parallel processing environments
US20140068211A1 (en) * 2012-08-31 2014-03-06 International Business Machines Corporation Converting a first address mapping function for mapping addresses to storage locations to a second address mapping function
EP2752770A1 (en) * 2013-01-07 2014-07-09 Samsung Electronics Co., Ltd Apparatus and method of converting address and data of memory in a terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190004843A1 (en) * 2017-07-01 2019-01-03 Intel Corporation Technologies for memory replay prevention using compressive encryption

Similar Documents

Publication Publication Date Title
US10620861B2 (en) Retrieve data block from determined devices
US10303622B2 (en) Data write to subset of memory devices
US10254988B2 (en) Memory device write based on mapping
US11544371B2 (en) Secure hardware signature and related methods and applications
US20210342223A1 (en) Systems and methods for adaptive error-correction coding
US20220094553A1 (en) Cryptographic system memory management
US11775332B2 (en) Technologies for memory replay prevention using compressive encryption
US11139959B2 (en) Stream ciphers for digital storage encryption
US20090125726A1 (en) Method and Apparatus of Providing the Security and Error Correction Capability for Memory Storage Devices
JP2010509690A (en) Method and system for ensuring security of storage device
CN110874451A (en) Vector processor storage
CN110661612A (en) Collection of uncorrelated entropy during power-down sequences
US20240004760A1 (en) Apparatus for redundant array of independent disks
US20240004751A1 (en) Intra-controllers for error correction code
WO2016195702A1 (en) Compressed data block mapping
US20220179567A1 (en) Memory system and method of managing encryption key
US20150249467A1 (en) Storage device, controller, and data writing method
US20220148670A1 (en) System and method for data integrity in memory systems that include quasi-volatile memory circuits
JP2008009933A (en) Memory device and its control method
WO2016195704A1 (en) Data block write mapped to memory bank
US20240094940A1 (en) Memory system
CN117850667A (en) Data protection and recovery
KR20080108119A (en) System and method for write failure recovery

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

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

Country of ref document: EP

Kind code of ref document: A1