CN106569959A - Cache replacing method and system based on SSD - Google Patents
Cache replacing method and system based on SSD Download PDFInfo
- Publication number
- CN106569959A CN106569959A CN201610970121.8A CN201610970121A CN106569959A CN 106569959 A CN106569959 A CN 106569959A CN 201610970121 A CN201610970121 A CN 201610970121A CN 106569959 A CN106569959 A CN 106569959A
- Authority
- CN
- China
- Prior art keywords
- mapping
- access request
- replacement
- caching
- rpcmt
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention discloses a cache replacing method and a cache replacing system based on SSD. The method comprises the steps of judging whether an access request is a random access request according to space size information of an operation address of the access request, when the access request is received; and if yes, converting access frequency information and update situation information of mapping pairs in a cache table RPCMT, determining a replacing sequence of the mapping pairs to be replaced, and executing the access request according to the replacing sequence, wherein the RPCMT is the cache table of the mapping pairs of the cache random type access request arranged in the random access memory SRAM. Therefore, according to the method and the system provided by the embodiment of the invention, the access frequency information as well as the update situation of the mapping pairs are considered, when the mapping pairs are replaced, and thus write-back time overhead caused by a traditional LRU strategy can be effectively reduced and delayed.
Description
Technical field
The present invention relates to cache replacement technology field, more particularly, it relates to a kind of buffer replacing method based on SSD and
System.
Background technology
FTL is that, between file system and a storage medium intermediate layer therebetween, its major function is real in SSD
Then existing logical address calls internal memory UDI to carry out the access of data with the conversion of physical address, through this process
It is capable of achieving truly to the read-write operation of memorizer.Whenever cache table, oneself expires, when needing to write new mapping to information,
Old mapping must then be replaced to information to deposit new mapping to information.Optimum replacement policy is selected for typically depositing
Reservoir, mainly affects its hit rate;And for memorizer, the time overhead of internal system operation is also relate to, after first wiping
Write attribute, if selecting the information being replaced to be updated, needs for corresponding fresh information to write back conversion page, so
Update related data pages again afterwards.
Therefore, the overhead of the process of writing back how is reduced, is the problem that those skilled in the art need to solve.
The content of the invention
It is an object of the invention to provide a kind of buffer replacing method and system based on SSD, to realize that reduction write back
The overhead of journey.
For achieving the above object, following technical scheme is embodiments provided:
A kind of buffer replacing method based on SSD, including:
When receiving access request, the access request is judged according to the operation address space size information of the access request
Whether it is stochastic pattern access request;
If so, then according to map in random page address translation caching table RPCMT to access frequency information and update status
Information, determine it is to be replaced mapping to replacement order, according to the replacement order perform the access request;
Wherein, the RPCMT is the mapping of the caching stochastic pattern access request arranged in random access memory SRAM
To cache table.
Wherein, if judging the access request as continuouss according to the operation address space size information of the access request
Access request, then the buffer replacing method also include:
The whole conversion caching of page for containing the corresponding logical address of the access request is delayed to continuous page address conversion
Deposit table SPCMT;Wherein, the SPCMT is that the caching continuouss access request arranged in random access memory SRAM is reflected
Penetrate to cache table.
Wherein, the whole conversion caching of page by the corresponding logical address of the access request is contained is stated to continuous page address
After translation cache table SPCMT, also include:
When it is continuouss access request to detect next access request, the corresponding logic of next access request is judged
Address is with the presence or absence of in current continuous page address translation caching table SPCMT;
If existing, next access request is performed;If not existing, current continuous page address translation caching is judged
Whether the mapping in table SPCMT is to being updated;
If being updated, by the mapping of renewal to writing back, and it is corresponding logically to contain next access request
The whole conversion caching of page of location generates the continuous page address translation caching after updating to continuous page address translation caching table SPCMT
Table SPCMT;
If not being updated, directly the whole conversion page for containing the corresponding logical address of next access request is delayed
Continuous page address translation caching table SPCMT is stored to, the continuous page address translation caching table SPCMT after updating is generated.
Wherein, the whole conversion caching of page of the corresponding logical address of the access request that will contain is to continuous page ground
After the translation cache table SPCMT of location, also include:
When next access request is detected for stochastic pattern access request and when replacing out clean page from the RPCMT, sentence
Whether the mapping in disconnected SPCMT is to being updated;Wherein, the clean page is that the mapping not updated is right for update status information;
If so, then by the mapping being updated to writing back, using the SPCMT as clean page address translation cache table CPCMT,
And the clean page replaced out from the RPCMT by CPCMT cachings;Wherein, the CPCMT is in random access memory
The cache table of the clean page that the caching arranged in device SRAM is replaced out from RPCMT;
If it is not, as clean page address translation cache table CPCMT after then the SPCMT is emptied, and by the CPCMT
The clean page that caching is replaced out from the RPCMT.
Wherein, cached after the clean page replaced out from the RPCMT by the CPCMT, also included:
When it is continuouss access request to detect next access request, the CPCMT is emptied, and the CPCMT is made
For continuous page address translation caching table SPCMT, the whole conversion page of logical address corresponding with next access request is cached.
Wherein, then according to map in random page address translation caching table RPCMT to access frequency information and update status
Information, determine it is to be replaced mapping to replacement order, including:
Judge in the replacement section in the RPCMT with the presence or absence of update status information to be that the mapping not updated is right;Wherein,
RPCMT includes active section and replaces section, and the access frequency of the active section is higher than the access frequency for replacing section;
If exist, according to it is described replacement section in map to access frequency information and update status information, it is determined that waiting to replace
Change map to replacement order;Wherein, the mapping not updated to replacement order have precedence over the mapping being updated to replacement it is suitable
Sequence, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement order;
If not existing, according to it is described replacement section in map to access frequency information determine it is to be replaced mapping to replacement
Sequentially;Wherein, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement order.
Wherein, also include:
If detect the mapping that caches in the replacement section of the RPCMT to update status information be and be updated,
All in section mapping to writing back will then be replaced.
A kind of caching replacement system based on SSD, including:
Access request judge module is big according to the operation address space of the access request for receiving during access request
Little information judges whether the access request is stochastic pattern access request;If so, then trigger replacement and be sequentially generated module;
The replacement order determining module, for according to map in random page address translation caching table RPCMT to access
Frequency information and update status information, determine it is to be replaced mapping to replacement order, according to the replacement order perform the visit
Ask request;Wherein, the RPCMT is that the mapping for caching stochastic pattern access request arranged in random access memory SRAM is right
Cache table.
Wherein, the replacement order determining module includes:
Judging unit, for judging the RPCMT in replacement section in do not update with the presence or absence of update status information
Mapping is right;Wherein, RPCMT includes active section and replaces section, and the access frequency of the active section is higher than the visit for replacing section
Ask frequency;
If existing, order determination unit is replaced in triggering first;If not existing, trigger the second replacement order and determine list
Unit;
Described first replaces order determination unit, for according to map in the replacement section to access frequency information and more
New situation information, determine it is to be replaced mapping to replacement order;Wherein, the mapping not updated to replacement order have precedence over by more
New mapping to replacement order, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replace
Change order;
It is described second replace order determination unit, for according to it is described replacement section in map to access frequency information determine
It is to be replaced mapping to replacement order;Wherein, the low mapping of access frequency to replacement order have precedence over that access frequency is high to reflect
Penetrate to replacement order.
Wherein, also include:
Detection module, in the replacement section for detecting the RPCMT cache mapping to update status information
It is and is updated, then will replaces all in section mapping to writing back.
By above scheme, a kind of buffer replacing method and system based on SSD provided in an embodiment of the present invention, bag
Include:When receiving access request, whether the access request is judged according to the operation address space size information of the access request
For stochastic pattern access request;If so, then according to map in random page address translation caching table RPCMT to access frequency information and
Update status information, determine it is to be replaced mapping to replacement order, according to the replacement order perform the access request;Its
In, the RPCMT be in random access memory SRAM arrange caching stochastic pattern access request mapping to cache table;
It can be seen that, in the present embodiment, when mapping pair is replaced, account for not only according to access frequency information, also from reflecting
Penetrate to update status account for such that it is able to effectively reduce and postpone that traditional LRU policy causes writes back time overhead.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of buffer replacing method schematic flow sheet based on SSD disclosed in the embodiment of the present invention;
Fig. 2 is that clean page replaces schematic diagram disclosed in the embodiment of the present invention;
Fig. 3 is address of cache process schematic disclosed in the embodiment of the present invention;
Fig. 4 is another address of cache process schematic disclosed in the embodiment of the present invention;
Fig. 5 is a kind of caching replacement system structural representation based on SSD disclosed in the embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of buffer replacing method and system based on SSD, to realize that reduction writes back process
Overhead.
It should be noted that FTL also has the function of garbage reclamation and abrasion equilibrium.Wherein garbage collection strategy is to pass through
Erasing includes the block of invalid data to obtain more practical spaces;And abrasion equilibration is a kind of adjustable policy, will block
Erasable operation be balancedly distributed in the service life of the memorizer for improving NAND flash on all pieces with this.
In this programme, the garbage collection strategy of traditional FTL will further be optimized, flash storage space is divided
For data block area and conversion block area, and data block zoning is divided into into cold data block area and hot data block area, data block area is by data
Page composition, for depositing data;The dsc data of centrally updated write in hot data block area, makes active page in block as few as possible,
Operating time expense is replicated to reduce;Select minimum active page hot data block carry out it is erasable, and will wherein active page write it is cold
Data block area, to postpone to cause garbage reclamation next time, and then optimizes the system time expense of garbage reclamation.Conversion block area by turn
Skip composition, and for storing logical address to the mapping of physical address to information, a conversion page can deposit multipair mapping letter
Breath, maps to information logically sequence of addresses arrangement.
It should be noted that in the present embodiment with reference to the time local characteristicses of I/O in random access memory SRAM
And local space characteristics, devise four kinds of cache table structures:Random page address translation caching table RPCMT, continuous page address conversion
The conversion mapping table TPMT of cache table SPCMT, clean page address translation cache table CPCMT and caching page.Wherein SPCMT with
Same spatial cache during the tables of CPCMT two are shared, according to system access request type the cache table type in the space is adjusted.Cause
This, under any time, may cache the table of RPCMT, SPCMT and TPMT tri- in SRAM;Or may cache RPCMT, CPCMT
With the tables of TPMT tri-.RPCMT is used for caching the mapping of discrete read-write requests to information;SPCMT is used for caching continuous read-write
To information, SPCMT is sized so as to a complete conversion page in this strategy for the mapping of request;CPCMT is for caching you
The clean page not accessed for a long time for replacing out from RPCMT is mapped to information, serves primarily in cache replacement policy.
Referring to Fig. 1, a kind of buffer replacing method based on SSD provided in an embodiment of the present invention, including:
When S101, reception access request, the visit is judged according to the operation address space size information of the access request
Ask whether request is stochastic pattern access request;
Specifically, in the present embodiment, because I/O request accesses the certain sky for usually carrying out for a certain logical address
Between size operation.The original position in operation address space is the physical address corresponding to the logical address of I/O request, terminates
Address is i.e. on the basis of this physical address plus the space size of request operation.It is both right when operation address space is very big
One section of continuous logic address space is operated.Therefore, access request classified in the present embodiment, it is assumed that I/O request
Operation address space size has exceeded a certain threshold value, and the type of the request is continuouss access request;If being less than or equal to the threshold
Value size, is just processed it by the access request of stochastic pattern.Here threshold value can be set according to practical application scene.
S102, if so, then according to map in random page address translation caching table RPCMT to access frequency information and renewal
Situation information, determine it is to be replaced mapping to replacement order, according to the replacement order perform the access request;Wherein, institute
State RPCMT be in random access memory SRAM arrange caching stochastic pattern access request mapping to cache table.
Wherein, according to map in random page address translation caching table RPCMT to access frequency information and update status letter
Breath, determine it is to be replaced mapping to replacement order, including:
Judge in the replacement section in the RPCMT with the presence or absence of update status information to be that the mapping not updated is right;Wherein,
RPCMT includes active section and replaces section, and the access frequency of the active section is higher than the access frequency for replacing section;
If exist, according to it is described replacement section in map to access frequency information and update status information, it is determined that waiting to replace
Change map to replacement order;Wherein, the mapping not updated to replacement order have precedence over the mapping being updated to replacement it is suitable
Sequence, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement order;
If not existing, according to it is described replacement section in map to access frequency information determine it is to be replaced mapping to replacement
Sequentially;Wherein, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement order.
Specifically, in this programme, the clean page that improved FTL algorithms are adopted preferentially replaces algorithm, clean page here
It is that the mapping that is not updated is right for update status;This mode can effectively reduce and postpone that traditional LRU policy causes writes
Return time overhead.
Above-mentioned clean page is preferentially replaced algorithm and is specifically included:Referring to Fig. 2, RPCMT tables are divided into into two parts, the first half
It is divided into active section, section is preferentially replaced in the latter half for clean page, and presents becomes replacement section.Per section of data structure is with queue
Form is present, and active section is used for caching the newest and relatively new random address map information for accessing, and the mapping of current access request is right
Information must be the Section 1 of active section;The region that section is used exclusively for selecting to replace item is replaced, the tail of the queue storage of section is replaced
It is the mapping not accessed at most to information.According to the preferential Substitution Rules of clean page, access of the mapping in active section to information is general
Rate is relatively higher than the information for replacing section, and the clean page that selection is replaced every time enters replacement section, then start to replace containing dirty pages.
Assume that RPCMT stores 8 mappings to information, wherein each information flag update status of itself, C is clean
Page, is not updated;D is containing dirty pages, updated one or many, as shown in Fig. 2 according to traditional LRU replacement algorithm, replacing
Change order and should be LPN8-LPN7-LPN6-LPN5;The preferential replacement order for replacing clean page replacement algorithm of the present invention
It is then:LPN7-LPN5-LPN8-LPN6.
The time overhead for assuming each written-back operation is Twb, clean page because need not write back thus without time overhead, and continuously
The time overhead for writing back twice is similarly Twb, and then, the time overhead of 3 replacement operations of two kinds of algorithms is respectively:TLRU=
2Twb, T improve FTL=Twb, it is clear that TLRU>T improves FTL, it is seen that the replacement operation of same number, improved FTL algorithms can
Time overhead is reduced by postponing written-back operation.
Specifically, the limited replacement algorithm of clean page is adopted in this programme, traditional LRU policy can be effectively reduced and postpone
That what is caused writes back time overhead, by extending storage time of the containing dirty pages in cache table as far as possible, increases containing dirty pages and is accessed repeatedly
Probability, and then reduce repeatedly update the operation overhead for writing back.
Based on above-mentioned technical proposal, this programme also includes:
If detect the mapping that caches in the replacement section of the RPCMT to update status information be and be updated,
All in section mapping to writing back will then be replaced.
Specifically, whenever replacement operation is caused, then select one from replacement section and be replaced.Index is replaced in section most
Do not access long and UPT marker bits for " clean " mapping to information, if having, swapped out replacement section;If being without UPT marker bits
The mapping of clean is to information, then the mapping not accessed at most will be replaced out to information, at this point it is possible to conclude the letter being replaced
Breath must be that updated information, i.e. UPT are " dirty ", then cause the operation that a collective writes back.
If finding the address conversion of the same conversion page belonging to the every other logical address write back with this in RPCMT
Mapping carries out disposable collective and writes back to item of information, and this collective writes back strategy and can efficiently reduce to write back every time and only updates
One and cause write back time overhead.After collective's written-back operation to be done, replacing section has new clear position, then from work
The mapping that it is not accessed at most is selected to information, be deposited into replacing section in section.
The embodiment of the invention discloses a kind of specific buffer replacing method, relative to a upper embodiment, the present embodiment pair
Technical scheme has made further instruction and optimization.Specifically:If being believed according to the operation address space size of the access request
Breath judges that the access request is continuouss access request, then the buffer replacing method also includes:
The whole conversion caching of page for containing the corresponding logical address of the access request is delayed to continuous page address conversion
Deposit table SPCMT;Wherein, the SPCMT is that the caching continuouss access request arranged in random access memory SRAM is reflected
Penetrate to cache table.
Specifically, in this programme, time and local space characteristics that improved FTL algorithms are asked according to I O access, if
Random caching of page mapping table RPCMT and continuous caching of page mapping table SPCMT is counted, for the characteristic of data corresponding delaying has been carried out
Design is deposited, is that algorithm can play a role for different types of data, systematic function is more comprehensive.Continuous caching of page mapping
Table SPCMT is sized to a conversion page.When a request arrives, by its corresponding whole conversion for containing the logical address
Caching of page to continuous caching of page mapping table in.Thus, it is only necessary to once read translation page table, continuation address afterwards is accessed
Request just directly can find corresponding mapping to information in continuous caching of page mapping table, make once-through operation just can exchange follow-up visit for
The hit rate asked, greatly reduces and repeatedly search overhead of the mapping to information, improves system response time.
It is described to delay the whole conversion page for containing the corresponding logical address of the access request based on above-mentioned technical proposal
After being stored to continuous page address translation caching table SPCMT, also include:
When it is continuouss access request to detect next access request, the corresponding logic of next access request is judged
Address is with the presence or absence of in current continuous page address translation caching table SPCMT;
If existing, next access request is performed;If not existing, current continuous page address translation caching is judged
Whether the mapping in table SPCMT is to being updated;
If being updated, by the mapping of renewal to writing back, and it is corresponding logically to contain next access request
The whole conversion caching of page of location generates the continuous page address translation caching after updating to continuous page address translation caching table SPCMT
Table SPCMT;
If not being updated, directly the whole conversion page for containing the corresponding logical address of next access request is delayed
Continuous page address translation caching table SPCMT is stored to, the continuous page address translation caching table SPCMT after updating is generated.
Specifically, referring to Fig. 3, when continuous two continuouss access requests are reached, the situation of change of SPCMT in SRAM,
If front is once continuouss access request, that what is cached in internal memory is SPCMT, and it is next now to reach the I/O request of a new continuouss
1619 data page is accessed, and DLPN=1619 is not buffered in internal memory, so needing for SPCMT contents to write back replacement more
Newly.Concrete operations are:
Step 1,1619 are searched in RPCMT, if not finding, if execution step 2, judging in 1619 no longer SPCMT and being
Continuouss access request, the then conversion page being located is introduced in SPCMT;Step 3, known old SPCMT quilts during caching
It is updated, so the content in SPCMT needs to write back flash, the specially operating process of step 4~6, by access request
1619/512=3 understands that the corresponding logical transition page address of logical page address is 3, therefore the physics that response is indexed in TPDT turns
Address skip for 784, then passing through step 7,8 liang of step operations becomes the conversion caching of page that physical address is 784 in internal memory
New SPCMT, final step 9, the physical page address of 10 backward references request.
Likewise, above-mentioned technical proposal is based on, if turning the whole of the corresponding logical address of the access request is contained
Skip and be cached to after continuous page address translation caching table SPCMT, be stochastic pattern access request when next access request is detected
And when replacing out clean page from the RPCMT, judge the mapping in SPCMT to whether being updated;Wherein, the clean page is
Update status information is that the mapping not updated is right;
If so, then by the mapping being updated to writing back, using the SPCMT as clean page address translation cache table CPCMT,
And the clean page replaced out from the RPCMT by CPCMT cachings;Wherein, the CPCMT is in random access memory
The cache table of the clean page that the caching arranged in device SRAM is replaced out from RPCMT;
If it is not, as clean page address translation cache table CPCMT after then the SPCMT is emptied, and by the CPCMT
The clean page that caching is replaced out from the RPCMT.
Specifically, referring to Fig. 4, when access request becomes from continuouss access request turns to stochastic pattern access request, SPCMT
It is changed into the process of CPCMT.When new stochastic pattern Address requests arrival is detected and RPCMT replaces out new clean page, if
SPCMT is updated, then be changed into storing CPCMT of the clean page mapping to information after writing back, if SPCMT does not update, directly covers
For CPCMT tables.
Specifically, referring to Fig. 4, it is assumed that system has just been responded and completed one-time continuous type access request, a new stochastic pattern
Access request is reached, and uncached logical address transitional information in internal memory, therefore will cause the replacement operation of RPCMT, it is assumed that this
When RPCMT replacement section at least there is a clean page transitional information, then the SPCMT in internal memory will be replaced with CPCMT, use
To cache the clean page transitional information for replacing out from RPCMT.Detailed process is as follows:
Step 1 and 2, index RPCMT do not find mapping to information;Step 3, need to be from the replacement of RPCMT according to cache policy
Swap out one in section (grey parts) and map to information, there is at least one clean page in current RPCMT and map to information, and
It is first to have a rest to there is at least one clean page mapping to information in SPCMT that SPCMT contents have been updated in, and SPCMT contents are
It is updated, then first writes back SPCMT4~7, then item will be replaced in step 8 and be stored in CPCMT, while being looked into by step 9~12
Look for the conversion page that access request is located further to find physical data page address, update RPCMT.
Based on above-mentioned technical proposal, by after the clean page that CPCMT cachings are replaced out from the RPCMT, going back
Including:
When it is continuouss access request to detect next access request, the CPCMT is emptied, and the CPCMT is made
For continuous page address translation caching table SPCMT, the whole conversion page of logical address corresponding with next access request is cached.
Specifically, when it is stochastic pattern access request that upper one accesses, current access request is really detected for continuouss
During access request, directly CPCMT can be emptied, be covered as connected reference and ask corresponding whole conversion page, CPCMT is changed into
SPCMT。
In summary it can be seen, this programme this tactful main thought is by extending containing dirty pages depositing in cache table as far as possible
The storage time, increase the probability that containing dirty pages are accessed repeatedly, and then reduction repeatedly updates the operation overhead for writing back.Ideally exist
In replacing section, constantly there is clean page to enter, containing dirty pages are repeatedly accessed and update, and so relatively conventional algorithm, time overhead is basic
It is to replace in section to be containing dirty pages for the worst situation, although such time overhead can not be reduced, but performance and tradition
Lru algorithm is identical, does not cause the impact for reducing, therefore the performance of the preferential replacement policy of clean page of improved FTL algorithms employing is managed
Better than traditional algorithm by.On this basis, the clean page information being replaced is stored in cache table CPCMT (table with
SPCMT is same with a space), while system operatio expense is reduced, the clean page that the storage of effectively utilizes space is replaced is maximum
Degree ground retains its storage time in sram, compares traditional LRU and further increases hit rate.
Below to it is provided in an embodiment of the present invention caching replacement system be introduced, it is described below caching replacement system with
Above-described buffer replacing method can be with cross-referenced.
Referring to Fig. 5, a kind of caching replacement system based on SSD provided in an embodiment of the present invention, including:
Access request judge module 100, for receiving during access request, according to the operation address space of the access request
Size information judges whether the access request is stochastic pattern access request;If so, then trigger replacement and be sequentially generated module 200;
The replacement order determining module 200, for according to map in random page address translation caching table RPCMT to visit
Ask frequency information and update status information, determine it is to be replaced mapping to replacement order, according to the replacement order perform described in
Access request;Wherein, the RPCMT is the mapping of the caching stochastic pattern access request arranged in random access memory SRAM
To cache table.
Based on above-mentioned technical proposal, the replacement order determining module 200 includes:
Judging unit, for judging the RPCMT in replacement section in do not update with the presence or absence of update status information
Mapping is right;Wherein, RPCMT includes active section and replaces section, and the access frequency of the active section is higher than the visit for replacing section
Ask frequency;
If existing, order determination unit is replaced in triggering first;If not existing, trigger the second replacement order and determine list
Unit;
Described first replaces order determination unit, for according to map in the replacement section to access frequency information and more
New situation information, determine it is to be replaced mapping to replacement order;Wherein, the mapping not updated to replacement order have precedence over by more
New mapping to replacement order, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replace
Change order;
It is described second replace order determination unit, for according to it is described replacement section in map to access frequency information determine
It is to be replaced mapping to replacement order;Wherein, the low mapping of access frequency to replacement order have precedence over that access frequency is high to reflect
Penetrate to replacement order.
Based on above-mentioned technical proposal, also include:
Detection module, in the replacement section for detecting the RPCMT cache mapping to update status information
It is and is updated, then will replaces all in section mapping to writing back.
A kind of buffer replacing method and system based on SSD provided in an embodiment of the present invention, including:Receive access request
When, judge whether the access request is that stochastic pattern access please according to the operation address space size information of the access request
Ask;If so, then according to map in random page address translation caching table RPCMT to access frequency information and update status information,
Determine it is to be replaced mapping to replacement order, according to the replacement order perform the access request;Wherein, the RPCMT is
In random access memory SRAM arrange caching stochastic pattern access request mapping to cache table;
It can be seen that, in the present embodiment, when mapping pair is replaced, account for not only according to access frequency information, also from reflecting
Penetrate to update status account for such that it is able to effectively reduce and postpone that traditional LRU policy causes writes back time overhead.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope for causing.
Claims (10)
1. a kind of buffer replacing method based on SSD, it is characterised in that include:
When receiving access request, whether the access request is judged according to the operation address space size information of the access request
For stochastic pattern access request;
If so, then according to map in random page address translation caching table RPCMT to access frequency information and update status information,
Determine it is to be replaced mapping to replacement order, according to the replacement order perform the access request;Wherein, the RPCMT is
In random access memory SRAM arrange caching stochastic pattern access request mapping to cache table.
2. buffer replacing method according to claim 1, it is characterised in that if according to the operation address of the access request
Space size information judges that the access request is continuouss access request, then the buffer replacing method also includes:
The whole conversion caching of page of the corresponding logical address of the access request will be contained to continuous page address translation caching table
SPCMT;Wherein, the SPCMT be in random access memory SRAM arrange caching continuouss access request mapping it is right
Cache table.
3. buffer replacing method according to claim 2, it is characterised in that described to contain the access request correspondence
Logical address whole conversion caching of page to after continuous page address translation caching table SPCMT, also include:
When it is continuouss access request to detect next access request, the corresponding logical address of next access request is judged
With the presence or absence of in current continuous page address translation caching table SPCMT;
If existing, next access request is performed;If not existing, current continuous page address translation caching table is judged
Whether the mapping in SPCMT is to being updated;
If being updated, by the mapping of renewal to writing back, and the corresponding logical address of next access request will be contained
Whole conversion caching of page generates the continuous page address translation caching table after updating to continuous page address translation caching table SPCMT
SPCMT;
If not being updated, directly the whole conversion caching of page for containing the corresponding logical address of next access request is arrived
Continuous page address translation caching table SPCMT, generates the continuous page address translation caching table SPCMT after updating.
4. buffer replacing method according to claim 2, it is characterised in that described to contain the access request correspondence
Logical address whole conversion caching of page to after continuous page address translation caching table SPCMT, also include:
When next access request is detected for stochastic pattern access request and when replacing out clean page from the RPCMT, judge
Whether the mapping in SPCMT is to being updated;Wherein, the clean page is that the mapping not updated is right for update status information;
If so, then by the mapping being updated to writing back, using the SPCMT as clean page address translation cache table CPCMT, and lead to
Cross the clean page that the CPCMT cachings are replaced out from the RPCMT;Wherein, the CPCMT is in random access memory
The cache table of the clean page that the caching arranged in SRAM is replaced out from RPCMT;
If it is not, as clean page address translation cache table CPCMT after then the SPCMT is emptied, and cached by the CPCMT
The clean page replaced out from the RPCMT.
5. buffer replacing method according to claim 4, it is characterised in that by CPCMT cachings from the RPCMT
After the middle clean page replaced out, also include:
When it is continuouss access request to detect next access request, the CPCMT is emptied, and using the CPCMT as even
Continuous page address translation cache table SPCMT, caches the whole conversion page of logical address corresponding with next access request.
6. buffer replacing method according to claim 1, it is characterised in that then according to random page address translation caching table
Map in RPCMT to access frequency information and update status information, determine it is to be replaced mapping to replacement order, including:
Judge in the replacement section in the RPCMT with the presence or absence of update status information to be that the mapping not updated is right;Wherein, RPCMT
Include active section and replace section, the access frequency of the active section is higher than the access frequency for replacing section;
If exist, according to it is described replacement section in map to access frequency information and update status information, determine to be replaced reflecting
Penetrate to replacement order;Wherein, the mapping not updated to replacement order have precedence over the mapping being updated to replacement order, visit
Ask the low mapping of frequency to replacement order have precedence over the high mapping of access frequency to replacement order;
If not existing, according to it is described replacement section in map to access frequency information determine it is to be replaced mapping to replacement it is suitable
Sequence;Wherein, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement order.
7. buffer replacing method according to claim 6, it is characterised in that also include:
If detect the mapping that caches in the replacement section of the RPCMT to update status information be and be updated, will
Replace all in section mapping to writing back.
8. a kind of caching replacement system based on SSD, it is characterised in that include:
Access request judge module, for receiving during access request, believes according to the operation address space size of the access request
Breath judges whether the access request is stochastic pattern access request;If so, then trigger replacement and be sequentially generated module;
The replacement order determining module, for according to map in random page address translation caching table RPCMT to access frequency
Information and update status information, determine it is to be replaced mapping to replacement order, according to the replacement order perform the access please
Ask;Wherein, the RPCMT be the caching stochastic pattern access request arranged in random access memory SRAM mapping to it is slow
Deposit table.
9. caching replacement system according to claim 8, it is characterised in that the replacement order determining module includes:
Judging unit, for judging the RPCMT in replacement section in the presence or absence of update status information be the mapping not updated
It is right;Wherein, RPCMT includes active section and replaces section, and the access frequency of the active section is higher than the access frequency for replacing section
Rate;
If existing, order determination unit is replaced in triggering first;If not existing, order determination unit is replaced in triggering second;
It is described first replace order determination unit, for according to it is described replacement section in map to access frequency information and update feelings
Condition information, determine it is to be replaced mapping to replacement order;Wherein, the mapping not updated to replacement order have precedence over what is be updated
Map to replacement order, the low mapping of access frequency to replacement order have precedence over the high mapping of access frequency to replacement it is suitable
Sequence;
Described second replaces order determination unit, for according to map in the replacement section to access frequency information determine and wait to replace
Change map to replacement order;Wherein, the low mapping of access frequency to replacement order to have precedence over the high mapping of access frequency right
Replacement order.
10. caching replacement system according to claim 9, it is characterised in that also include:
Detection module, in the replacement section for detecting the RPCMT cache mapping to update status information be
It is updated, then will replaces all in section mapping to writing back.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610970121.8A CN106569959A (en) | 2016-10-28 | 2016-10-28 | Cache replacing method and system based on SSD |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610970121.8A CN106569959A (en) | 2016-10-28 | 2016-10-28 | Cache replacing method and system based on SSD |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106569959A true CN106569959A (en) | 2017-04-19 |
Family
ID=58541363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610970121.8A Pending CN106569959A (en) | 2016-10-28 | 2016-10-28 | Cache replacing method and system based on SSD |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106569959A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107273303A (en) * | 2017-05-23 | 2017-10-20 | 建荣半导体(深圳)有限公司 | A kind of flash data management system, method, flash chip and storage device |
CN107291635A (en) * | 2017-06-16 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of buffer replacing method and device |
CN108733576A (en) * | 2017-04-20 | 2018-11-02 | 立而鼎科技(深圳)有限公司 | A kind of the memory conversion layer mapping framework and method of solid state disk |
CN109284231A (en) * | 2018-07-24 | 2019-01-29 | 江苏微锐超算科技有限公司 | Processing method, device and the Memory Controller Hub of memory access request |
CN109840219A (en) * | 2017-11-29 | 2019-06-04 | 北京忆恒创源科技有限公司 | The address conversion system and method for large capacity solid storage device |
CN110413228A (en) * | 2019-07-09 | 2019-11-05 | 江苏芯盛智能科技有限公司 | A kind of mapping table management method, system and electronic equipment and storage medium |
CN111221749A (en) * | 2019-11-15 | 2020-06-02 | 新华三半导体技术有限公司 | Data block writing method and device, processor chip and Cache |
CN111966611A (en) * | 2020-08-03 | 2020-11-20 | 南京扬贺扬微电子科技有限公司 | SPI flash memory control chip with logic-to-physical address architecture |
CN113126883A (en) * | 2019-12-30 | 2021-07-16 | 深圳Tcl新技术有限公司 | Data processing method, system and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100146193A1 (en) * | 2008-12-08 | 2010-06-10 | Samsung Electronics Co., Ltd. | System and method for cache synchronization |
CN102819496A (en) * | 2012-08-16 | 2012-12-12 | 无锡紫芯集成电路系统有限公司 | Address translation method of flash FTL (Flash Translation Layer) |
TWI537729B (en) * | 2015-10-15 | 2016-06-11 | 慧榮科技股份有限公司 | Data storage device and data maintenance method thereof |
-
2016
- 2016-10-28 CN CN201610970121.8A patent/CN106569959A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100146193A1 (en) * | 2008-12-08 | 2010-06-10 | Samsung Electronics Co., Ltd. | System and method for cache synchronization |
CN102819496A (en) * | 2012-08-16 | 2012-12-12 | 无锡紫芯集成电路系统有限公司 | Address translation method of flash FTL (Flash Translation Layer) |
TWI537729B (en) * | 2015-10-15 | 2016-06-11 | 慧榮科技股份有限公司 | Data storage device and data maintenance method thereof |
Non-Patent Citations (1)
Title |
---|
姜伟娜: ""基于NAND FLASH存储器的FTL优化算法的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108733576A (en) * | 2017-04-20 | 2018-11-02 | 立而鼎科技(深圳)有限公司 | A kind of the memory conversion layer mapping framework and method of solid state disk |
CN107273303A (en) * | 2017-05-23 | 2017-10-20 | 建荣半导体(深圳)有限公司 | A kind of flash data management system, method, flash chip and storage device |
CN107273303B (en) * | 2017-05-23 | 2020-06-26 | 建荣半导体(深圳)有限公司 | Flash memory data management system and method, flash memory chip and storage device |
CN107291635A (en) * | 2017-06-16 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of buffer replacing method and device |
CN109840219A (en) * | 2017-11-29 | 2019-06-04 | 北京忆恒创源科技有限公司 | The address conversion system and method for large capacity solid storage device |
CN109840219B (en) * | 2017-11-29 | 2024-04-05 | 北京忆恒创源科技股份有限公司 | Address translation system and method for mass solid state storage device |
CN109284231A (en) * | 2018-07-24 | 2019-01-29 | 江苏微锐超算科技有限公司 | Processing method, device and the Memory Controller Hub of memory access request |
CN109284231B (en) * | 2018-07-24 | 2023-05-23 | 江苏微锐超算科技有限公司 | Memory access request processing method and device and memory controller |
CN110413228B (en) * | 2019-07-09 | 2022-10-14 | 江苏芯盛智能科技有限公司 | Mapping table management method and system, electronic equipment and storage medium |
CN110413228A (en) * | 2019-07-09 | 2019-11-05 | 江苏芯盛智能科技有限公司 | A kind of mapping table management method, system and electronic equipment and storage medium |
CN111221749A (en) * | 2019-11-15 | 2020-06-02 | 新华三半导体技术有限公司 | Data block writing method and device, processor chip and Cache |
CN113126883A (en) * | 2019-12-30 | 2021-07-16 | 深圳Tcl新技术有限公司 | Data processing method, system and storage medium |
CN111966611B (en) * | 2020-08-03 | 2023-12-12 | 南京扬贺扬微电子科技有限公司 | SPI flash memory control chip with logic-to-physical address architecture |
CN111966611A (en) * | 2020-08-03 | 2020-11-20 | 南京扬贺扬微电子科技有限公司 | SPI flash memory control chip with logic-to-physical address architecture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106569959A (en) | Cache replacing method and system based on SSD | |
US10241919B2 (en) | Data caching method and computer system | |
JP6719027B2 (en) | Memory management to support huge pages | |
US8171223B2 (en) | Method and system to increase concurrency and control replication in a multi-core cache hierarchy | |
US7698508B2 (en) | System and method for reducing unnecessary cache operations | |
CN108475234B (en) | Multiprocessor system and method thereof | |
US7711902B2 (en) | Area effective cache with pseudo associative memory | |
KR101612922B1 (en) | Memory system and method of managing memory system | |
CN102981963B (en) | A kind of implementation method of flash translation layer (FTL) of solid-state disk | |
CN107943719B (en) | Flash translation layer control method based on request classification | |
JP3281893B2 (en) | Method and system for implementing a cache coherency mechanism utilized within a cache memory hierarchy | |
US20110161597A1 (en) | Combined Memory Including a Logical Partition in a Storage Memory Accessed Through an IO Controller | |
US5684976A (en) | Method and system for reduced address tags storage within a directory having a tree-like data structure | |
WO2014061064A1 (en) | Cache control apparatus and cache control method | |
CN105389135B (en) | A kind of solid-state disk inner buffer management method | |
US20020010839A1 (en) | Multiple variable cache replacement policy | |
CN104166634A (en) | Management method of mapping table caches in solid-state disk system | |
CN105740164A (en) | Multi-core processor supporting cache consistency, reading and writing methods and apparatuses as well as device | |
US6625694B2 (en) | System and method for allocating a directory entry for use in multiprocessor-node data processing systems | |
US9176856B2 (en) | Data store and method of allocating data to the data store | |
CN109446117B (en) | Design method for page-level flash translation layer of solid state disk | |
CN105930282A (en) | Data cache method used in NAND FLASH | |
CN109739780A (en) | Dynamic secondary based on the mapping of page grade caches flash translation layer (FTL) address mapping method | |
CN110262982A (en) | A kind of method of solid state hard disk address of cache | |
JP3262519B2 (en) | Method and system for enhancing processor memory performance by removing old lines in second level cache |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170419 |