CN109408410A - A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation - Google Patents
A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation Download PDFInfo
- Publication number
- CN109408410A CN109408410A CN201811346799.4A CN201811346799A CN109408410A CN 109408410 A CN109408410 A CN 109408410A CN 201811346799 A CN201811346799 A CN 201811346799A CN 109408410 A CN109408410 A CN 109408410A
- Authority
- CN
- China
- Prior art keywords
- garbage reclamation
- hard disk
- solid state
- state hard
- block
- 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.)
- Withdrawn
Links
- 239000010813 municipal solid waste Substances 0.000 title claims abstract description 184
- 239000007787 solid Substances 0.000 title claims abstract description 90
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000007704 transition Effects 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 8
- 238000004064 recycling Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
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/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1032—Reliability improvement, data loss prevention, degraded operation etc
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/21—Employing a record carrier using a specific recording technology
- G06F2212/214—Solid state disk
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention discloses referee method, device and the storage mediums of a kind of solid state hard disk garbage reclamation, wherein, this method specifically: need to preset before executing garbage reclamation for triggering the threshold value for executing optional garbage reclamation, and the quantity of the current sky Block of statistics solid state hard disk.Only under the premise of the quantity of current sky Block is greater than threshold value, it could execute and force garbage reclamation, then execute optional garbage reclamation.It can be seen that, regardless of whether for being the case where free Block in compared with the existing technology, this method can guarantee the empty Block for having sufficient, therefore pressure garbage reclamation can preferentially be executed, guarantee the reliability of the data in solid state hard disk in corresponding Block, and then improves the reliability of solid state hard disk.In addition, the arbitration device and storage medium of solid state hard disk garbage reclamation disclosed in this invention, corresponding with the above method, effect is same as above.
Description
Technical field
The present invention relates to solid state hard disk fields, referee method, device more particularly to a kind of solid state hard disk garbage reclamation
And storage medium.
Background technique
Solid state hard disk is made of main control unit and solid state storage elements, includes multiple Block in solid state storage elements,
That is data block.Since solid state hard disk does not have rewriting mechanism, so needing to wipe in Block after a Block writes full data
Data just can be written into new data.
For solid state hard disk, there are two types of different addresses, and one is logical address, and one is physical address, logic
Address is that for users to use, when data are repeatedly written to same logical address in user, solid state hard disk is practical to be written into difference
Physical address, and for a user, the data of same logical address last time write-in are valid data, and data before are just
It is invalid data, results in being stored with multiple invalid datas on multiple physical address in solid state hard disk in this way.It is solid in order to improve
The space utilization rate of state hard disk needs to carry out garbage reclamation.So-called garbage reclamation is one kind to recycle available space, by nothing
The valid data in Block that effect data and valid data mix are moved in new Block, thus by invalid data institute duty
Between vacate used in data-moving technology.Under normal conditions, this garbage reclamation is also referred to as optional garbage reclamation.
Other than optional garbage reclamation, another important operation of solid state hard disk is to force garbage reclamation.Cause strong
The reason of garbage reclamation processed includes data retention, read disturb, read error, write error etc., above-mentioned
Reason makes the data in the Block in solid state hard disk that can become unreliable, therefore, when this condition is met, needs to pass through
Garbage reclamation is forced to overcome.
Garbage reclamation or optional garbage reclamation are either forced, will be write for user and space is provided.Unlike, it is non-
Compulsory garbage reclamation considers the valid data number of Block to be recycled, the less Block of priority reclamation valid data,
And force garbage reclamation do not have this feature, recycling not using valid data as reference frame (may be entirely valid data,
May also have part is invalid data), only by the data-moving in unstable Block, prevent the feelings of corrupted data
Condition.
When in the prior art, if necessary to execute two kinds of garbage reclamations, pressure garbage reclamation is first carried out, is then carried out again non-
Force garbage reclamation.When the read-write resource in solid hard disk is limited, solid state hard disk can may not provide empty Block, cause
Force garbage reclamation that can not carry out, then the data in corresponding Block will have wild effect.
It can be seen that being directed to the current state of solid state hard disk, the execution sequence for how controlling garbage reclamation is solid to guarantee
The stability of data in state hard disk is those skilled in the art's urgent problem to be solved.
Summary of the invention
The object of the present invention is to provide referee method, device and the storage mediums of a kind of solid state hard disk garbage reclamation, are used for
For the current state of solid state hard disk, the execution sequence of garbage reclamation is controlled to guarantee the stabilization of the data in solid state hard disk
Property.
In order to solve the above technical problems, the present invention provides a kind of referee method of solid state hard disk garbage reclamation, comprising:
It presets for triggering the threshold value for executing optional garbage reclamation;
Count the quantity of the current sky Block of solid state hard disk;
When needing to carry out garbage reclamation, judge whether the quantity of current sky Block is greater than the threshold value;
If it is greater, then preferential execute forces garbage reclamation.
Preferably, if it is not greater, then further include:
It is alternately performed the pressure garbage reclamation and optional garbage reclamation according to set proportion.
Preferably, the ratio is specially 1:1.
Preferably, the specific setting method of the threshold value includes:
Obtain maximum writing speed and minimum writing speed and the maximum writing speed and the institute of the solid state hard disk
State the interval time of minimum writing speed;
Transition writing speed is chosen between the maximum writing speed and the minimum writing speed;
The threshold value is determined according to the interval time and the transition writing speed.
Preferably, the transition writing speed is specially being averaged for the maximum writing speed and the minimum writing speed
Value.
Preferably, further includes:
After having moved the valid data of a Block, the data in the Block are wiped.
Preferably, further includes: count the Block for wiping data labeled as sky Block.
In order to solve the above technical problems, the present invention also provides a kind of arbitration devices of solid state hard disk garbage reclamation, comprising:
Setting unit, for presetting for triggering the threshold value for executing optional garbage reclamation;
Statistic unit, for counting the quantity of the current sky Block of solid state hard disk;
Judging unit, for when needing to carry out garbage reclamation, judging whether the quantity of current sky Block is greater than the threshold
Value;
Execution unit is preferentially to execute to force garbage reclamation when being for the judging result in the judging unit.
In order to solve the above technical problems, the present invention also provides a kind of arbitration devices of solid state hard disk garbage reclamation, including deposit
Reservoir, for storing computer program;
Processor realizes the arbitration of solid state hard disk garbage reclamation as described above when for executing the computer program
The step of method.
In order to solve the above technical problems, the present invention also provides a kind of computer readable storage medium, it is described computer-readable
Computer program is stored on storage medium, the computer program realizes that solid-state as described above is hard when being executed by processor
The step of referee method of disk garbage reclamation.
The referee method of solid state hard disk garbage reclamation provided by the present invention needs to set in advance before executing garbage reclamation
It sets for triggering the threshold value for executing optional garbage reclamation, and the quantity of the current sky Block of statistics solid state hard disk.Only working as
Under the premise of the quantity of preceding sky Block is greater than threshold value, it could execute and force garbage reclamation, then execute optional garbage reclamation.By
This as it can be seen that in compared with the existing technology regardless of whether there is the case where free Block for, this method can guarantee to have sufficient sky
Block, therefore pressure garbage reclamation can be preferentially executed, guarantee the reliability of the data in solid state hard disk in corresponding Block,
And then improve the reliability of solid state hard disk.
In addition, the arbitration device and storage medium of solid state hard disk garbage reclamation provided by the present invention, with the above method pair
It answers, equally there is above-mentioned beneficial effect.
Detailed description of the invention
In order to illustrate the embodiments of the present invention more clearly, attached drawing needed in the embodiment will be done simply below
It introduces, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ordinary skill people
For member, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the referee method of solid state hard disk garbage reclamation provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the referee method of another solid state hard disk garbage reclamation provided in an embodiment of the present invention;
Fig. 3 is a kind of structure chart of the arbitration device of solid state hard disk garbage reclamation provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole embodiments.Based on this
Embodiment in invention, those of ordinary skill in the art are without making creative work, obtained every other
Embodiment belongs to the scope of the present invention.
Core of the invention is to provide referee method, device and the storage medium of a kind of solid state hard disk garbage reclamation, is used for
For the current state of solid state hard disk, the execution sequence of garbage reclamation is controlled to guarantee the stabilization of the data in solid state hard disk
Property.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.
Embodiment one
Fig. 1 is a kind of flow chart of the referee method of solid state hard disk garbage reclamation provided in an embodiment of the present invention.Such as Fig. 1 institute
Show, this method comprises:
S10: it presets for triggering the threshold value for executing optional garbage reclamation.
It should be noted that the same solid state hard disk, threshold value is constant, the hard disk of different size, it is generally the case that
Corresponding threshold value is also different.Here threshold value is the setting of the quantity of sky Block remaining to solid state hard disk in fact.Also
It is to say, when the quantity of the remaining sky Block of solid state hard disk reaches threshold value, then triggers and execute optional garbage reclamation.It is understood that
, for threshold value needs according to some parameter settings of solid state hard disk, the mode of setting is not unique, different setting method
The implementation of this programme is not influenced, only influences the effect of solid state hard disk garbage reclamation.
S11: the quantity of the current sky Block of statistics solid state hard disk.
Sky Block mentioned in the present invention refers to do not have data in the Block, both without valid data, also without invalid
Data.It is emphasized that sky Block is only emphasized currently without data, without the write-in for considering whether to have data in the past.
In other words, if being written into data before Block, later by garbage reclamation (can be pressure garbage reclamation, can also
To be optional garbage reclamation) wipe data again, then the Block belongs to sky Block;Alternatively, a Block is never written to
Data, then the Block also belongs to sky Block.
S12: when needing to carry out garbage reclamation, judging whether the quantity of current sky Block is greater than threshold value, if it is,
Into S13.
S13: preferential execute forces garbage reclamation.
It should be noted that the garbage reclamation in this step, which can be, only includes pressure garbage reclamation, be also possible to include
Force garbage reclamation and optional garbage reclamation.If optional garbage reclamation, then according to the prior art for non-strong
The execution method of garbage reclamation processed executes, and the present invention repeats no more.It is preferentially executed in step S13 and forces garbage reclamation, and
It does not represent and only forces garbage reclamation or must have optional garbage reclamation, only say, it is if there is optional garbage reclamation, then excellent
Pressure garbage reclamation is first carried out, if only carrying out pressure garbage reclamation without optional garbage reclamation.Below with two kinds of situations
Illustrate respectively.
1) garbage reclamation only include force garbage reclamation (why need arbitrate is because, the pressure garbage reclamation of execution
During will appear optional garbage reclamation)
In this case, it if the quantity of current sky Block is greater than threshold value, is preferentially executed in step S13 and forces rubbish
Recycling is exactly: current whole being needed the data in the corresponding Block of garbage reclamation is forced to be moved, as to how being removed
It moves, refers to the prior art, the present invention repeats no more.In this course, it is possible to it will appear optional garbage reclamation, even if
Execute optional garbage reclamation also and must wait executed force garbage reclamation after could execute.
2) garbage reclamation includes forcing garbage reclamation and optional garbage reclamation
In this case, it if the quantity of current sky Block is greater than threshold value, is preferentially executed in step S13 and forces rubbish
Recycling is exactly: current whole being needed the data in the corresponding Block of garbage reclamation is forced to be moved, then be executed again non-strong
Garbage reclamation processed.If occurring pressure garbage reclamation again during executing optional garbage reclamation, then executing
After current optional garbage reclamation, turns to execute and garbage reclamation is forced to return again to after then having executed the pressure garbage reclamation
Execute optional garbage reclamation.
The specific setting method of preferably embodiment, threshold value includes:
Obtain the maximum writing speed and minimum writing speed of solid state hard disk, and maximum writing speed and minimum write-in speed
The interval time of degree;
Transition writing speed is chosen between maximum writing speed and minimum writing speed;
According to interval time and transition writing speed threshold value.
Further, transition writing speed is specially the average value of maximum writing speed and minimum writing speed.
It is understood that after interval time and transition writing speed determine, then with the transition writing speed to
Data are written in Block, then can complete the write-in of several Block after interval time, then corresponding threshold value is exactly several
It is a.For example, data are written into Block with transition writing speed, after interval time, 5 Block are write, then threshold value
It is exactly 5.It should be noted that if current Block does not write full data, then the Block will also be calculated in threshold when interarrival time
In value.Threshold value here is exactly the product of interval time Yu transition writing speed in fact.
The referee method of solid state hard disk garbage reclamation provided in an embodiment of the present invention needs pre- before executing garbage reclamation
First setting is for trigger the threshold value for executing optional garbage reclamation, and counts the quantity of the current sky Block of solid state hard disk.Only
Under the premise of the quantity of current sky Block is greater than threshold value, it could execute and force garbage reclamation, then execute optional rubbish and return
It receives.It can be seen that in compared with the existing technology regardless of whether there is the case where free Block for, this method can guarantee to have to fill
The empty Block of foot, therefore pressure garbage reclamation can be preferentially executed, guarantee the data in solid state hard disk in corresponding Block
Reliability, and then improve the reliability of solid state hard disk.
Embodiment two
Fig. 2 is the flow chart of the referee method of another solid state hard disk garbage reclamation provided in an embodiment of the present invention.Such as Fig. 2
It is shown, on the basis of the above embodiments, if the quantity of current sky Block is not more than threshold value, further include:
S20: it is alternately performed forces garbage reclamation and optional garbage reclamation according to set proportion.
It should be noted that necessarily including two types in garbage reclamation in this case, one is force rubbish to return
It receives, another optional garbage reclamation.In this step, the ratio of setting can be dynamic change, i.e., several according to currently having
Block needs to carry out pressure garbage reclamation, and has several Block to need to carry out optional garbage reclamation to determine ratio,
It can be a preset fixed value.For the former, although the mode of dynamic setting can be adapted to more currently
The actual conditions of solid state hard disk, but due to needing frequently to calculate, so causing calculation amount bigger.Preferably implement
Mode chooses this mode of fixed value.Specifically, ratio is 1:1.Why being set as 1:1 is to expire to the greatest extent
The case where quantity of the more kinds of pressure garbage reclamations of foot and optional garbage reclamation.For example, if ratio setting is 1:3, currently
One Block needs to carry out pressure garbage reclamation, and only 1 Block needs to carry out optional garbage reclamation, then this compares
Example is arranged just inappropriate.It should be noted that if proportionally carried out one wheel garbage reclamation after, if remaining pressure
Garbage reclamation and optional garbage reclamation are unsatisfactory for this with ratio, then S11 can be again introduced into, this is because by a wheel
After garbage reclamation, more sky Block can be provided, it is of course also possible to preferentially execute optional garbage reclamation.In addition, it is necessary to
Illustrate, when executing optional garbage reclamation, the less Block of priority reclamation valid data.
In order to allow those skilled in the art more to understand, what the present invention was previously mentioned is alternately performed pressure according to set proportion
Garbage reclamation and optional garbage reclamation, the present invention provide a kind of concrete application scene.
According to whether there is data to be divided into sky Block and non-empty Block, garbage reclamation is related to Block in current solid state hard disk
To two kinds of Block, source Block and target Block, source Block are exactly the Block that currently execute garbage reclamation, target Block
Seek to receive the Block of valid data.
1) it selects the Block of optional garbage reclamation as source Block first, its valid data is moved into target
Block;
2) after the completion of source Block is moved, erasing can use later as sky Block;
3) it then selects the Block for forcing garbage reclamation as source Block, valid data is moved into target Block;
4) after the completion of source Block is moved, erasing can use later as sky Block.
If ratio setting is for 1:1, primary optional garbage reclamation is executed it is necessary to execute primary pressure rubbish and return
It receives.
It should be noted that due to forcing to be possible to entirely valid data in the corresponding Block of garbage reclamation, rather than
It forces to certainly exist invalid data in garbage reclamation, therefore, after forcing garbage reclamation, can not necessarily recycle space, but
It is that can recycle space surely by optional garbage reclamation is latter.So preferably, being alternately performed when according to setting ratio
When forcing garbage reclamation and optional garbage reclamation, optional garbage reclamation is first carried out, then execute pressure garbage reclamation.
In addition, target Block be at the beginning it is empty, later as garbage reclamation begins to write data.One target Block
It is finished and then separately takes a Block as next target Block from empty Block.
Embodiment three
As shown in Fig. 2, on the basis of the above embodiments, further includes:
After having moved the valid data of a Block, the data in the Block are wiped.
For performing optional garbage reclamation and forcing the Block of garbage reclamation, valid data are realized and are removed
It moves, remaining invalid data also is stored in current Block, occupies the space of Block, in order to improve space utilization rate, this reality
It applies in example, the data in this Block is wiped, so that the Block becomes sky Block, data institute is written for subsequent user
With.It is understood that the erasing of the data in this step can be found in the prior art, this embodiment is not repeated.
Preferably embodiment, further includes: count the Block for wiping data labeled as sky Block.Label
Mode this embodiment be not construed as limiting, can be embodied by label symbol, specific label symbol is not construed as limiting.
The referee method of solid state hard disk garbage reclamation is described in detail in above-described embodiment, and the present invention also provides one
The arbitration device of kind solid state hard disk garbage reclamation.The embodiment of device part is described from two angles in the present invention, one
Kind is the angle based on functional module, and another kind is hardware based angle.
Example IV
Fig. 3 is a kind of structure chart of the arbitration device of solid state hard disk garbage reclamation provided in an embodiment of the present invention.Such as Fig. 3 institute
Show, which includes:
Setting unit 10, for presetting for triggering the threshold value for executing optional garbage reclamation.
Statistic unit 11, for counting the quantity of the current sky Block of solid state hard disk.
Judging unit 12, for when needing to carry out garbage reclamation, judging whether the quantity of current sky Block is greater than threshold
Value.
Execution unit 13 is preferentially to execute to force garbage reclamation when being for the judging result in judging unit.
Preferably, execution unit further includes being alternately performed the pressure garbage reclamation and optional according to set proportion
Garbage reclamation.
Preferably, further includes: erasing unit will be in the Block for after having moved the valid data of a Block
Data erasing.
Preferably, further includes: marking unit is counted for the Block for wiping data to be labeled as sky Block.
Since the embodiment of device part is corresponded to each other with the embodiment of method part, the embodiment of device part is asked
Referring to the description of the embodiment of method part, wouldn't repeat here.
The arbitration device of solid state hard disk garbage reclamation provided in an embodiment of the present invention needs pre- before executing garbage reclamation
First setting is for trigger the threshold value for executing optional garbage reclamation, and counts the quantity of the current sky Block of solid state hard disk.Only
Under the premise of the quantity of current sky Block is greater than threshold value, it could execute and force garbage reclamation, then execute optional rubbish and return
It receives.It can be seen that in compared with the existing technology regardless of whether there is the case where free Block for, the present apparatus can guarantee to have to fill
The empty Block of foot, therefore pressure garbage reclamation can be preferentially executed, guarantee the data in solid state hard disk in corresponding Block
Reliability, and then improve the reliability of solid state hard disk.
Embodiment five
The arbitration device of another kind solid state hard disk garbage reclamation provided by the invention, including memory, calculate for storing
Machine program;
Processor realizes the solid state hard disk rubbish as described in one-embodiment of embodiment three when for executing computer program
The step of referee method of recycling.
Since the embodiment of device part is corresponded to each other with the embodiment of method part, the embodiment of device part is asked
Referring to the description of the embodiment of method part, wouldn't repeat here.In some embodiments of the invention, processor and memory
It can be connected by bus or other means.
The arbitration device of solid state hard disk garbage reclamation provided in an embodiment of the present invention needs pre- before executing garbage reclamation
First setting is for trigger the threshold value for executing optional garbage reclamation, and counts the quantity of the current sky Block of solid state hard disk.Only
Under the premise of the quantity of current sky Block is greater than threshold value, it could execute and force garbage reclamation, then execute optional rubbish and return
It receives.It can be seen that in compared with the existing technology regardless of whether there is the case where free Block for, the present apparatus can guarantee to have to fill
The empty Block of foot, therefore pressure garbage reclamation can be preferentially executed, guarantee the data in solid state hard disk in corresponding Block
Reliability, and then improve the reliability of solid state hard disk.
Embodiment six
Finally, being stored with meter on computer readable storage medium the present invention also provides a kind of computer readable storage medium
Calculation machine program realizes that the solid state hard disk rubbish as described in one-embodiment of embodiment three returns when computer program is executed by processor
The step of referee method of receipts.
The referee method of specific solid state hard disk garbage reclamation refers to the description of the embodiment of method part, here wouldn't
It repeats.
It is understood that if the method in above-described embodiment is realized in the form of SFU software functional unit and as independence
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, of the invention
Technical solution substantially all or part of the part that contributes to existing technology or the technical solution can be in other words
It is expressed in the form of software products, which is stored in a storage medium, and it is each to execute the present invention
The all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk
Etc. the various media that can store program code.
Referee method, device and the storage medium of solid state hard disk garbage reclamation provided by the present invention have been carried out in detail above
It is thin to introduce.Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, also
Can be with several improvements and modifications are made to the present invention, these improvement and modification also fall into the protection scope of the claims in the present invention
It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Claims (10)
1. a kind of referee method of solid state hard disk garbage reclamation characterized by comprising
It presets for triggering the threshold value for executing optional garbage reclamation;
Count the quantity of the current sky Block of solid state hard disk;
When needing to carry out garbage reclamation, judge whether the quantity of current sky Block is greater than the threshold value;
If it is greater, then preferential execute forces garbage reclamation.
2. the referee method of solid state hard disk garbage reclamation according to claim 1, which is characterized in that if it is not greater, then
Further include:
It is alternately performed the pressure garbage reclamation and optional garbage reclamation according to set proportion.
3. the referee method of solid state hard disk garbage reclamation according to claim 2, which is characterized in that the ratio is specially
1:1。
4. the referee method of solid state hard disk garbage reclamation according to claim 1 to 3, which is characterized in that described
The specific setting method of threshold value includes:
Obtain the solid state hard disk maximum writing speed and minimum writing speed and the maximum writing speed and it is described most
The interval time of small writing speed;
Transition writing speed is chosen between the maximum writing speed and the minimum writing speed;
The threshold value is determined according to the interval time and the transition writing speed.
5. the referee method of solid state hard disk garbage reclamation according to claim 4, which is characterized in that the transition write-in speed
Degree is specially the average value of the maximum writing speed and the minimum writing speed.
6. the referee method of solid state hard disk garbage reclamation according to claim 1, which is characterized in that further include:
After having moved the valid data of a Block, the data in the Block are wiped.
7. the referee method of solid state hard disk garbage reclamation according to claim 6, which is characterized in that further include: it will wipe
The Block of data is counted labeled as sky Block.
8. a kind of arbitration device of solid state hard disk garbage reclamation characterized by comprising
Setting unit, for presetting for triggering the threshold value for executing optional garbage reclamation;
Statistic unit, for counting the quantity of the current sky Block of solid state hard disk;
Judging unit, for when needing to carry out garbage reclamation, judging whether the quantity of current sky Block is greater than the threshold value;
Execution unit is preferentially to execute to force garbage reclamation when being for the judging result in the judging unit.
9. a kind of arbitration device of solid state hard disk garbage reclamation, which is characterized in that including memory, for storing computer journey
Sequence;
Processor realizes solid state hard disk rubbish as described in any one of claim 1 to 7 when for executing the computer program
The step of referee method of recycling.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, the computer program realize that solid state hard disk rubbish as described in any one of claim 1 to 7 returns when being executed by processor
The step of referee method of receipts.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811346799.4A CN109408410A (en) | 2018-11-13 | 2018-11-13 | A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811346799.4A CN109408410A (en) | 2018-11-13 | 2018-11-13 | A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109408410A true CN109408410A (en) | 2019-03-01 |
Family
ID=65473308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811346799.4A Withdrawn CN109408410A (en) | 2018-11-13 | 2018-11-13 | A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408410A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111813343A (en) * | 2020-07-16 | 2020-10-23 | 济南浪潮数据技术有限公司 | Solid state disk garbage recovery method, system and related components |
CN112115071A (en) * | 2019-06-19 | 2020-12-22 | 美光科技公司 | Garbage collection suitable for user device access |
CN112486415A (en) * | 2020-11-30 | 2021-03-12 | 北京泽石科技有限公司 | Garbage recycling method and device of storage device |
CN114528233A (en) * | 2022-01-21 | 2022-05-24 | 苏州浪潮智能科技有限公司 | Method, device, equipment and medium for IO write arbitration control of solid state disk |
-
2018
- 2018-11-13 CN CN201811346799.4A patent/CN109408410A/en not_active Withdrawn
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115071A (en) * | 2019-06-19 | 2020-12-22 | 美光科技公司 | Garbage collection suitable for user device access |
CN112115071B (en) * | 2019-06-19 | 2022-05-13 | 美光科技公司 | Garbage collection suitable for user device access |
US11561892B2 (en) | 2019-06-19 | 2023-01-24 | Micron Technology, Inc. | Garbage collection adapted to user device access |
CN111813343A (en) * | 2020-07-16 | 2020-10-23 | 济南浪潮数据技术有限公司 | Solid state disk garbage recovery method, system and related components |
CN111813343B (en) * | 2020-07-16 | 2022-07-08 | 济南浪潮数据技术有限公司 | Solid state disk garbage recovery method, system and related components |
CN112486415A (en) * | 2020-11-30 | 2021-03-12 | 北京泽石科技有限公司 | Garbage recycling method and device of storage device |
CN112486415B (en) * | 2020-11-30 | 2024-05-24 | 北京泽石科技有限公司 | Garbage collection method and device for storage device |
CN114528233A (en) * | 2022-01-21 | 2022-05-24 | 苏州浪潮智能科技有限公司 | Method, device, equipment and medium for IO write arbitration control of solid state disk |
CN114528233B (en) * | 2022-01-21 | 2023-07-25 | 苏州浪潮智能科技有限公司 | IO write arbitration control method, device, equipment and medium for solid state disk |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408410A (en) | A kind of referee method, device and the storage medium of solid state hard disk garbage reclamation | |
DE112005001512B4 (en) | Apparatus and method for high performance access to a volatile disk drive storage using a built-in direct memory access device | |
CN109032517A (en) | A kind of method, apparatus and computer readable storage medium of data rule | |
CN108710531B (en) | Data writing method and device of circular queue, terminal equipment and storage medium | |
CN104461936A (en) | Cached data disk brushing method and device | |
CN109491606B (en) | Full flash memory space management method, system, equipment and computer medium | |
CN112749102B (en) | Memory space garbage recycling method, device, equipment and medium | |
CN101957725B (en) | Method for managing external equipment of computer | |
CN108984295B (en) | Memory recovery method, computer device and computer readable storage medium | |
WO2021093365A1 (en) | Gpu video memory management control method and related device | |
CN106250063B (en) | A kind of page turning method, device and write terminal | |
CN112416255A (en) | User writing speed control method, device, equipment and medium | |
CN101877666A (en) | Method and device for receiving multi-application program message based on zero copy mode | |
CN110674052A (en) | Memory management method, server and readable storage medium | |
CN110674064B (en) | Data transmission method, device, equipment and computer readable storage medium | |
CN103543901A (en) | Method and device for generating menus | |
CN109240615A (en) | A kind of method for reading data of solid state hard disk, device and equipment | |
CN108255430A (en) | NCQ command handling methods, storage device and computer readable storage medium | |
CN111400035A (en) | Video memory allocation method and device, electronic equipment and storage medium | |
CN109558264A (en) | A kind of volume information method of calibration, system and the associated component of virtual volume | |
CN109710187A (en) | Read command accelerated method, device, computer equipment and the storage medium of NVMe SSD main control chip | |
CN113867624A (en) | Data writing method and device, readable storage medium and electronic equipment | |
CN108959499A (en) | Distributed file system performance analysis method, device, equipment and storage medium | |
CN108874325B (en) | Data printing method and system | |
CN106897111A (en) | The management system and management method of a kind of virtual platform |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190301 |
|
WW01 | Invention patent application withdrawn after publication |