CN113778821A - Solid state disk and medium access management method thereof - Google Patents

Solid state disk and medium access management method thereof Download PDF

Info

Publication number
CN113778821A
CN113778821A CN202110868814.7A CN202110868814A CN113778821A CN 113778821 A CN113778821 A CN 113778821A CN 202110868814 A CN202110868814 A CN 202110868814A CN 113778821 A CN113778821 A CN 113778821A
Authority
CN
China
Prior art keywords
solid state
state disk
access
load
access request
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
Application number
CN202110868814.7A
Other languages
Chinese (zh)
Inventor
蔡全
陈正亮
王琛銮
骆小敏
沈佳奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maxio Technology Hangzhou Ltd
Original Assignee
Maxio Technology Hangzhou Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maxio Technology Hangzhou Ltd filed Critical Maxio Technology Hangzhou Ltd
Priority to CN202110868814.7A priority Critical patent/CN113778821A/en
Publication of CN113778821A publication Critical patent/CN113778821A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Memory System (AREA)

Abstract

The utility model discloses a medium access management method of a solid state disk and the solid state disk, the method comprises: when an access request is taken out of an access queue for execution, acquiring the attribute of the access request and the state information of the solid state disk, wherein the attribute of the access request at least comprises an operation type, and the operation type comprises a read operation and a write operation; acquiring a read operation load and a write operation load of the solid state disk according to the attribute of the access request; starting garbage recycling operation according to the read operation load and the write operation load of the solid state disk and the state information of the solid state disk, and acquiring a garbage recycling load; and adjusting the priority between the writing operation and the garbage collection operation according to the condition information of the solid state disk. According to the medium access management method of the solid state disk, the garbage collection operation is started and the load ratio of the garbage collection operation is adjusted through the condition information of the solid state disk and the read operation load and the write operation load of the solid state disk, so that the solid state disk can keep higher performance for more time.

Description

Solid state disk and medium access management method thereof
Technical Field
The invention relates to the technical field of access management, in particular to a medium access management method of a solid state disk and the solid state disk.
Background
A Solid State Drive (SSD) is a non-volatile data storage device composed of a controller and a memory chip array. The storage medium of the solid state disk comprises a flash memory chip (flash) or a DRAM chip. The interface of the solid state disk can be compatible with a traditional hard disk which takes a magnetic disk as a storage medium, and has the advantages of small volume, light weight, low power consumption, no mechanical noise, high reading and writing speed and the like compared with the traditional hard disk, so that the solid state disk has been widely used for replacing the traditional hard disk and is applied to various fields such as notebook computers, industrial control, video monitoring, network terminals, navigation equipment and the like.
NAND type flash memory uses I/O ports to implement transfer control, address and data information. The write operation of the flash memory can only be performed in the unit that is empty or erased, so a necessary operation of most solid state disks is to perform Garbage Collection (GC) to obtain the new available space.
However, sometimes the memory cells in the memory cannot be garbage collected in time to add empty or erased memory cells, and if the write operation is performed on the NAND-type flash memory in this case, the write operation cannot be performed in time because of too few empty or erased memory cells, so that the problem of serious delay of the write protection and the read-write response of the solid state disk occurs.
In order to make the user experience better, the firmware of the solid state disk needs to perform necessary flow control on the access of the NAND flash memory, so as to prevent the solid state disk from entering write protection and seriously delaying read-write response.
Disclosure of Invention
In view of the foregoing problems, an object of the present invention is to provide a medium access management method for a solid state disk and a solid state disk, so that the solid state disk maintains higher performance for more time, and maintains reliability and service life of data of the solid state disk.
According to an aspect of the present invention, a method for managing media access of a solid state disk is provided, including: when an access request is taken out of an access queue for execution, acquiring the attribute of the access request, wherein the attribute of the access request at least comprises an operation type, and the operation type comprises a read operation and a write operation; acquiring a read operation load and a write operation load of the solid state disk according to the attribute of the access request; starting garbage recycling operation according to the read operation load and the write operation load of the solid state disk, and acquiring the condition information of the solid state disk; and adjusting the priority between the writing operation and the garbage collection operation according to the condition information of the solid state disk.
Optionally, the step of starting a garbage collection operation according to the read operation load and the write operation load of the solid state disk includes: counting the read operation load and the write operation load of the solid state disk; when the read operation load and the write operation load are lower than a first preset condition, starting garbage collection operation, wherein the step of enabling the read operation load and the write operation load to be lower than the first preset condition comprises the following steps: the reading operation load is lower than a first set value in a statistical period, and the reading operation load is lower than the first set value for N periods; and the writing operation load is lower than a second set value in a statistical period, the writing operation load is lower than the second set value for M periods, and N and M are natural numbers larger than 1.
Optionally, the status information of the solid state disk includes: the size of unused storage space of the storage array of the solid state disk is reduced; read interference of the solid state disk; and the wear condition of the solid state disk.
Optionally, the adjusting the priority between the write operation and the garbage collection operation according to the status information of the solid state disk includes: when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and abrasion meets a second preset condition, the priority of the garbage recycling operation is improved; and when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and wear conditions meets a third preset condition, the priority of the garbage collection operation is reduced.
Optionally, before the step of fetching the access request from the access queue for execution, the method further includes: the access request applies for access right and enters an access queue; and obtaining the access right in the access queue according to the priority of the access request.
Optionally, the step of applying for the access right by the access request and entering the access queue and the step of obtaining the access right in the access queue according to the priority of the access request further includes: counting the response time from the time when the access request enters the access queue to the time when the access right is obtained; judging whether the response time is greater than a third set value; and if the access authority is larger than the third set value, the access request obtains the access authority.
Optionally, the step of making the access request obtain the access right includes: the access request applies for access right again; and adjusting the priority of the access request or suspending part of garbage collection operation so as to enable the access request to obtain access authority.
According to another aspect of the present invention, there is provided a solid state disk including: the storage array is used for storing application programs and data; a controller connected to the storage array and configured to perform overall control of access to the storage array, wherein the controller comprises: the control module is connected with the storage array and used for judging the priority and the access sequence of the access request; the load counting module is connected with the control module and used for acquiring a read operation load and a write operation load of the solid state disk; the GC condition detection module is connected with the control module and used for acquiring the condition information of the solid state disk; and the GC transaction calculation module is connected with the GC condition detection module and the control module and is used for adjusting the priority between the write operation and the garbage collection operation according to the condition information of the solid state disk, wherein the load counting module starts the garbage collection operation when the read operation load and the write operation load meet a first preset condition.
Optionally, the first predetermined condition comprises: the reading operation load is lower than a first set value in one period, and the reading operation load is lower than the first set value for N periods; and the writing operation load is lower than a second set value in one period, and the writing operation load is lower than the second set value for M periods, wherein N and M are natural numbers larger than 1.
Optionally, the condition information of the solid state disk acquired by the GC condition detection module includes: the method comprises the steps of obtaining unused storage space of a storage array of the solid state disk, reading interference of the solid state disk and abrasion of the solid state disk.
Optionally, the method further comprises: and the response counting module is used for counting the response time from the access request entering the access queue to the access authority acquisition.
Optionally, when the response time of the access request is greater than a third set value, the response statistics module notifies the control module to process the access request.
Optionally, the GC transaction calculation module increases or decreases the priority of the garbage collection operation according to the size of the unused storage space of the storage array of the solid state disk, the read interference, and the wear condition.
According to the medium access management method of the solid state disk, garbage recovery operation is started after the read operation load and the write operation load of the solid state disk reach the preset conditions, so that the storage space can be cleaned in time when the load is light, and subsequent write operation cannot be influenced; the priority of the write operation and the garbage recycling operation is adjusted according to the condition information of the solid state disk, so that the response time of the write operation can be shortened, the emergency response of the write operation is accelerated, and the efficiency of the solid state disk is improved.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the control module classifies the access requests of the solid state disk, sets each requirement as an event, gives priority, and controls the access sequence according to the priority of the event when a plurality of events simultaneously request, thereby obtaining better I/O response and keeping in a lower oscillation interval.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the load counting module counts the read load and the write load of the solid state disk, compares the read load and the write load with the first preset condition, and when the solid state disk is judged to be light in load, the control module controls the corresponding module to execute the garbage collection operation, so that the load of the solid state disk is kept at a normal value, the solid state disk can have more time to keep higher performance, and the efficiency of the solid state disk is improved.
In the medium access management method of the solid state disk and the solid state disk provided by the invention, the response counting module counts the response time between the time when the access request enters the access queue and the time when the access request obtains the access authority, when the response time is continuously increased and reaches a third set value, the response counting module informs the control module to process the access request, so that the overall response speed of the access request of the solid state disk is improved, and the problem that the solid state disk cannot be continuously written due to firmware is also avoided.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the GC condition detection module and the GC transaction calculation module need to monitor the state information of the solid state disk and perform overall load calculation on garbage collection, judge whether the garbage collection operation needs to be started or stopped according to a second preset condition, or allocate the load proportion of the write operation and the garbage collection operation, or adjust the priority between the garbage collection operation and the write operation, and keep the reliability and the service life of the data of the solid state disk by generally considering the garbage collection scene.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
fig. 1 shows a structural diagram of a solid state disk according to an embodiment of the present invention;
fig. 2a shows a partial flowchart of a medium access management method of a solid state disk according to an embodiment of the present invention;
fig. 2b shows another partial flowchart of a medium access management method for a solid state disk according to an embodiment of the present invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, and procedures have not been described in detail so as not to obscure the present invention. The figures are not necessarily drawn to scale.
The flowcharts and block diagrams in the figures and block diagrams illustrate the possible architectures, functions, and operations of the systems, methods, and apparatuses according to the embodiments of the present invention, and may represent a module, a program segment, or merely a code segment, which is an executable instruction for implementing a specified logical function. It should also be noted that the executable instructions that implement the specified logical functions may be recombined to create new modules and program segments. The blocks of the drawings, and the order of the blocks, are thus provided to better illustrate the processes and steps of the embodiments and should not be taken as limiting the invention itself.
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples.
Fig. 1 shows a structural diagram of a solid state disk according to an embodiment of the present invention.
Referring to fig. 1, a solid state disk 100 of the present application includes a controller 110 and a storage array 120 (e.g., NAND-type flash memory). The controller 110 is used to control access requests and access sequences to the storage array 120, and the storage array 120 is used to store applications or data.
The controller 110 includes: the control module 111 is an overall control module for accessing the storage array 120, and is used for determining the priority of the access requests and controlling the access sequence of the access requests according to the priority. When a host or other unit is to access the storage array 120, it is necessary to apply access rights to the control module 111, different access requests have different priorities, the control module 111 gives access rights according to the priorities of the access requests, and the access to the storage array 120 is suspended without access rights until the access rights are granted.
In the multiple access requests, the control module 111 classifies the access requests, sets each request as an event, gives priority, and when multiple events request access rights at the same time, the control module 111 controls according to the priority of the access requests. The access requests enter the access queue after requesting the access authority, the access authority is obtained in the access queue according to the priority, and after the access authority is obtained, the corresponding access requests are taken out from the access queue to be executed.
And the load counting module 112 is connected with the control module 111 and is used for counting the read and write operation loads of the host or other units accessing the solid state disk at regular time. When counting that the reading operation is lower than a first set value in a counting period and continues for N (N is a natural number greater than 1) periods, considering that the reading operation load of the host or other units is lighter, otherwise, considering that the reading operation load of the host or other units is normal, and counting and clearing; and when the write operation is counted to be lower than a second set value in a counting period and lasts for M (M is a natural number larger than 1) periods, considering that the write operation load of the host or other units is lighter, otherwise, considering that the write operation load of the host or other units is normal, and clearing the count. If the load of the read operation and the write operation reaching the first preset condition is counted to be light, the control module 111 is notified that a Garbage Collection (GC) operation can be performed on the storage array 120.
In the module, the first preset condition includes that the read operation load and the write operation load are lower than a set value in a plurality of cycles at the same time, it is indicated that the load of the solid state disk 100 is light, garbage collection operation can be started at the same time, so that the load of the solid state disk 100 is always kept in a proper state, the solid state disk can be kept at a high performance for more time, the time special for garbage collection is saved, the access time ratio of an access request is correspondingly improved, and the access efficiency of the solid state disk is improved.
The load statistic module 112 may also be used to count the load of garbage collection operation, so as to facilitate the processing of access requests for reapplication of access rights.
The response counting module 113 is connected to the control module 111 and is configured to count response time of the host requirement, such as response time from when the access request applies for the access right or when the access request enters the access queue to when the access right is obtained. When the access request of the host or other unit applies for the access right, the control module 111 does not give the access right, and then enters the access queue and starts to count time. If the response time is continuously increased and reaches the third setting value, it is considered that the response of the access request is overtime, and the control module 111 needs to be notified to process, at this time, the access request applies for permission again, the control module 111 grants the access permission of the access request according to the load condition counted by the current load counting module 112, and after the access request obtains the access permission, counting is returned to zero.
Among these modules, the control module 111 can, for example, appropriately increase the priority of an access request for reapplication of access authority; or when the load of the read operation and the write operation is light, arranging the access authority of the access request; or when the priority of the garbage collection operation is lower, arranging the access right of the access request; or when the load proportion of the garbage collection operation is large, reducing the load proportion of the garbage collection operation for executing the access request, so that the access request can meet the requirement in time, and the solid state disk 100 obtains better I/O response and keeps a lower oscillation interval.
And a GC condition monitoring module 114 connected to the control module 111 and configured to monitor the status information of the solid state disk, and determine whether to start or stop a Garbage Collection (GC) operation according to a preset condition.
In this module, the monitored contents include a trigger event of the garbage collection operation, a suspension event of the garbage collection operation, a priority of the garbage collection operation, and the like. Specifically, there are various situations, such as the number of available free blocks in the storage array 120, the load condition of the solid state disk, and the like. The load condition of the solid state disk and the priority of the garbage collection operation monitored by the GC condition monitoring module 114 may help, for example, respond to the access request that requests for access right again in the statistics module 113 to access in time. Therefore, the events monitored by the GC condition monitoring module 114 are not limited to events related to garbage collection operations, but may be other events.
And the GC transaction calculation module 115 is connected to the control module 111 and the GC condition detection module 114, and is used for acquiring status information of the garbage collection operation and taking charge of performing overall calculation on the garbage collection operation. The status information of the garbage collection operation is acquired and comprises the priority of garbage collection and the load of garbage collection. In this embodiment, for example, the priority and load ratio of write operations to garbage collection operations when a host or other unit accesses the solid state disk are reallocated in consideration of the priority and load ratio of garbage collection operations. The garbage collection and the writing operation can be balanced, so that garbage collection can be carried out in time in an idle state, and meanwhile, the emergency requirement of the writing operation is met.
In this embodiment, the preset conditions for starting the garbage collection operation include, for example: the read operation load and the write operation load are light, the unused storage space in the storage array 120 is small (the available free blocks are small), the wear is balanced, the read interference exceeds the standard, and the like; the preset conditions for suspending the garbage collection operation include, for example: the number of available free blocks is large, the read operation load and the write operation load are normal, the response of the access request is overtime, and the like.
Furthermore, the priority of the garbage collection operation and the priority of the garbage collection operation in different states caused by different reasons are different, some of the garbage collection operations need quick response, such as exceeding the read interference and the like, and some of the garbage collection operations only need normal response; garbage collection operations for the same reason may also vary in priority at different times. For example, the garbage collection operation caused by less available free blocks has higher priority than the garbage collection operation caused by light load of read operation and write operation, and the garbage collection operation caused by less available free blocks has lower priority after a period of time along with the increase of available free blocks, so that the ratio of write operation and garbage collection operation can be better distributed, or the access authority of the access request can be adjusted, and the high performance of the solid state disk can be realized.
Fig. 2a shows a partial flowchart of a medium access management method of a solid state disk according to an embodiment of the present invention. Referring to fig. 2a, a method for managing media access of a solid state disk according to an embodiment of the present invention includes the following steps.
Step S101: applying for access rights and entering an access queue.
In this step, any host or other unit that wants to operate on the solid state disk 100 needs to apply for an access right to the solid state disk 100 first, and only after obtaining the access right, the solid state disk can be operated. After applying for the access right, the access request enters an access queue to wait for obtaining the access right.
In this embodiment, the access requests that need to operate on the solid state disk 100 are classified, each requirement is set as one access request, and priority is given. The access requests entering the access queue obtain access rights according to the priority.
Step S102: when the access request is executed, the attribute of the access request is obtained.
In this step, for example, when applying for access authority for a plurality of access requests at the same time, the priorities of the plurality of access requests are determined, and the access request with the higher priority first obtains the access authority and is taken out from the access queue to be executed. An access request with a low priority needs to wait first until access rights are obtained before being executed. If only one access request applies for the access right, the access right can be directly obtained to access the solid state disk.
During execution, the attribute of the access request needs to be acquired, wherein the attribute of the access request at least comprises an operation type, and the operation type comprises a read operation and a write operation.
In the solid state disk 100, the controller 110 and the storage array 120 are included, and the control module 111 in the controller 110 is configured to determine priorities of access requests, and prioritize a plurality of access requests according to the priorities of the access requests.
Step S103: and acquiring the read operation load and the write operation load of the solid state disk according to the attribute of the access request.
In this step, an access request, such as a read operation and a write operation, obtains access rights to access the solid state disk 100, and at this time, the load of the solid state disk is occupied, and the load of the read operation and the load of the write operation in one statistical period are counted. When the load of the read operation in one statistical period is lower than a first set value and N (N is a natural number greater than 1) periods continue, considering that the read operation load of the solid state disk is lighter, and otherwise, considering that the read operation load of the solid state disk is normal, and performing statistical zero clearing; and when the load of the write operation in one statistical period is lower than a second set value and M (M is a natural number greater than 1) periods continue, considering that the write operation load of the solid state disk is lighter, and otherwise, considering that the write operation load of the solid state disk is normal, and performing statistical zero clearing.
Step S104: and starting garbage collection operation according to the read operation load and the write operation load of the solid state disk, and acquiring the condition information of the solid state disk.
In this step, for example, when the read operation load and the write operation load of the solid state disk satisfy a first preset condition, the garbage collection operation is started, where the first preset condition is, for example, that the read operation load is light and the write operation load is light, and when the load size counted in a number of counting cycles of both the read operation and the write operation is lower than a set value, it indicates that both the read operation load and the write operation load of the solid state disk satisfy the first preset condition, and at this time, some other operations can be performed to increase the load, so that the solid state disk can maintain a higher performance most of the time. The garbage recycling operation does not affect the reading operation and the writing operation of the host, and meanwhile, the solid state disk can obtain a new usable space, so that the subsequent writing operation is facilitated. In addition, the garbage collection operation can be stopped at any time in most of time, so that the garbage collection operation is selected to be carried out when the read operation load and the write operation load of the solid state disk are lighter, and the application of the access authority of other access requests is not greatly influenced.
Further, the obtaining of the condition information of the solid state disk includes obtaining an unused storage space size of a storage array of the solid state disk, read interference of the solid state disk, a wear condition of the solid state disk, and the like. The obtaining of the status information of the solid state disk may further include other triggering events of the garbage collection operation, an abort event of the garbage collection operation, a priority of the garbage collection operation, and the like.
In this embodiment, the conditions for starting the garbage collection operation include: the read operation load and the write operation load of the solid state disk are lower than a first preset condition, the number of available idle blocks of the solid state disk is small, the abrasion is balanced, the read interference exceeds the standard, and the like; the conditions for suspending the garbage collection operation include, for example: the number of available free blocks is large, the read operation load and the write operation load are normal, the response of the access request is overtime, and the like. In the present application, the description of the embodiment is made by taking an example that the read operation load and the write operation load of the solid state disk are lower than the first preset condition, but the present application is not limited to this example, and a person skilled in the art can easily think of an embodiment by taking a start condition of another garbage collection operation of the solid state disk as an example.
In addition, after the garbage collection operation is started, the status information of the garbage collection operation in the solid state disk needs to be monitored and calculated in real time, and the status information of the garbage collection operation at least comprises the priority of the garbage collection operation and the load size.
Step S105: and adjusting the priority between the writing operation and the garbage collection operation according to the condition information of the solid state disk.
And according to the condition information of the solid state disk, allocating the priority between the write operation and the garbage collection operation in the solid state disk, so that the efficiency of the solid state disk is in a high-performance state.
In the embodiment, when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and wear conditions meets a second preset condition, the priority of garbage collection operation is increased; and when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and abrasion meets a third preset condition, the priority of garbage collection operation is reduced.
In this embodiment, the second preset condition is that, for example, the available free blocks of the solid state disk are lower than a fourth predetermined value, or the read interference exceeds a fifth predetermined value, or the wear condition exceeds a sixth predetermined value, at this time, the priority of the garbage collection operation needs to be increased, so that the load ratio of garbage collection is increased, and more available free blocks are obtained; the third preset condition is that the available free blocks of the solid state disk are higher than a seventh preset value, or the read interference is lower than an eighth preset value, or the wear condition is lower than a ninth preset value, at this time, the ratio of garbage collection can be reduced by reducing the priority of garbage collection, and the ratio of write operation can be improved.
Fig. 2b shows another partial flowchart of a medium access management method for a solid state disk according to an embodiment of the present invention. The flowchart shown in fig. 2b is a flowchart waiting for acquiring the application right. Referring to fig. 2b, the process includes the following steps.
Step S101: applying for access rights and entering an access queue.
When a host or other units need to access the solid state disk, the host or other units need to apply for access authority to the solid state disk, and the solid state disk can be accessed only after the access authority is obtained. After applying for the access right, the access request enters an access queue to wait for obtaining the access right.
Step S111: and counting the response time from entering the access queue to obtaining the access right.
The access requests simultaneously apply for the access authority, the access requests with lower priority can not immediately obtain the access authority, and the access requests with lower priority can only be accessed after the access of the access requests with higher priority is finished. The access authority is applied or the access queue is entered from the access request of the host or other units, and the timing is started when the control module 111 of the solid state disk does not give the access authority, and the time from the application of the access authority to the acquisition of the access authority of the access request is recorded and is recorded as the response time.
Step S112: and applying for access right again when the response time reaches a third set value.
The response time continues to increase, and the response counting module 113 determines whether the response time meets a set condition, and if the response time meets the set condition, executes step S114. In this embodiment, the setting condition is, for example, a third setting value, and when the response time reaches the third setting value, it is considered that the response is overtime, and the control module 111 needs to be notified to perform processing.
And at the moment, the access authority needs to be applied again by increasing the priority of the access request, or reducing the priority of the garbage collection operation, or reducing the ratio of the garbage collection operation, so as to ensure that the access authority is obtained before the response time exceeds a third set value after the access authority is applied again.
Step S113: the corresponding access request is executed.
For the access request for reapplication of the access authority, the priority is improved, and meanwhile, the access request can be processed preferentially, so that the problem of response timeout of the access request under most conditions can be solved, and the emergency requirement of corresponding write operation is met. However, there are other problems, for example, the priority of the accessing event is higher than that of the access request for reapplying the access right, and at this time, the access request can be processed through the monitored and calculated status information of the solid state disk, for example, garbage collection operation is reduced or suspended for the access of the access request under the condition that there are many available free blocks of the solid state disk, so as to ensure that the access request can obtain the access right in time.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the control module classifies the access requests of the solid state disk, sets each requirement as an event, gives priority, and controls the access sequence according to the priority of the event when a plurality of events simultaneously request, thereby obtaining better I/O response and keeping in a lower oscillation interval.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the load counting module counts the read operation load and the write operation load of the solid state disk, compares the read operation load and the write operation load with the first preset condition, and when the solid state disk load is judged to be lighter, the control module controls the corresponding module to execute the garbage collection operation, so that the load of the solid state disk is kept at a normal value, the solid state disk can have more time to keep higher performance, and the efficiency of the solid state disk is improved.
In the medium access management method of the solid state disk and the solid state disk provided by the invention, the response counting module counts the response time between the time when the access request enters the access queue and the time when the access request obtains the access authority, when the response time is continuously increased and reaches a third set value, the response counting module informs the control module to process the access request, so that the overall response speed of the access request of the solid state disk is improved, and the problem that the solid state disk cannot be continuously written due to firmware is also avoided.
In the method for managing the medium access of the solid state disk and the solid state disk provided by the invention, the GC condition detection module and the GC transaction calculation module need to monitor the state information of the solid state disk and perform overall load calculation on garbage collection, judge whether the garbage collection operation needs to be started or stopped according to a second preset condition, or allocate the load proportion of the write operation and the garbage collection operation, or adjust the priority between the garbage collection operation and the write operation, and keep the reliability and the service life of the data of the solid state disk by generally considering the garbage collection scene.
While embodiments in accordance with the invention have been described above, these embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. The invention is limited only by the claims and their full scope and equivalents.

