CN106569742B - Memory management method and storage equipment - Google Patents
Memory management method and storage equipment Download PDFInfo
- Publication number
- CN106569742B CN106569742B CN201610913693.2A CN201610913693A CN106569742B CN 106569742 B CN106569742 B CN 106569742B CN 201610913693 A CN201610913693 A CN 201610913693A CN 106569742 B CN106569742 B CN 106569742B
- Authority
- CN
- China
- Prior art keywords
- life cycle
- target data
- cycle issue
- data
- data area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
- G06F3/0649—Lifecycle management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0688—Non-volatile semiconductor memory arrays
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
This application involves computer fields, more particularly to storage management technique.In a kind of memory management method, comprising: receive and read data command (logical address including target data);It is searched in index data according to logical address, to obtain the initial Life Cycle issue of the corresponding target data area of logical address and target data area;Obtain the Life Cycle issue of target data area;When determining that Life Cycle issue and initial Life Cycle issue are inconsistent, reading data command is not executed.In the present invention, in reading process, if reading data command will not be executed when the initial Life Cycle issue of the target data area of index data record and current Life Cycle issue difference.That is, can go identification index data whether invalid by Life Cycle issue in reading process of the present invention, if in vain, not executing reading data command, to can avoid reading the data of mistake.
Description
Technical field
This application involves computer fields, more particularly to storage management technique.
Background technique
Currently, the storage medium of the controller of many computers (such as desktop computer), disk array may include SSD (Solid
State Disk, solid state hard disk).Relative to traditional mechanical hard disk, SSD have excellent readwrite performance, but its capacity it is smaller (because
It is more expensive for price).So being widely used for SSD is used as a read buffer, by access in mechanical hard disk than more frequently hot spot data
It is placed in SSD.
Above-mentioned hot spot data is identified using LBA (Logical Block Address, logical block addresses), is referred to
The memory space of SSD can be divided into several segment (its size is about tens MB) by Fig. 1, storage system, and according to SSD
Storage address sequence from low to high numbered, every segment includes several block again.
After by the memory space (amount of physical memory) of hot spot data write-in SSD, physical storage address need to be established and patrolled
Collect the relationship between storage address.That is, needing to establish positive index in system memory, found accordingly in order to from LBA
Segment and block.For example, it is assumed that the block x on the corresponding hot spot data write-in segment r of LBA a is then built
It attentions to index a--- > (r, x).It (is found accordingly from segment and block in addition it is also necessary to establish a reverse indexing
LBA).Still by taking the block x on the corresponding hot spot data write-in segment r of LBA a as an example, the reverse indexing that need to be established is
(r,x)--->a。
After segment all on SSD are finished, need to discharge some segment.Corresponding to the segment being released
Positive index be invalid.Therefore, in reading the data, invalid positive index may be searched, and then is read
To the data of mistake.
Summary of the invention
To solve the above-mentioned problems, the application provides memory management method and storage equipment, to solve to read data procedures
In, the problem of invalid positive index may be searched, and then read the data of mistake.
To achieve the above object, the embodiment of the present invention provides the following technical solutions:
On the one hand, embodiments herein provides a kind of memory management method, and this method is applied in storage equipment, described
Storing equipment includes processor and solid state hard disk (SSD), and the solid state hard disk includes multiple data areas, each data area packet
One or more blocks (block) is included, in this method executed by the processor, is object (such as storage dish, data area)
Initial Life Cycle issue is assigned, when the lifetime terminates or a new lifetime starts, assigns the object new life cycle
Number.Before using the object, whether the Life Cycle issue and current Life Cycle issue for needing comparison initial are consistent.If different
It causes, illustrates object invalidation, it is not continued to use, can avoid the data for reading mistake in this way.
In a possible design, above-mentioned object is specially data area, such as segment.Then above-mentioned processor institute
The step of execution includes: the reading data command for receiving the logical address including target data;According to the logical address in index number
According to middle lookup, to obtain the initial Life Cycle issue of the corresponding target data area of the logical address and its, (index data includes should
Corresponding relationship between logical address and the initial Life Cycle issue of target data area);Obtain the target data area
Life Cycle issue, and when determining that the Life Cycle issue and the initial Life Cycle issue are inconsistent, above-mentioned reading is not executed
According to instruction.In addition, then reading above-mentioned target data area when determining that above-mentioned Life Cycle issue is identical as initial Life Cycle issue
The target data of middle storage.As it can be seen that in reading process, if the initial life cycle of the target data area of index data record
When number Life Cycle issue difference current with target data area, reading data command can not be executed.That is, being read in the present invention
Whether Cheng Zhong can go identification index data invalid by Life Cycle issue, if in vain, not executing reading data command, so as to
Avoid reading the data of mistake.
In a possible design, when determining that above-mentioned Life Cycle issue and initial Life Cycle issue are inconsistent, processing
Device can also delete the corresponding index data of above-mentioned logical address.It can avoid reading invalid index data in this way, improve and read effect
Rate.
In a possible design, before data command is read in above-mentioned reception, storage equipment can also carry out target data
Write-in.Its writing process can include: processor reception is write data command (including target data and its logical address), and determining should
The corresponding target data area of target data and its initial Life Cycle issue, and save above-mentioned logical address and initial life cycle
Corresponding relationship between number is to aforementioned index data.It in one example, can be target data area after target data is written
Distribute an initial Life Cycle issue.It is each data field when in another example, when leaving the factory, or for the first time initializing SSD
A primitive life week issue (generally 0) is distributed in domain.During use SSD, understand on the basis of primitive life week issue,
Carry out monotonic increase or monotone decreasing.After target data is written, the Life Cycle issue of target data area at that time can be used
As initial Life Cycle issue.Unlike existing storage management mode, existing storage management mode establishes positive index
And reverse indexing.And in the present embodiment, equipment is stored after target data is written, and is established first comprising target data area
The index data of beginning Life Cycle issue, the index data in the present embodiment are similar to existing positive index, but in contrast, again
Increase the corresponding relationship between logical address and initial Life Cycle issue.It is anti-before no longer safeguarding meanwhile in the present embodiment
To index, reduces memory consumption and reduce management complexity.
In a possible design, after writing process, before reading process, storage equipment is also possible to carry out data
The release in region.The release process can include: above-mentioned initial Life Cycle issue is repaired in the instruction for receiving release target data area
It is changed to above-mentioned Life Cycle issue.In one example, initial Life Cycle issue can be increased m, obtains new Life Cycle issue.m
It can be positive integer or negative integer.Compared with existing delivery mode, delivery mode provided by the embodiment of the present invention only needs to modify
Initial Life Cycle issue, avoids complicated operation, improves treatment effeciency.
In a possible design, storage equipment is also possible to carry out data deletion.Then in one example, process is deleted
Can include: it receives and deletes data command, it is described to delete the logical address that data command includes the target data;By the logic
The corresponding index data in address is set as invalid.In existing storage mode, when needing to delete the corresponding target data of LBA a
When, it is assumed that the corresponding positive index of LBA a is a--- > (r, x), and reverse indexing is (r, x) --- > a, then needs first from positive rope
Drawing a to find (r, x), then deactivate reverse indexing (r, x) --- > a finally deactivates positive index a--- > (r, x).Phase therewith
Than in the present embodiment, directly setting the corresponding index data of logical address in vain, so as to greatly reduce operation
Step.
On the other hand, the embodiment of the invention provides a kind of storage equipment, which, which has, realizes that the above method is real
The function of equipment behavior is stored in border.The function can also execute corresponding software by hardware realization by hardware
It realizes.The hardware or software include one or more modules corresponding with above-mentioned function.
In a possible design, the structure for storing equipment includes: processor and memory, and the processor passes through fortune
Software program, the data of calling storage in the memory of row storage in the memory, execute above-mentioned storage equipment
Performed method.
In another aspect, the embodiment of the invention provides a kind of computer storage medium, for being stored as above-mentioned storage equipment
Computer software instructions used, it includes for executing program designed by above-mentioned aspect.
In the present invention, in reading process, if the initial Life Cycle issue of the target data area of index data record
When current with target data area Life Cycle issue difference, reading data command can not be executed.That is, in reading process of the present invention
In, identification index data can be gone whether invalid by Life Cycle issue, if in vain, reading data command is not executed, so as to keep away
Exempt to read wrong data.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the application
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Schematic diagram is drawn in Fig. 1 counterclaim that is positive;
Fig. 2 a is a kind of application environment schematic diagram provided by the embodiments of the present application;
Fig. 2 b is a kind of exemplary block diagram of storage equipment provided by the embodiments of the present application;
Fig. 3 is the general computer architecture schematic diagram of the controller of storage equipment provided in an embodiment of the present invention;
Fig. 4,6-9 are memory management method exemplary process diagram provided by the embodiments of the present application;
Fig. 5 is index data schematic diagram provided by the embodiments of the present application;
Figure 10 is storage equipment another kind exemplary structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the present application memory management method to be protected and storage equipment.Above-mentioned storage equipment concretely disk array
Deng.
Refer to a kind of composition figure of the discribed storage equipment of Fig. 2 a comprising controller 201 and hard disk chassis 202.
Controller 201 can be a kind of calculating equipment, such as server, desktop computer.It is installed on controller 201
There are operating system and other applications.Controller 201 can receive the request of the input and output (I/O) from applied host machine,
The data carried in storage I/O request, and write data into hard disk chassis 202.Under an application scenarios, controller 201 can
To be connect by SAN network with applied host machine (not shown).The structural schematic diagram of controller 201 can be found in Fig. 3.
Hard disk chassis 202 then may include one or more hard disks, wherein refer to Fig. 2 b, at least one hard disk is solid-state
Hard disk 21 (Solid State Device, SSD).Certainly, SSD is also mountable in the slot of controller 201.
Fig. 3 is a kind of topology example figure of above controller 201, as shown in figure 3, controller 201 may include passing through bus
Connected processor 1, memory 2, communication interface 3 (can further comprise front end interface card and back end interface card), and input are set
Standby 4 and output equipment 5.
Wherein, front end interface card can be used for communicating with applied host machine, and the processor 1 of controller 201 can pass through preceding termination
The various operational orders of applied host machine are received in mouth clamping.
The processor 1 of controller 201 may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement the one of the embodiment of the present invention
A or multiple integrated circuits.In embodiments of the present invention, the processor 1 of controller 201 can be used for receiving from applied host machine
Write data requests or read data request, the request of processing write data or read data request, write data are requested
Or read data request is sent to solid state hard disk 21 and other operations.
Memory 2, for storing program, in addition, memory 2 in the present embodiment can with the function of integrated cache of memory, such as with
In caching from the received data of applied host machine or from solid state hard disk 21 read data.Illustratively, controller 201 receives application
When multiple write data requests that host is sent, temporarily the multiple write data requests can be stored in memory 2, when memory 2
Capacity when reaching water level line, send it to solid state hard disk 21 and carry out persistent storage.
Memory 2 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non-volatile
Memory), a for example, at least magnetic disk storage.It is understood that memory 2 can be random access memory (Random-
Access Memory, RAM), magnetic disk, hard disk, CD, solid state hard disk (Solid State Disk, SSD) or non-volatile
Various non-transitory (non-transitory) machine readable medias that can store program code such as memory.It needs to illustrate
, memory 2 and caching can also be provided separately in embodiment.
Back end interface card can be used for communicating with solid state hard disk 21, and the processor 1 of controller 201 can pass through back end interface card
Send the data to the storage of solid state hard disk 21.
Solid state hard disk 21 further may include SSD controller and storage medium.Wherein, SSD controller is for executing processing
The operation such as write data requests or read data request that device 1 is sent.
It should be noted that controller 201 belongs to system controller, different from the controller of SSD itself.
More specifically, include in SSD controller flash memory translation layer (Flash Translation Layer, FTL), in FTL
Preserve the corresponding relationship between the logical address and physical address of data.Therefore, FTL is used for write data requests or reading
It is converted into the physical address that data are stored in SSD according to the logical address carried in request, the physical address that data are stored in SSD can
It, can also be only right on the basis of the actual address by virtualization to be actual address that the data are stored in SSD
The visible address of SSD controller (system controller is invisible).
Storage medium in solid state hard disk is usually made of several flash memory flash chips.If each flash chip includes
Dry block (block).The normal capacity of block can be 2 Nth power (M) under normal conditions, wherein N is positive integer.
Under normal conditions, the block in SSD is sightless for system controller.The memory space of SSD is to system
What controller was presented is the continuous logical space of several segments, in the present embodiment, for convenience, by one section of continuous logic
Space is known as a section (segment), and the address of the corresponding logical space of each segment is known as logical address.In SSD
Portion, the corresponding one or more block of each segment.It should be noted that SSD controller does not perceive segment's
In the presence of.Segment is one section of logical space of system controller perception, corresponding one section of logical address (also referred to as logical address area
Between).For example, the corresponding logical address section a segment is 0MB-1023MB;Another segment is corresponding logically
Location section is 1024MB-2047MB;The corresponding logical address section another segment is 2048MB-3071MB, according to this class
It pushes away.
Below by terms of the general character being related to based on invention described above, to the embodiment of the present invention how storage management into
Row is further described.
Fig. 4 shows a kind of interactive example process of memory management method provided in an embodiment of the present invention, to solve
The problem of invalid positive index may certainly be searched in reading data procedures, and then read the data of mistake.
Method shown in Fig. 4 is applied in the application scenarios shown in Fig. 2 a, the controller in storage equipment as shown in Figure 3
201 processor 1 is interacted with other component.
The interaction flow includes:
In 401 parts: the processor 1 of controller 201 receives (from application system) reading data command.
Above-mentioned reading data command includes the logical address of target data.
More specifically, processor 1 can be clamped by the front end interface of communication interface 3 and receive above-mentioned reading data command.
In one example, which is LBA (Logical Block Address, logical block addresses).Such as nothing
Special declaration, it is subsequent herein to be described by taking LBA as an example.
In 402 parts: the processor 1 of controller 201 is according to above-mentioned logical address in (memory 2 is safeguarded) index data
It searches, to obtain the initial Life Cycle issue of the corresponding target data area of the logical address He the target data area.
Maintain the corresponding index data of each logical address LBA in the memory 2 of controller 201.Fig. 5 is referred to, it is any
Index data includes corresponding relationship between logical address and the initial Life Cycle issue of data area and logical address and object
Manage the corresponding relationship between address.
Index data is established after data are written into SSD.It is assumed that the corresponding data of LBA a are written with segment
In the block x of r, also, the initial Life Cycle issue of segment r be h, then the corresponding index data of LBA a can for a--- >
(r, x, h) or a--- > (h, r, x).
If that include in reading data command is LBA a, the corresponding segment r of LBA a is target data area, index
The h recorded in data a--- > (r, x, h) or a--- > (h, r, x) is then the initial Life Cycle issue of target data area.
It is subsequent herein that how introduction is established into index data.
In 403 parts: the processor 1 of controller 201 obtains the current Life Cycle issue in target data area;
In addition to index data, data area and current Life Cycle issue are also maintain in the memory 2 of controller 201
Corresponding relationship.
During initializing SSD for the first time, the memory space of SSD can be divided into several data area (its by storage equipment
Size is about tens MB), and data area is numbered according to the sequence of the storage address of SSD from low to high, and safeguards
The corresponding relationship of each data area and Life Cycle issue.Since data area is larger (relative to block), so maintenance data
The amount of ram very little that the corresponding relationship of region and Life Cycle issue consumes.
In one example, it is assumed that share 100 data areas, data area is corresponding with current Life Cycle issue to close
System can be as shown in table 1 below:
Data area mark | Life Cycle issue |
1 | 10 |
2 | 20 |
…… | |
100 | 3 |
Table 1
In one example, the processor 1 of controller 201 can search above-mentioned table 1, obtain the current life in target data area
Order all issues.
The Life Cycle issue of data area can change, such as after discharging certain data area, the life of the data area
Ordering all issues can change, subsequent herein that it will be introduced.
In 404 parts: inconsistent in the Life Cycle issue and initial Life Cycle issue for determining the target data area obtained
When, the processor 1 of controller 201 does not execute above-mentioned reading data command.
For example, if initial Life Cycle issue is h, and the current life cycle number of the target data area obtained is h+
M, then the two is inconsistent, then will not execute reading data command.
In addition, if the current Life Cycle issue in target data area and initial Life Cycle issue that obtain are inconsistent, it can
Confirm that the index data is invalid, then will be unable to read data from SSD.At this point, data can be read from other storage mediums.
How from other storage mediums reading data, existing way can refer to, therefore not to repeat here.
Certainly, it if the Life Cycle issue of the target data area obtained is consistent with initial Life Cycle issue, executes above-mentioned
Read data command.
As it can be seen that in the reading process of the present embodiment, if the initial Life Cycle of the target data area of index data record
When issue and the current Life Cycle issue difference in target data area, reading data command can not be executed.That is, being read in the present invention
In the process, identification index data can be gone whether invalid by Life Cycle issue, if in vain, not executing reading data command, thus
It can avoid reading the data of mistake.
In addition, in other embodiments of the present invention, still referring to Fig. 4, above-mentioned interactive process may also include that
In 405 parts: the processor 1 of controller 201 deletes the corresponding index number of logical address in above-mentioned reading data command
According to.
It can avoid subsequent processor 1 in this way and read invalid index data, improve reading efficiency.
Fig. 6 is another interactive example process of memory management method provided in an embodiment of the present invention.The present embodiment
Focus on introducing the writing process of above-mentioned target data.
Method shown in fig. 6 can be applicable in application scenarios shown in Fig. 2 a, mainly in storage equipment as shown in Figure 3
The processor 1 of controller 201 interacts completion with other component.
The interaction flow includes:
In 601 parts: the processor 1 of controller 201, which receives, writes data command (from application system).
It includes above-mentioned target data and logical address that this, which writes data command,.
More specifically, processor 1 can write data command by the way that the front end interface of communication interface 3 clamping receipts are above-mentioned.
In 602 parts: it is (usually several that solid state hard disk 21 sequentially distributes block from free data area for target data
KB to tens KB), will be in the block of target data write-in distribution.
More specifically, the processor 1 of controller 201 can send the data to solid state hard disk 21 by back end interface card and deposit
Storage.It is (usually several that SSD controller in solid state hard disk 21 then sequentially distributes block from free data area for target data
KB to tens KB), will be in the block of target data write-in distribution.
In 603 parts: the processor 1 of controller 201 determines the corresponding target data area of target data and the number of targets
According to the initial Life Cycle issue in region.
After target data is written, the Life Cycle issue of target data area at that time can be used as initial life cycle
Number.
For example, it is assumed that at the T0 moment, target data is written in the block x of segment r, then target data area
Domain is segment r, can by inquiring above-mentioned table 1, obtain segment r (T0 moment) at that time Life Cycle issue h as just
Beginning Life Cycle issue.
In another example, an initial life cycle can be distributed for target data area after target data is written
Number, and it is stored in above-mentioned table 1.
It is original for each data area distribution one when in another example, when leaving the factory, or for the first time initializing SSD
Life Cycle issue (generally 0).During using SSD, cumulative or regressive can be carried out on the basis of primitive life week issue
Cumulative or regressive result is stored in above-mentioned table 1 by (subsequent introduction herein).
In 604 parts: the processor 1 of controller 201 saves the initial life of above-mentioned logical address and target data area
Corresponding relationship between all issues is to above-mentioned index data.
In 604 parts, it is assumed that the corresponding target data of LBA a is written in the block x of segment r, and
Segment r current Life Cycle issue is h, then the index data being created that is a--- > (r, x, h) or a--- > (h, r, x).
Unlike existing storage management mode, existing storage management mode establishes positive index and reverse indexing.
And in the present embodiment, equipment is stored after target data is written, and establishes the initial life cycle comprising target data area
Number index data, the index data in the present embodiment is similar to existing positive index, but in contrast, increases logic again
Corresponding relationship between address and initial Life Cycle issue.Meanwhile in the present embodiment, it no longer safeguards reverse indexing, also reduces
Memory consumption simultaneously reduces management complexity.
It should be noted that being needed in certain existing storage management modes when needing to discharge the segment on SSD
It to use reverse indexing: it is assumed that needing to discharge segment r, need to be found according to reverse indexing at this time each on segment r
Segment is that the index of forward direction corresponding to r all deactivates (deletion) further according to the LBA searched by the corresponding LBA of block,
Finally again by segment r labeled as the free time.
But safeguard the reverse indexing of each block to LBA from segment, need to consume a large amount of memories, in addition, space
Management complexity is also higher.
The embodiment of the present invention shown in Fig. 7 provides the interactive example process for being related to discharging data area.
Method shown in Fig. 7 is applied in the application scenarios shown in Fig. 2 a, the controller in storage equipment as shown in Figure 3
201 processor 1 is interacted with other component.
The interaction flow includes:
In 700 parts: the processor 1 of controller 201 receives the instruction of release target data area;
The instruction of release target data area is storage equipment internal trigger.In practice, storage equipment can detect
Data area has been used up, and will select to discharge certain segment, subsequent to receive new data write-in.
In 701 parts: the processor 1 of controller 201 modifies initial Life Cycle issue.
In one example, initial Life Cycle issue can be increased m, obtains new Life Cycle issue.M can for positive integer or
Negative integer.More specifically, desirable+1 m.
Continue to use the example of above-mentioned table 1, it is assumed that release is data area 1, then by the initial Life Cycle issue of data area 1
10 plus m, then (10+m) is saved to table 1.
It is aforementioned to be referred to, when initializing SSD when leaving the factory or for the first time, a primitive life week is distributed for each data area
Issue (generally 0).During using SSD, it can carry out monotonic increase on the basis of primitive life week issue or dullness is passed
Subtract.Then in another example, can be on the basis of primitive life week issue, data area of every release, then monotonic increase m.
700 parts, which are implemented in, is saving pair between the logical address and the initial Life Cycle issue of target data area
Should be related to the index data (namely after 604 parts), receive read data command before (namely 601 parts it
Before).
Compared with existing delivery mode, delivery mode provided by the embodiment of the present invention only needs to modify initial life cycle
Number, complicated operation is avoided, treatment effeciency is improved.
In addition to read/write data, release data area, storage equipment is also possible to carry out delete target data, rewrites target
The operation such as data.
Index data based on the embodiment of the present invention, Fig. 8, which is shown, is related to the interactive example of delete target data
Property process.
Method shown in Fig. 8 is applied in the application scenarios shown in Fig. 2 a, the controller in storage equipment as shown in Figure 3
201 processor 1 is interacted with other component.
The interaction flow includes:
In 801 parts: the processor 1 of controller 201 receives (from application system) deletion data command.
The deletion data command includes the logical address of above-mentioned target data.
More specifically, processor 1 can be clamped by the front end interface of communication interface 3 and receive above-mentioned deletion data command.
In 802 parts: the processor 1 of controller 201 sets invalid for the corresponding index data of above-mentioned logical address.
In one example, the corresponding index data of above-mentioned logical address can be deleted.
It should be noted that in existing storage mode, when needing to delete the corresponding target data of LBAa, it is assumed that
The corresponding positive index of LBAa is a--- > (r, x), and reverse indexing is (r, x) --- > a, then need first to find from forward direction index (r,
X), then deactivating reverse indexing (r, x) --- > a finally deactivates positive index a--- > (r, x).
In contrast, in the present embodiment, directly set the corresponding index data of logical address in vain, thus
Operating procedure can be greatly reduced.
It is assumed that the data of LBA a need to be written SSD again because being updated, index number based on the embodiment of the present invention
According to Fig. 9 shows the interactive example process for being related to being repeatedly written target data.
Method shown in Fig. 9 is applied in the application scenarios shown in Fig. 2 a, the controller in storage equipment as shown in Figure 3
201 processor 1 is interacted with other component.
The interaction flow includes:
In 901 parts: the processor 1 of controller 201, which receives, writes data command (from application system).
It includes above-mentioned target data and logical address that this, which writes data command,.
901 parts are identical as 601 parts, and therefore not to repeat here.
In 902 parts: SSD controller is sequentially distributed from free data area for target data in solid state hard disk 21
(usually several KB to tens KB), will be in the block of target data write-in distribution by block.
It is assumed that the corresponding target data of LBA a is written to the block x on segment r before, it is being repeatedly written process
In, that for target data distribution is block y on segment s, then can be written to the corresponding target data of LBA a
Blocky on segment s.
It should be noted that promote SSD performance and service life, write-in is all that sequence carries out.Therefore, it if desired repeats to write
Enter target data, then needs to redistribute memory space.
In 903 parts: the processor 1 of memory controller 201 determines the corresponding fresh target data area of target data and this is new
The initial Life Cycle issue of target data area.
Continue to use precedent, it is assumed that the corresponding target data of LBA a is written to the block y on segment s, then
Segment s is fresh target data area, and look-up table 1 can obtain the corresponding Life Cycle issue of segment s as initial life
All issues, it may be assumed that the initial Life Cycle issue of segment s is i.
In 904 parts: the processor 1 of controller 201 saves the initial life of above-mentioned logical address Yu fresh target data area
Corresponding relationship between all issues is ordered to above-mentioned index data.
Precedent is still continued to use, then is updated to the corresponding index data of LBA a by a--- > (r, x, h) or a--- > (h, r, x)
A--- > (i, s, y) or a--- > (s, y, i).
It should be noted that, when needing to be repeatedly written, being distributed target data to be written in existing storage mode
Block in after, need first to find (r, x) from old positive index a, then deactivate reverse indexing (r, x) --- > a.Finally, more
New positive index is a--- > (s, y), and establishes new reverse indexing (s, y) --- > a.
In contrast, being repeatedly written the mode directly corresponding index data of more new logical addresses provided by the present embodiment i.e.
Can, so as to greatly reduce operating procedure.
To sum up, core concept of the present invention is: indicating for object (such as storage dish, data area) life-giving all issues
Its lifetime, in some cases, lifetime terminate or when a new lifetimes starts, and assign its new Life Cycle issue.
All objects using the object need to record the initial Life Cycle issue of the object, before using the object, need comparison initial
Life Cycle issue and current Life Cycle issue it is whether consistent.If inconsistent, illustrate object invalidation, cannot be used continuously.
In addition to the technical solution provided by above-mentioned all embodiments, thought of the invention applies also for such as storage dish
In storage management.If storage dish is released or damages, can add up m on the initial Life Cycle issue of storage dish, obtain new life
Order all issues.When accessing the storage dish, it may compare its initial Life Cycle issue and whether current life cycle number be consistent, it is such as different
It causes, illustrates that storage dish is invalid, it is inaccessible.
It is above-mentioned that mainly scheme provided in an embodiment of the present invention is described from the angle of interaction between each device.It can
With understanding, each device, such as storage equipment, storage device etc. are in order to realize the above functions, each it comprises executing
The corresponding hardware configuration of function and/or software module.Those skilled in the art should be readily appreciated that, public in conjunction with institute herein
Each exemplary unit and algorithm steps for the embodiment description opened, the present invention can be with hardware or the knot of hardware and computer software
Conjunction form is realized.Some functions is executed in a manner of hardware or computer software driving hardware actually, depends on technology
The specific application and design constraint of scheme.Professional technician can carry out each specific application to come using distinct methods
Realize described function, but such implementation should not be considered as beyond the scope of the present invention.
Figure 10 shows a kind of possible structural schematic diagram that equipment is stored involved in above-described embodiment, comprising:
Receiving module 101 reads data command (logical address including target data) for receiving;
Searching module 102, for being searched in index data according to above-mentioned logical address, to obtain above-mentioned logical address pair
The initial Life Cycle issue of the target data area and above-mentioned target data area answered.
Wherein, above-mentioned index data include above-mentioned logical address and above-mentioned target data area initial Life Cycle issue it
Between corresponding relationship;
Module 103 is obtained, for obtaining the Life Cycle issue of above-mentioned target data area;
Read module 104, for not holding when determining that above-mentioned Life Cycle issue and above-mentioned initial Life Cycle issue are inconsistent
The above-mentioned reading data command of row.
Correlative detail refers to record described previously herein, and therefore not to repeat here.
In other embodiments of the present invention, still referring to Figure 10, above-mentioned storage equipment may also include writing module 105, use
In:
Reception is write data command (can be received by receiving module 101), and above-mentioned data command of writing includes above-mentioned target data
And the logical address of above-mentioned target data;Wherein, above-mentioned data command of writing is to receive reading data in above-mentioned receiving module 101 to refer to
It is received before enabling;
Determine the initial Life Cycle issue of the corresponding target data area of above-mentioned target data and above-mentioned target data area
(can determine target data area and initial Life Cycle issue by obtaining module 103);
And save corresponding relationship between above-mentioned logical address and the initial Life Cycle issue of above-mentioned target data area
To above-mentioned index data.
In addition, writing module 105 can also carry out the operation above-mentioned for being repeatedly written target data.
In other embodiments of the present invention, still referring to Figure 10, above-mentioned storage equipment may also include release module 106, use
In after the instruction for receiving release target data area, above-mentioned initial Life Cycle issue is revised as above-mentioned Life Cycle issue.
Wherein, the instruction for discharging target data area is to save logical address and target data area in writing module 105
Initial Life Cycle issue between corresponding relationship to index data after, receiving module 101 receive read data command before connect
It receives.
In other embodiments of the present invention, still referring to Figure 10, above-mentioned storage equipment may also include removing module 107, use
It is in reception (from application system) deletion data command (logical address including target data), above-mentioned logical address is corresponding
Index data be set as invalid.
Wherein, receiving module 101 can be used for supporting that storage equipment is communicated with other devices, for example, for supporting to deposit
Storage equipment is communicated with shown in Fig. 4, Fig. 6, Fig. 7, Fig. 8, Fig. 9 with other devices, such as receives instruction.
402 part shown in Fig. 4 can be performed in searching module 102, and initial life cycle (is searched in 603 part shown in fig. 6
Number), 402 part shown in Fig. 7,603 parts, alternatively, 903 part shown in Fig. 9 (searching initial Life Cycle issue) can be performed.
Obtaining module 103 can be performed 403 parts shown in Fig. 4 or 7.
404 parts and 405 parts shown in Fig. 4 or 7 can be performed in read module 104.
Writing module 105 can directly execute the part 601-604 shown in Fig. 6 or 7, or can be held by interacting with other modules
The part 601-604 shown in row Fig. 6 or 7.In addition, writing module can execute shown in Fig. 9 directly or by interacting with other modules
The part 901-904.
Release module 106 can execute the part 700-701 shown in Fig. 7 directly or by interacting with other modules.
Removing module 107 can execute the part 801-802 shown in Fig. 7 directly or by interacting with other modules.
The step of method in conjunction with described in the disclosure of invention or algorithm can realize in a manner of hardware, can also
It is realized in a manner of being to execute software instruction by processor.Software instruction can be made of corresponding software module, software mould
Block can be stored on RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard disk,
In the storage medium of mobile hard disk, CD-ROM or any other form well known in the art.A kind of illustrative storage medium
It is coupled to processor, to enable a processor to from the read information, and information can be written to the storage medium.When
So, storage medium is also possible to the component part of processor.Pocessor and storage media can be located in ASIC.In addition, should
ASIC can be located in user equipment.Certainly, pocessor and storage media can also be used as discrete assembly and be present in user equipment
In.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Computer-readable medium includes computer storage media and communication media, and wherein communication media includes convenient for from a place to another
Any medium of one place transmission computer program.Storage medium can be general or specialized computer can access it is any
Usable medium.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all any modification, equivalent substitution, improvement and etc. on the basis of technical solution of the present invention, done should all
Including within protection scope of the present invention.
Claims (12)
1. a kind of memory management method, which is characterized in that the method is applied in storage equipment, and the storage equipment includes place
Device and solid state hard disk are managed, the solid state hard disk includes multiple data areas, and each data area includes one or more blocks
(block), the method is executed by the processor, comprising the following steps:
It receives and reads data command, it is described to read the logical address that data command includes target data;
It is searched in index data according to the logical address, to obtain the corresponding target data area of the logical address and institute
The initial Life Cycle issue of target data area is stated, the index data includes the logical address and the target data area
Initial Life Cycle issue between corresponding relationship;
Obtain the Life Cycle issue of the target data area;
When determining that the Life Cycle issue and the initial Life Cycle issue are inconsistent, the reading data command is not executed.
2. the method according to claim 1, wherein further include:
When determining that the Life Cycle issue and the initial Life Cycle issue are inconsistent, the corresponding rope of the logical address is deleted
Argument evidence.
3. method according to claim 1 or 2, which is characterized in that before data command is read in the reception further include:
Data command is write in reception, and write data instruction includes the logical address of the target data and the target data;
Determine the initial Life Cycle issue of the corresponding target data area of the target data and the target data area;
Corresponding relationship between the logical address and the initial Life Cycle issue of the target data area is saved to the rope
Argument evidence.
4. according to the method described in claim 3, it is characterized in that, the Life Cycle issue is working as the target data area
Preceding life cycle number;
Corresponding relationship between the preservation logical address and the initial Life Cycle issue of the target data area is extremely
After the index data, the reception is read before data command further include:
Receive the instruction for discharging the target data area;
Update the Life Cycle issue.
5. method as claimed in claim 4, which is characterized in that described to update the Life Cycle issue and include:
The Life Cycle issue is increased into m, obtains the new Life Cycle issue;The m is positive integer or negative integer.
6. the method as described in claim 1, which is characterized in that further include:
It receives and deletes data command, it is described to delete the logical address that data command includes the target data;
Set invalid for the corresponding index data of the logical address.
7. the method as described in claim 1, which is characterized in that further include:
When determining that the Life Cycle issue is identical as the initial Life Cycle issue, reads in the target data area and store
Target data.
8. a kind of storage equipment, which is characterized in that including solid state hard disk, the solid state hard disk includes multiple data areas, each
Data area includes one or more blocks (block);
The storage equipment further include:
Receiving module reads data command for receiving, described to read the logical address that data command includes target data;
Searching module, for being searched in index data according to the logical address, to obtain the corresponding mesh of the logical address
The initial Life Cycle issue of data area and the target data area is marked, the index data includes the logical address and institute
State the corresponding relationship between the initial Life Cycle issue of target data area;
Module is obtained, for obtaining the Life Cycle issue of the target data area;
Read module, for not executing described when determining that the Life Cycle issue and the initial Life Cycle issue are inconsistent
Read data command.
9. equipment as claimed in claim 8, which is characterized in that the read module is also used to: determining the life cycle
When number inconsistent with the initial Life Cycle issue, the corresponding index data of the logical address is deleted.
10. equipment as claimed in claim 8 or 9, which is characterized in that further include writing module, be used for:
Data command is write in reception, and write data instruction includes the logical address of the target data and the target data;
Determine the initial Life Cycle issue of the corresponding target data area of the target data and the target data area;And it protects
Corresponding relationship between the logical address and the initial Life Cycle issue of the target data area is deposited to the index data;
Wherein, write data instruction is received before the receiving module receives reading data command.
11. equipment as claimed in claim 10, which is characterized in that the Life Cycle issue is working as the target data area
Preceding life cycle number, the equipment further include:
Release module, for updating the Life Cycle issue after receiving the instruction for discharging the target data area;Wherein,
The instruction of the release target data area is to save the logical address and the target data in the write module
After corresponding relationship to the index data between the initial Life Cycle issue in region, the receiving module receives reading data and refers to
It is received before order.
12. equipment as claimed in claim 11, which is characterized in that in terms of updating the Life Cycle issue, the release
Module is used for:
The Life Cycle issue is increased into m, obtains the new Life Cycle issue;The m is positive integer or negative integer.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610913693.2A CN106569742B (en) | 2016-10-20 | 2016-10-20 | Memory management method and storage equipment |
PCT/CN2017/081335 WO2018072420A1 (en) | 2016-10-20 | 2017-04-21 | Storage management method and storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610913693.2A CN106569742B (en) | 2016-10-20 | 2016-10-20 | Memory management method and storage equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106569742A CN106569742A (en) | 2017-04-19 |
CN106569742B true CN106569742B (en) | 2019-07-23 |
Family
ID=58534053
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610913693.2A Active CN106569742B (en) | 2016-10-20 | 2016-10-20 | Memory management method and storage equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106569742B (en) |
WO (1) | WO2018072420A1 (en) |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106569742B (en) * | 2016-10-20 | 2019-07-23 | 华为技术有限公司 | Memory management method and storage equipment |
CN108196980B (en) * | 2017-12-28 | 2022-04-12 | 深圳市得一微电子有限责任公司 | Mistakenly deleted data recovery method, flash memory device and computer readable storage medium |
CN113874942B (en) * | 2019-05-26 | 2025-01-17 | 华为技术有限公司 | Data reading method, storage controller and electronic device |
CN110703992A (en) * | 2019-09-20 | 2020-01-17 | 上海新储集成电路有限公司 | Method and system for accelerating reading and writing speed of mechanical hard disk |
CN110928495B (en) * | 2019-11-12 | 2023-09-22 | 杭州宏杉科技股份有限公司 | Data processing method and device on multi-control storage system |
CN113127376B (en) * | 2019-12-30 | 2024-02-27 | 阿里巴巴集团控股有限公司 | Control method, device and equipment for solid state drive |
CN113495671B (en) | 2020-04-01 | 2023-10-17 | 长鑫存储技术有限公司 | Read-write method and memory device |
CN113495675B (en) | 2020-04-01 | 2023-08-11 | 长鑫存储技术有限公司 | Read-write method and memory device |
CN113495674B (en) | 2020-04-01 | 2023-10-10 | 长鑫存储技术有限公司 | Read-write method and memory device |
EP3985494B1 (en) | 2020-04-01 | 2024-01-17 | Changxin Memory Technologies, Inc. | Read-write method and memory device |
EP3964941B1 (en) | 2020-04-01 | 2024-02-28 | Changxin Memory Technologies, Inc. | Read-write method and memory device |
EP3936996A4 (en) | 2020-04-01 | 2022-07-06 | Changxin Memory Technologies, Inc. | READ-WRITE METHOD AND MEMORY DEVICE |
CN113495676B (en) * | 2020-04-01 | 2023-09-29 | 长鑫存储技术有限公司 | Read-write method and memory device |
CN113495672B (en) | 2020-04-01 | 2023-08-11 | 长鑫存储技术有限公司 | Reading and writing method and memory device |
EP3964940A4 (en) | 2020-04-01 | 2022-08-17 | Changxin Memory Technologies, Inc. | Read/write method and memory apparatus |
CN113688062B (en) * | 2020-05-18 | 2022-08-26 | 北京市商汤科技开发有限公司 | Method for storing data and related product |
CN112000591B (en) * | 2020-08-24 | 2023-12-05 | 深圳忆联信息系统有限公司 | SSD scanning method capable of designating logical block address, SSD scanning device, SSD scanning computer equipment and storage medium |
CN113312443A (en) * | 2021-05-06 | 2021-08-27 | 天津大学深圳研究院 | Novel memory-based in-memory retrieval and table lookup construction method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101930404A (en) * | 2010-08-27 | 2010-12-29 | 威盛电子股份有限公司 | Storage device and method of operation thereof |
CN102576333A (en) * | 2009-10-05 | 2012-07-11 | 马维尔国际贸易有限公司 | Data caching in non-volatile memory |
CN103514249A (en) * | 2013-06-20 | 2014-01-15 | 易乐天 | Method and system for automatic data reduction and storage device |
JP2014006807A (en) * | 2012-06-26 | 2014-01-16 | Fujitsu Ltd | Processor, cache memory control apparatus, and cache memory control method |
CN104094351A (en) * | 2012-01-31 | 2014-10-08 | 惠普发展公司,有限责任合伙企业 | Memory module buffer data storage |
CN105845161A (en) * | 2015-02-04 | 2016-08-10 | Hgst荷兰公司 | Method for reducing adjacent track interference effects in a data storage system |
CN106030501A (en) * | 2014-09-30 | 2016-10-12 | 株式会社日立制作所 | distributed storage system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8069299B2 (en) * | 2008-06-30 | 2011-11-29 | Intel Corporation | Banded indirection for nonvolatile memory devices |
CN106569742B (en) * | 2016-10-20 | 2019-07-23 | 华为技术有限公司 | Memory management method and storage equipment |
-
2016
- 2016-10-20 CN CN201610913693.2A patent/CN106569742B/en active Active
-
2017
- 2017-04-21 WO PCT/CN2017/081335 patent/WO2018072420A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102576333A (en) * | 2009-10-05 | 2012-07-11 | 马维尔国际贸易有限公司 | Data caching in non-volatile memory |
CN101930404A (en) * | 2010-08-27 | 2010-12-29 | 威盛电子股份有限公司 | Storage device and method of operation thereof |
CN104094351A (en) * | 2012-01-31 | 2014-10-08 | 惠普发展公司,有限责任合伙企业 | Memory module buffer data storage |
JP2014006807A (en) * | 2012-06-26 | 2014-01-16 | Fujitsu Ltd | Processor, cache memory control apparatus, and cache memory control method |
CN103514249A (en) * | 2013-06-20 | 2014-01-15 | 易乐天 | Method and system for automatic data reduction and storage device |
CN106030501A (en) * | 2014-09-30 | 2016-10-12 | 株式会社日立制作所 | distributed storage system |
CN105845161A (en) * | 2015-02-04 | 2016-08-10 | Hgst荷兰公司 | Method for reducing adjacent track interference effects in a data storage system |
Also Published As
Publication number | Publication date |
---|---|
CN106569742A (en) | 2017-04-19 |
WO2018072420A1 (en) | 2018-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106569742B (en) | Memory management method and storage equipment | |
US9798655B2 (en) | Managing a cache on storage devices supporting compression | |
KR102584018B1 (en) | Apparatus, system and method for caching compressed data background | |
US11593272B2 (en) | Method, apparatus and computer program product for managing data access | |
US20180165014A1 (en) | Array controller, solid state disk, and method for controlling solid state disk to write data | |
US9910798B2 (en) | Storage controller cache memory operations that forego region locking | |
US10761990B2 (en) | Methods and devices for managing cache | |
CN107632784A (en) | The caching method of a kind of storage medium and distributed memory system, device and equipment | |
CN102576333A (en) | Data caching in non-volatile memory | |
US8656119B2 (en) | Storage system, control program and storage system control method | |
JP2016181058A (en) | Semiconductor memory device | |
US20230384979A1 (en) | Data processing method, apparatus, and system | |
CN117370222A (en) | Storage mapping method, storage mapping device, computer readable storage medium and electronic equipment | |
US9778858B1 (en) | Apparatus and method for scatter gather list handling for an out of order system | |
KR101876574B1 (en) | Data i/o controller and system having the same | |
CN107402802A (en) | A kind of video monitoring storage system based on virtual machine | |
US20200319819A1 (en) | Method and Apparatus for Improving Parity Redundant Array of Independent Drives Write Latency in NVMe Devices | |
CN110658999B (en) | Information updating method, device, equipment and computer readable storage medium | |
CN118819404A (en) | Data writing method, device, storage medium and electronic device | |
CN103064926B (en) | Data processing method and device | |
CN117130553A (en) | Configuration method of solid state disk, solid state disk and partition storage method | |
WO2021238594A1 (en) | Storage medium management method and apparatus, and device and computer-readable storage medium | |
CN103744718A (en) | Method and system for achieving virtual desktop | |
CN104298616B (en) | Data block initial method, cache memory and terminal | |
US9703497B2 (en) | Storage system and storage control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |