Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making all other embodiment that obtained under the creative work prerequisite.
In the prior art in the operation process of SSD, the reading and writing of data or the frequent retouching operation that operation can relate to the management data information (also being referred to as list item) to flash memory among the SSD such as move, in order to guarantee the access speed of management data information, in the SSD operation process, leave the management data information of flash memory in synchronous DRAM (Synchronous Dynamic randomaccess memory; Hereinafter to be referred as SDRAM), second generation Double Data Rate synchronous DRAM (Double Data Rate Synchronous Dynamic random access memory II; Hereinafter to be referred as DDR II) or third generation Double Data Rate synchronous DRAM (Double DataRate Synchronous Dynamic random access memory III; Hereinafter to be referred as DDR III) etc. in the high speed volatile storage medium.For example, since SSD and traditional mechanical hard disk usually employing fixedly the processing mode of mapping relations is different, when in SSD, storing, though the mapping relations that the LBA (Logical Block Addressing) LBA of host side is corresponding with the physical block address PBA of storage medium have certain principle, but it is not fixing, in order to guarantee access speed, will be used for usually safeguarding that the mapping table of the mapping relations of LBA and PBA leaves in the high speed volatile storage medium such as SDRAM, DDRII or DDRIII.
The management data information of flash memory also can include log information, some status informations in the SSD operation process have been generally included in this log information, especially when SSD breaks down, have great importance for solving the SSD fault according to the abnormal information that writes down in the log information.
The management data information of flash memory also can include bad block message of FLASH chip in the flash memory or the like information that management plays an important role to SSD.When SSD will quit work, the SSD controller can be with the management data information back-up to flash memory, and system works on power next time, again according to the management data information that backs up, in the high speed volatile storage medium of SSD, derive the management data message, proceed operate as normal to guarantee SSD.
Further specify the technical scheme of the embodiment of the invention below in conjunction with the drawings and specific embodiments.
The structural representation of a kind of memory device that Fig. 1 provides for the embodiment of the invention; As shown in Figure 1, the memory device of present embodiment comprises: data memory module 10, management data memory module 11, increment information memory module 12 and controller 13.
Data memory module 10 is the main storage organization of memory device, is used for the storage service data.Data memory module is specifically as follows the FLASH storer, adopts several FLASH chips to form.
Management data memory module 11 is used to store the management data information of carrying out data processing in order to management data memory module 10.That is to say that it is management data information that management data memory module 11 is stored some some critical data information of managing above-mentioned data memory module 10, so that data memory module 10 is carried out correct data processing.Owing in handling processing procedure, frequent visit management data information, preferably, management data memory module 11 adopts volatile storage medium, according to the memory mechanism storage administration data message of volatile storage medium; So that higher readwrite performance to be provided.The management data information of present embodiment includes: bad block message of the FLASH chip in the mapping relations between the PBA in host side LBA and the data memory module 10 in the FLASH chip, log information and the data memory module 10 or the like is used for some critical data information of management data memory module 10.
Increment information memory module 12 is used for storing the increment information of the management data information that data handling procedure produces, with when the abnormal power-down, be used for the described management data information that management data information that binding data memory module 10 backed up recovers storage in the management data memory module 11; Increment information memory module 12 preferably adopts non-volatile memory medium.
Controller 13 is used for carrying out data processing according to described management data information, and upgrades the increment information of described management data information and described management data information according to data processed result.
Particularly, when controller 13 according to management data memory module 11 in the storage management data information, in data memory module 10, read and write data and operational processes such as deleted data in, corresponding some critical datas that are used for management data memory module 10 are that management data information etc. all corresponding variation can take place.Variation has just taken place such as the mapping relations between the PBA in the FLASH chip in the host side LBA of correspondence and the data memory module 10.Carry out the old PBA that this secondary data handles the LBA correspondence and be revised as corresponding new PBA, be about to " LBA → PBA (old) " and be revised as " LBA → PBA (new) ".For this data processing, the increment information of the map information between corresponding LBA and the PBA is the corresponding new PBA of LBA, can be designated as " LBA → PBA (new) ".This time in the data handling procedure, can also there be the variation of log information, and the bad block message of the FLASH chip in the data memory module 10 or the like.So this data processing, the also increment information of possibility occurrence log information and the increment information of bad block message.
The increment information that promptly increases can be in increment information memory module 12, upgraded according to data processed result then and the increment information of " LBA → PBA (new) ", the increment information of log information and the increment information of bad block message or the like management data information can be.Simultaneously also according to the management data information in the data processed result renewal management data memory module 11.In order to reduce the powered-off fault that in upgrading data procedures, takes place, the probability that causes loss of data, preferably, at first upgrade the increment information of the management data information in the increment information memory module 12 according to data processed result, and then upgrade the management data information in the management data memory module 11.Adopt this preferred version, even can guarantee that the management data information in upgrading management data memory module 11 is powered-off fault to occur, still can recover management data information in the management data memory module 11 according to the management data information that has backed up in the increment information of the management data information in the increment information memory module 12 and the data memory module 10.
Need to prove, when the normal power down of memory device quits work, because the management data memory module 11 of storage administration data message is preferably volatile storage medium, therefore, before the power down storage administration data message is wherein all backed up in data memory module 10, when memory device normally worked on power, the management data information reproduction portion with the backup in the data memory module 10 exported to management data memory module 11 again, carries out data processing effectively for memory device.So backup always has a management data information in the data memory module 10.
When the memory device powered-off fault, because increment information memory module 12 preferably adopts non-volatile memory medium, even during powered-off fault, the increment information of the management data information of increment information memory module 12 storages can not lost yet.The management data information of storage in the management data memory module 11 when just can recover power down in conjunction with the management data information that has backed up in the increment information of the management data information of increment information memory module 12 storage and the data memory module 10 this moment.Thereby guarantee the normal operation of memory device.
The memory device of present embodiment can be solid-state hard disk SSD.
The memory device of present embodiment, by adopting the increment information of non-volatile memory medium storage administration data message, adopt the management data memory module 11 storage administration data messages of volatile storage medium, guaranteed the abnormal power-down fault to occur, still can go out the management data information of storage in the management data memory module 11 according to the management data signal reconstruct of backup in the increment information of the management data information of storing in the non-volatile memory medium and the data memory module 10 at memory device; The technical scheme of present embodiment guarantees that storage device access speed simultaneously, has also improved the reliability of memory device.
Need to prove that the increment information memory module 12 in the present embodiment specifically can adopt magnetoresistive RAM (Magnetic Random Access Memory; Hereinafter to be referred as MRAM), ferroelectric memory (Ferroelectric Random Access Memory; Hereinafter to be referred as FRAM) or non-volatile static RAM (Nonvolatile Static Random Access Memory; Hereinafter to be referred as NVSRAM) etc. and so on the high speed nonvolatile storage medium, and this type of non-volatile memory medium has characteristics such as read or write speed piece, low in energy consumption, repetitive read-write number of times height, most importantly the data that are stored in wherein when outage can not lost.
The volatile storage medium that the management data memory module of present embodiment adopts is preferably SDRAM, DDRII or DDRIII.
On the basis of the foregoing description, controller 13 also is used for according to presetting strategy, the increment information of described management data information is dumped on the data memory module 10, and upgrade in the data memory module management data information that has backed up in 10 according to the increment information of described management data information.Here the strategy that presets, it specifically can be any preset condition, when satisfying this condition, the increment information of described management data information of storage in the increment information memory module 12 is dumped to data memory module 10, to be used for upgrading the management data information that data memory module has backed up.Can work as the shared storage space of increment information in the increment information memory module 12 when reaching predetermined value (storage medium that increment information memory module 12 adopts is about to be filled with) such as presetting strategy; Because the increment information of management data is according to the storage of bar number, also the quantity of the increment information of the management data that can store in increment information memory module 12 reaches certain value and presets strategy as conducts such as 1,2 or 3.The described strategy that presets can also be that powered-off fault or the like situation takes place.Corresponding controller presets strategy according to these, the increment information of the management data information in the increment information memory module 12 is dumped in the data memory module 10, to be used for upgrading the management data information that data memory module 10 has been stored according to the increment information of these management data information.Adopt such scheme in time management data information in time to be backed up, taken precautions against losing of management data information, improved the reliability of memory device disk effectively.
Need to prove that the increment information of management data information is stored one by one according to data processed result.All there is the sequencing relation in the data processing of each corresponding increment information, so preferably according to the sequencing of data processing, store the increment information of corresponding management data information.When the increment information with the management data information in the increment information memory module 12 dumps in the data memory module 10, when upgrading the management data information in the data memory module 10, particularly, also must be according to the sequencing of the data processing of the increment information correspondence of each bar management data information, utilize the increment information of each management data information to upgrade management data information in the data memory module 10 respectively successively.PBA and the increment information between the LBA such as storage in the increment information memory module 12 can adopt as the storage of the form of following table 1.
Table 1
The increment information of management data is stored from bottom to top according to the sequencing of the data processing of correspondence in the table 1, can think that also the sequencing of storage time is from bottom to top.The increment information unloading of corresponding management data information with table 1 is to data memory module 10 time, when utilizing the management data information in these management data information updating data memory modules 10, sequencing according to the data processing of each increment information correspondence upgrades the management data information in the data memory module 10 respectively successively.Such as in the last table 1 according to from bottom to top order, utilize increment information 1, increment information 2, increment information 3 and increment information 4 to upgrade management data information in the data memory module 10 successively respectively respectively.
For bad block message of FLASH chip in log information that comprises in the management data information and/or the data memory module 10, with more new situation is identical, do not repeat them here with above-mentioned storage.
Further, on the basis of the technical scheme of the foregoing description, because jumbo high speed nonvolatile storage medium costs an arm and a leg, the increment information memory module 12 of present embodiment can adopt the non-volatile memory medium of low capacity, but adopt the non-volatile memory medium of low capacity, cause increment information memory module 12 to be filled with like this.
In order further to guarantee the reliability of memory device, preferably.The quantity of increment information of described management data information that controller 13 also is used for increment information memory module 12 storage is during greater than predetermined threshold value, the increment information of described management data information is dumped on the data memory module 10, and utilize the increment information of these management data information to upgrade the management data information that has backed up on the data memory module 10.The increment information of the described management data information of increment information memory module 12 storages is stored according to each bar increment information, before the storage, can be specifically according to the amount of capacity of increment information memory module 12, preestablish the threshold value of quantity of the increment information of a described data management information, when the quantity of the increment information of described management data information arrives this threshold value, the space of increment information memory module 12 is about to use up, this moment, controller 13 dumped to the increment information of this part described management data information on the data memory module 10, the storage of the increment information of the management data information of increment information memory module 12 storages because handling, all data manipulations has certain time sequence, so also must be stored in strict accordance with the sequential relationship of the priority of the data processing of correspondence.With the increment information of the described management data information in the increment information memory module 12 when data memory module 10 unloadings, also can be preferentially according to the priority sequential relationship, the unloading of the increment information of the described the preceding management data information of sequential elder generation, sequential after back unloading; Perhaps also unloading together, but when upgrading must be upgraded the management data information in the data memory module 10 successively according to the sequencing of the data processing of correspondence.Specifically can adopt increment information memory module 12 is divided into a plurality of unit, increment information of each unit storage, all increment informations are handled the priority sequential of operating execution according to corresponding data respectively and are left in successively in each unit.According to the sequential sequencing between each unit, utilize each corresponding increment information to upgrade management data information in the data memory module 10 successively.When comprising mapping table between LBA and the PBA for management data information, the storage of corresponding management data memory module and utilize the increment information of management data information to upgrade the process of the management data information in the data memory module 10, can not repeat them here with reference to the associated description of above-mentioned table 1.For bad block message of FLASH chip in log information that comprises in the management data information and/or the data memory module 10, situation is similar.
Need to prove, when first to the increment information of data memory module 10 unloading management data information, the management data information that is used for upgrading in the data memory module 10 is the backup management data message that exports to the management data information of management data memory module 11 after this memory device works on power; When upgrading the increment information of management data information later at every turn, the management data information that is used to upgrade in the data memory module 10 all be last increment information unloading with described management data information to data memory module 10, upgrade the management data information that obtains after the management data information in the data memory module 10.
The workflow of the memory device of present embodiment is as follows: when working on power, the management data information of storage exported in the management data memory module 11 when controller 13 quit work the last time of storing in the data memory module 10, to guarantee the operate as normal of memory device, carry out data processing according to the technical scheme of above-mentioned present embodiment then.When memory device was about to quit work, the management data information updating that controller 13 control will storage in the management data memory module 11 was to data memory module 10, and with the position of recording increment information in the tense marker increment information memory module 12.After powering on next time, opening entry increment information after the position of outage last time mark increment information memory module 12, because during normal power down, with the management data information updating in the management data memory module 11 to data memory module 10, also can be directly with the deletion of the increment information before this mark position in the increment information memory module 12.When the memory device abnormal power-down, management data information dropout in the management data memory module 11, increment information memory module 12 adopts the high speed nonvolatile storage medium, the storage of the increment information of the management information of the data processing operation of correspondence when only needing very little electric weight can finish outage.Like this can be according to the management data information that has backed up in the increment information of management data information described in the increment information memory module 12 and the data memory module 10, realization guarantees the operate as normal of memory device to the reconstruct of the management data information of losing in the management data memory module 11.
Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
The process flow diagram of a kind of date storage method that Fig. 2 provides for the embodiment of the invention, as shown in Figure 2, the date storage method of present embodiment comprises:
Step 100, will carry out the management data information stores of data processing to the management data memory module in order to the management data memory module;
Step 101, the increment information of the management data information that produces in the data handling procedure is stored in the increment information memory module, to be used for recovering the described management data information of storing in the described management data memory module in conjunction with the management data information that has backed up in the described data memory module when the abnormal power-down; Described increment information memory module adopts non-volatile memory medium;
Step 102, carry out data processing according to described management data information, and according to the increment information of described management data information of the corresponding renewal of data processed result and described management data information.
Particularly, the management data memory module of present embodiment adopts volatile storage medium.It is fast that volatile storage medium has access speed, and easily mistake type of jumbo high speed storage medium cost is lower.This enforcement will be used for the management data information stores of management data memory module to the management data memory module.But because the data of volatile storage medium when abnormal power-down occurring can be lost, present embodiment adopts the increment information of the management data information that will produce in the data handling procedure to be stored in the increment information memory module, and the increment information memory module adopts the memory mechanism of non-volatile memory medium to store the increment information of above-mentioned described management data information.Controller specifically carries out data processing operation to the data of storing in the data memory module to the data in the data memory module according to the described management data information of storing in the management data memory module, and according to the corresponding data result, the increment information of the described management data information of storing in the corresponding renewal increment information memory module, and according to the described management data information of storing in the corresponding data result renewal management data memory module.Access speed effectively can be guaranteed like this, the reliability of memory device can be improved again.
Need to prove that preferably, controller upgrades the increment information of the management data information of the storage in the increment information memory module earlier according to data processing operation; And then according to data processing operation, the increment information of the management data information in the new administration information memory module more again.Adopt this preferred version, even can guarantee that the management data information of upgrading in the management data memory module at controller is powered-off fault to occur, still can recover management data information in the management data memory module according to the management data information that has backed up in the increment information of the management data information in the increment information memory module and the data memory module.
Need to prove, on the basis of the foregoing description, can further include a kind of preferably technical scheme: according to presetting strategy, the increment information of described management data information is dumped on the described data memory module, and upgrade the management data information that has backed up described in the described data memory module according to the increment information of described management data information.
Particularly, according to presetting strategy, controller dumps to the increment information of the management data information of storing in the increment information memory module on the data memory module, and upgrades the management data information that has backed up in the data memory module according to the increment information of these management data information.Here the strategy that presets, it specifically can be any preset condition, when satisfying this condition, the increment information of these management data information of storing in the increment information memory module is dumped to data memory module, to be used for upgrading the management data information that data memory module has backed up.Such as the described strategy that presets can be that powered-off fault or the like situation takes place.Corresponding controller presets strategy according to these, the increment information of the management data information in the increment information memory module is dumped in the data memory module, to be used for upgrading the management data information that data memory module has been stored according to the increment information of these management data information.
For example, because the increment information memory module capacity of existing employing non-volatile memory medium is all smaller, in order to guarantee reliability of data storage, a kind of preferably scheme specifically can also comprise:
In the increment information quantity of the described management data information of described increment information memory module storage during greater than predetermined threshold value, the increment information of described management data information is dumped on the described data memory module, and upgrade the management data information that has backed up on the described data memory module according to the increment information of described management data information.
Particularly, can in the increment information memory module, preset the increment information quantity threshold value of a described management data information, the quantity threshold value of an open ended increment information is set according to the particular capacity size of increment information memory module.Preferably, this threshold value is located at the increment information memory module when being about to be filled with, this moment, controller dumped to the increment information of all the management data information in these increment information memory module in the data memory module this moment, and according to all increment informations of the described management data information of unloading the management data information that has backed up in the data memory module was upgraded modification.The increment information of described management data information is stored according to the sequencing of corresponding data processing.When utilizing the increment information of the management data information after the unloading to upgrade the management data information that has backed up in the data memory module,, upgrade the increment information of the management data information that has backed up in the data memory module respectively successively also according to the priority sequential of correspondence.
Because the increment information of management data is according to the storage of bar number, also the quantity of the increment information of the management data that can store in the increment information memory module reaches certain value as presetting strategy.When the quantity of the increment information of the management data of storing in the increment information memory module reaches certain value then, the increment information of management data information is dumped on the data memory module, and it is identical with the description of above-mentioned embodiment according to the process of the management data information that has backed up described in the increment information renewal data memory module of management data information, can not repeat them here with reference to the description of the foregoing description in detail.
The increment information memory module that need to prove present embodiment can adopt high speed non-volatile memory mediums such as magnetoresistive RAM, ferroelectric memory or non-volatile static RAM.
The management data memory module that need to prove present embodiment can adopt high speed volatile storage medium such as SDRAM, DDRII or DDRIII.
Date storage method in the present embodiment is identical with the realization mechanism of finishing data storage of above-mentioned memory device embodiment illustrated in fig. 1, with reference to the content of above-mentioned related embodiment record, does not repeat them here in detail.
The date storage method of present embodiment by adopting the increment information of non-volatile media storage administration data message, adopts management data memory module storage administration data message; Can either guarantee the access speed of memory device, can take precautions against losing of management data information again, improve the reliability of memory device effectively.
In view of the importance of the mapping table of mapping relations between LBA and the PBA, prior art adopts the mapping table that regularly will be stored in the volatile storage medium to back up in the FLASH storer that is made of a plurality of FLASH chips and protects mapping table.Though the mode of timed backup can be protected mapping table to a certain extent; but the mapping relations of storing on the FLASH chip are the mapping relations of backup time after all; because mapping relations constantly change in the use of FLASH chip; during abnormal power-down; backup is not quite identical probably with current up-to-date mapping relations, and therefore utilizing the mapping table that backs up very likely to recover out is not up-to-date mapping relations.
Be that the mapping table of the PBA mapping relations of the LBA of host side and FLASH chip is an example with management data information below, describe the technical scheme of the embodiment of the invention in detail.
Particularly, mapping table in the technical scheme of the embodiment of the invention between LBA and the PBA is to be stored in the management data memory module, and the list item increment (i.e. corresponding modification increment of data processing operation) of the mapping table between LBA and the PBA is stored in the increment information memory module, controller is read the data in the FLASH chip in the data memory module according to the LBA and the mapping table between the PBA that are stored in the management data memory module, write, or operation such as move, whenever after executing the operational processes of a secondary data, the LBA of current operation need be revised the pairing new PBA in back with corresponding operation this time and be stored in the increment information memory module as a list item increment information, promptly the result who handles according to this data manipulation upgrades the increment information memory module.
Simultaneously, find the corresponding old PBA of LBA of current data operational processes in the mapping table between the LBA that in the management data memory module, stores and the PBA, then will this old PBA be revised as with should current data manipulation processing after the corresponding new PBA of LBA; Promptly the mapping table that is stored in the management data memory module is upgraded.
Need to prove that abnormal power-down in the renewal process preferably, after each data manipulation is handled, is upgraded the list item increment information in the increment information memory module earlier, upgrades the mapping table in the management data memory module again.Even abnormal power-down in renewal process like this, because the increment information memory module adopts the less non-volatile memory medium of memory capacity, the very little electric weight that needs its electric capacity to provide when powered-off fault can be stored the list item increment information.Can realize the management information data of losing when the powered-off fault in the management data memory module is reconstructed according to the management data information that has backed up in the list item increment information binding data memory module of storing in the increment information memory module then, to guarantee the operate as normal of memory device, improved the reliability of memory device.
Because all corresponding list item increment information is handled in each data manipulation, all list item increment informations are left in the increment information memory module according to the sequential sequencing, specifically the increment information memory module can be divided into a plurality of storage unit, each list item increment information takies a storage unit; All list item increment informations are left in each storage unit successively according to the sequential sequencing.
When the quantity of the corresponding list item increment information in the increment information memory module during greater than predetermined threshold value, be that storage unit in the increment information memory module is about to be filled with, be transferred to all list item increment informations in the increment information memory module in the FLASH chip this moment, utilizes all list item increment informations to upgrade LBA that described FLASH chip backup updating backed up and the mapping table between the PBA.Here need to prove, after the list item increment information in the increment information memory module is transferred to data memory module, according to the priority sequential of the data processing operation of each list item increment information correspondence, utilize each list item increment information that the mapping table in the data memory module is upgraded respectively successively.In the renewal process, the list item increment information of corresponding each data processing operation correspondence is revised as the old PBA of LBA correspondence the new PBA of this LBA correspondence after this operational processes.
Need to prove, the increment information of dump table entry first after memory device powers on, mapping table in the data memory module is consistent with the memory device management data information that exported in the management data memory module by the management data memory module of back that this time works on power, when that is to say subnormal quitting work, by the mapping table that dumps in the management data memory module in the data memory module.Later on each mapping table that upgrades in the management data memory module once utilizes unloading to each list item increment information of management data memory module ground before all being, upgrade the mapping table in the management data memory module respectively successively after resulting mapping table be the basis.
For the management data information as the bad block message of FLASH chip in log information, the data memory module etc. and so on, the realization mechanism of storage is identical, repeats no more.
Present embodiment stores in the non-volatile memory medium according to the priority sequential by adopting the list item increment information with mapping table, and when the quantity of list item increment information reaches predetermined threshold value, all list item increment informations are dumped in the data memory module with in the data memory module, according to the priority sequential (the priority sequential of the data processing operation of each list item increment information correspondence just) of each list item increment information storage the mapping table that has backed up in the data memory module is upgraded then.Even when the memory device abnormal power-down, mapping table information in the time of still can reconstructing outage according to the mapping table of list item increment unit in the non-volatile memory medium and the backup in the data memory module in the volatile storage medium, can guarantee the operate as normal of memory device, improve the reliability of memory device.
Through the above description of the embodiments, those skilled in the art can know and recognizes that middlely each embodiment can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware.Based on such understanding, the part that technique scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the computer-readable recording medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, perhaps network equipment etc.) carry out the described method of some part of each embodiment or embodiment.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.