Claims (13)

1. A medium access management method of a solid state disk comprises the following steps:
when an access request is taken out of an access queue for execution, acquiring the attribute of the access request, wherein the attribute of the access request at least comprises an operation type, and the operation type comprises a read operation and a write operation;
acquiring a read operation load and a write operation load of the solid state disk according to the attribute of the access request;
starting garbage recycling operation according to the read operation load and the write operation load of the solid state disk, and acquiring the condition information of the solid state disk; and
and adjusting the priority between the writing operation and the garbage collection operation according to the condition information of the solid state disk.
2. The medium access management method according to claim 1, wherein the step of starting a garbage collection operation according to a read operation load and a write operation load of the solid state disk comprises:
counting the read operation load and the write operation load of the solid state disk;
when the read operation load and the write operation load are lower than a first preset condition, starting garbage recycling operation,
wherein the load of the read operation and the load of the write operation are lower than a first preset condition, and the load of the read operation and the load of the write operation comprise:
the reading operation load is lower than a first set value in a statistical period, and the reading operation load is lower than the first set value for N periods; and
the write operation load is lower than a second set value within one statistical period, and the write operation load is lower than the second set value for M periods,
n and M are natural numbers greater than 1.
3. The medium access management method according to claim 1, wherein the status information of the solid state disk comprises:
the size of unused storage space of the storage array of the solid state disk is reduced;
read interference of the solid state disk; and
wear and tear of the solid state disk.
4. The medium access management method according to claim 3, wherein adjusting the priority between the write operation and the garbage collection operation according to the status information of the solid state disk comprises:
when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and abrasion meets a second preset condition, the priority of the garbage recycling operation is improved;
and when at least one of the size of unused storage space of the storage array of the solid state disk, read interference and wear conditions meets a third preset condition, the priority of the garbage collection operation is reduced.
5. The medium access management method according to claim 1, further comprising, before the step of taking out the access request from the access queue for execution:
the access request applies for access right and enters an access queue;
and obtaining the access right in the access queue according to the priority of the access request.
6. The medium access management method of claim 5, wherein the access request applies for access right and enters the access queue and gets access right in the access queue according to the priority of the access request, further comprising:
counting the response time from the time when the access request enters the access queue to the time when the access right is obtained;
judging whether the response time is greater than a third set value;
and if the access authority is larger than the third set value, the access request obtains the access authority.
7. The medium access management method according to claim 6, wherein the step of causing the access request to obtain access rights comprises:
the access request applies for access right again;
and adjusting the priority of the access request or suspending part of garbage collection operation so as to enable the access request to obtain access authority.
8. A solid state disk, comprising:
the storage array is used for storing application programs and data;
a controller connected to the storage array and used for accessing the total control of the storage array,
wherein the controller includes:
the control module is connected with the storage array and used for judging the priority and the access sequence of the access request;
the load counting module is connected with the control module and used for acquiring a read operation load and a write operation load of the solid state disk;
the GC condition detection module is connected with the control module and used for acquiring the condition information of the solid state disk;
a GC affair calculation module which is connected with the GC condition detection module and the control module and is used for adjusting the priority between the write operation and the garbage recovery operation according to the status information of the solid state disk,
the load counting module starts garbage collection operation when the read operation load and the write operation load meet a first preset condition.
9. The solid state disk of claim 8, wherein the first predetermined condition comprises:
the reading operation load is lower than a first set value in one period, and the reading operation load is lower than the first set value for N periods;
the write operation load is lower than a second set value in one period, and the write operation load is lower than the second set value for M periods,
wherein N and M are natural numbers greater than 1.
10. The solid state disk of claim 8, wherein the condition information of the solid state disk acquired by the GC condition detection module includes: the method comprises the steps of obtaining unused storage space of a storage array of the solid state disk, reading interference of the solid state disk and abrasion of the solid state disk.
11. The solid state disk of claim 8, further comprising:
and the response counting module is used for counting the response time from the access request entering the access queue to the access authority acquisition.
12. The solid state disk of claim 11, wherein the response statistics module notifies the control module to process the access request when the response time of the access request is greater than a third set value.
13. The solid state disk of claim 10, wherein the GC transaction calculation module increases or decreases the priority of the garbage collection operation according to an unused storage space size of a storage array of the solid state disk, read interference, and wear.
CN202110868814.7A 2021-07-30 2021-07-30 Solid state disk and medium access management method thereof Pending CN113778821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110868814.7A CN113778821A (en) 2021-07-30 2021-07-30 Solid state disk and medium access management method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110868814.7A CN113778821A (en) 2021-07-30 2021-07-30 Solid state disk and medium access management method thereof

Publications (1)

Publication Number Publication Date
CN113778821A true CN113778821A (en) 2021-12-10

Family

ID=78836423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110868814.7A Pending CN113778821A (en) 2021-07-30 2021-07-30 Solid state disk and medium access management method thereof

Country Status (1)

Country Link
CN (1) CN113778821A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1952916A (en) * 2006-11-28 2007-04-25 北京中星微电子有限公司 An arbitration device and method for accessing internal storage
CN107967224A (en) * 2017-10-12 2018-04-27 记忆科技(深圳)有限公司 A kind of method of solid state hard disc improving performance uniformity
CN108595112A (en) * 2018-03-14 2018-09-28 深圳忆联信息系统有限公司 A kind of the SSD rubbish recovering methods and solid state disk of optimization trigger mechanism
CN109726137A (en) * 2017-10-27 2019-05-07 华为技术有限公司 Management method, controller and the solid state hard disk of solid state hard disk garbage reclamation task
CN109857337A (en) * 2018-12-10 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of writing speed control method, system, device and readable storage medium storing program for executing
CN111078134A (en) * 2019-10-18 2020-04-28 苏州浪潮智能科技有限公司 Method, apparatus, and medium for adjusting concurrent amount of garbage reclamation in a storage array
CN111090398A (en) * 2019-12-13 2020-05-01 北京浪潮数据技术有限公司 Garbage recycling method, device and equipment for solid state disk and readable storage medium
CN111813343A (en) * 2020-07-16 2020-10-23 济南浪潮数据技术有限公司 Solid state disk garbage recovery method, system and related components
CN111913649A (en) * 2019-05-09 2020-11-10 深圳大普微电子科技有限公司 Data processing method and device for solid state disk

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1952916A (en) * 2006-11-28 2007-04-25 北京中星微电子有限公司 An arbitration device and method for accessing internal storage
CN107967224A (en) * 2017-10-12 2018-04-27 记忆科技(深圳)有限公司 A kind of method of solid state hard disc improving performance uniformity
CN109726137A (en) * 2017-10-27 2019-05-07 华为技术有限公司 Management method, controller and the solid state hard disk of solid state hard disk garbage reclamation task
CN108595112A (en) * 2018-03-14 2018-09-28 深圳忆联信息系统有限公司 A kind of the SSD rubbish recovering methods and solid state disk of optimization trigger mechanism
CN109857337A (en) * 2018-12-10 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of writing speed control method, system, device and readable storage medium storing program for executing
CN111913649A (en) * 2019-05-09 2020-11-10 深圳大普微电子科技有限公司 Data processing method and device for solid state disk
CN111078134A (en) * 2019-10-18 2020-04-28 苏州浪潮智能科技有限公司 Method, apparatus, and medium for adjusting concurrent amount of garbage reclamation in a storage array
CN111090398A (en) * 2019-12-13 2020-05-01 北京浪潮数据技术有限公司 Garbage recycling method, device and equipment for solid state disk and readable storage medium
CN111813343A (en) * 2020-07-16 2020-10-23 济南浪潮数据技术有限公司 Solid state disk garbage recovery method, system and related components

Similar Documents

Publication Publication Date Title
Jung et al. HIOS: A host interface I/O scheduler for solid state disks
US9298372B2 (en) System and method for managing storage system snapshots
US8589625B2 (en) Scheduling of reconstructive I/O read operations in a storage environment
US8424007B1 (en) Prioritizing tasks from virtual machines
US8793427B2 (en) Remote memory for virtual machines
US20170255414A1 (en) Intelligent wide port phy usage
CN102541460B (en) Multiple disc management method and equipment
EP2881864A1 (en) Computer system, storage management computer, and storage management method
CN106569891B (en) Method and device for scheduling and executing tasks in storage system
CN107273200B (en) Task scheduling method for heterogeneous storage
US20080147960A1 (en) Storage apparatus and data management method using the same
US20140115016A1 (en) Systems and methods for enabling parallel processing of write transactions
US20130254562A1 (en) Power arbitration for storage devices
US9201598B2 (en) Apparatus and method for sharing resources between storage devices
CN108932112B (en) Data read-write method, device, equipment and medium for solid particles
CN114968839A (en) Hard disk garbage recycling method, device and equipment and computer readable storage medium
WO2013061368A1 (en) Storage apparatus and method of controlling storage apparatus
US11403211B2 (en) Storage system with file priority mechanism and method of operation thereof
CN113778821A (en) Solid state disk and medium access management method thereof
EP3293625B1 (en) Method and device for accessing file, and storage system
CN109426563B (en) Process management method and device
CN116225686A (en) CPU scheduling method and system for hybrid memory architecture
JP2002278778A (en) Scheduling device in symmetrical multiprocessor system
US10783096B2 (en) Storage system and method of controlling I/O processing
US11030007B2 (en) Multi-constraint dynamic resource manager

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
CB02 Change of applicant information

Address after: 310051 room c1-604, building C, No. 459, Qianmo Road, Xixing street, Binjiang District, Hangzhou, Zhejiang Province

Applicant after: Lianyun Technology (Hangzhou) Co.,Ltd.

Address before: 6 / F, block C1, spotlight center, 459 Qianmo Road, Binjiang District, Hangzhou City, Zhejiang Province, 310051

Applicant before: MAXIO TECHNOLOGY (HANGZHOU) Ltd.

CB02 Change of applicant information