CN107704194B - Lock-free IO processing method and device - Google Patents

Lock-free IO processing method and device Download PDF

Info

Publication number
CN107704194B
CN107704194B CN201610644949.4A CN201610644949A CN107704194B CN 107704194 B CN107704194 B CN 107704194B CN 201610644949 A CN201610644949 A CN 201610644949A CN 107704194 B CN107704194 B CN 107704194B
Authority
CN
China
Prior art keywords
request
thread
storage
command
logical address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610644949.4A
Other languages
Chinese (zh)
Other versions
CN107704194A (en
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.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology Co 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 Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN201610644949.4A priority Critical patent/CN107704194B/en
Priority to CN202010643795.3A priority patent/CN111679795B/en
Priority to PCT/CN2017/096152 priority patent/WO2018028529A1/en
Publication of CN107704194A publication Critical patent/CN107704194A/en
Application granted granted Critical
Publication of CN107704194B publication Critical patent/CN107704194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an IO (input/output) request processing method and device of a storage system. The storage system includes a plurality of virtual storage disks, the virtual storage disks including a plurality of logical address regions. The disclosed IO request processing method comprises the following steps: receiving a first IO request, wherein the first IO request accesses a first logical address region; and determining a first thread according to the first logic address area, and enabling the first thread to process the first IO request. The embodiment of the invention can ensure that all CPUs can work fully and concurrently on the premise of ensuring the reliability of data, fully exert the performance of the solid-state drive and ensure the linear expandability of the system performance.

Description

Lock-free IO processing method and device
Technical Field
The present invention relates to a storage system technology, and in particular, to an IO request processing method and apparatus for a storage system.
Background
The Solid State Drive (SSD) is fabricated using a semiconductor storage medium and has superior read and write performance. However, despite the high performance of SSD drives, data reliability and cost of SSD drives limit the popularity of SSD disks. In the prior art, a RAID (Redundant Array of Independent Disks) technology is adopted to ensure the reliability of the data of the SSD drive, and the usage efficiency of the SSD drive is also improved, thereby reducing the cost.
However, RAID technology lengthens IO paths and increases computational overhead. To fully exploit the performance of multi-block SSD drives, multi-core multi-CPU technology is currently commonly employed. It is possible to achieve the data protection and high performance goals as long as the respective CPUs are allowed to concurrently process IO request requests as much as possible. However, there is a relationship between read requests, write requests, and reconstruction requests for the same stripe on the same RAID Array, and there is a dependency on some management control requests of the RAID Array, that is, synchronous and mutually exclusive access to shared resources is required.
Currently, there is no unified approach to resolve synchronization and mutual exclusion between related requests on a RAID Array. Most implementations create a separate thread for each RAID Array, dedicated to handling management control requests, as well as read, write, and reconstruct requests, associated with that Array. However, when a RAID system creates thousands of RAID arrays in a resource pool composed of SSD drives, if this method is adopted, thousands of threads will be created, resulting in huge memory overhead. Moreover, the overhead of thread scheduling and switching can cause a drastic drop in CPU efficiency.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, the above-mentioned problems with the related art.
According to a first aspect of the present invention, there is provided an IO request processing method for a storage system according to the first aspect of the present invention, where the storage system includes a plurality of virtual storage disks, and a virtual storage disk includes a plurality of logical address areas, the method including: receiving a first IO request, wherein the first IO request accesses a first logical address region; and determining a first thread according to the first logic address area, and enabling the first thread to process the first IO request.
According to an IO request processing method of a storage system of a first aspect of the present invention, there is provided an IO request processing method of a second storage system of a first aspect of the present invention, where logical addresses of the plurality of logical address regions do not overlap with each other, the method further including: receiving a second IO request, wherein the second IO request accesses a second logical address region; and determining a second thread according to the second logic address area, and enabling the second thread to process the second IO request.
According to an IO request processing method of a storage system of a first aspect of the present invention, there is provided an IO request processing method of a third storage system of the first aspect of the present invention, where the determining a first thread according to a first logical address region so that the first thread processes the first IO request includes: and generating a first IO command according to the first IO request, filling the first IO command into a first queue corresponding to a first thread according to the first logic address area, and taking out the first IO command from the first queue and processing the first IO command by the first thread, wherein the first thread only processes the commands of the first queue.
According to an IO request processing method of a storage system of a first aspect of the present invention, there is provided an IO request processing method of a fourth storage system of the first aspect of the present invention, determining a second thread according to a second logical address region, and enabling the second thread to process the second IO request includes: and generating a second IO command according to the second IO request, filling the second IO command into a second queue corresponding to a second thread according to a second logic address region, taking out the second IO command from the second queue by the second thread, and processing the second IO command, wherein the second thread only processes the commands of the second queue.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided an IO request processing method of a fifth storage system according to the first aspect of the present invention, further including: taking the result of taking the modulus of the index of the first logic address area to the number of the threads as the index of the first thread; or the result of taking the index of the second logical address region modulo the number of threads is the index of the second thread.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided an IO request processing method of a sixth storage system according to the first aspect of the present invention, further including: calculating hash of the index of the first logic address area to obtain the index of the first thread; or calculating the index of the second logic address area by hash to obtain the index of the second thread.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided a seventh IO request processing method of the storage system of the first aspect of the present invention, further including: taking the result of the modulus of the index of the first logic address area to the number of the threads as the index of the first queue; or the result of taking the index of the second logical address region modulo the number of threads is the index of the second queue.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided an IO request processing method of an eighth storage system according to the first aspect of the present invention, further including: calculating hash of the index of the first logic address area to obtain the index of the first queue; or calculating the hash of the index of the second logic address area to obtain the index of the second queue.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the ninth storage system of the first aspect of the present invention, further including: determining a first mapping table entry according to the first logic address area; the first thread accesses a first mapping table entry, acquires a first storage object from the first mapping table entry according to a first logical address accessed by a first IO request, and accesses the first storage object to process the first IO request.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the tenth storage system of the first aspect of the present invention, further including: determining a second mapping table entry according to the second logic address area; and the second thread accesses a second mapping table entry, acquires a second storage object from the second mapping table entry according to a second logical address accessed by a second IO request, and accesses the second storage object to process the second IO request.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the eleventh storage system according to the first aspect of the present invention, further including: taking the result of the modulus of the index of the first logic address area to the number of the table items of the mapping table as the index of the table item of the first mapping table; or calculating hash to the index of the first logic address area to obtain the index of the table entry of the first mapping table.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the twelfth storage system of the first aspect of the present invention, further including: taking the result of the modulus of the index of the second logic address area to the number of the table items of the mapping table as the index of the table items of the second mapping table; or calculating hash to the index of the second logic address area to obtain the index of the second mapping table entry.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the thirteenth storage system of the first aspect of the present invention, further including: if the storage object cannot be obtained from the first mapping table entry, for a write request in the IO request, a third storage object is created, the third storage object is recorded in the first mapping table entry, and data is written into the third storage object.
According to the IO request processing method of the storage system of the first aspect of the present invention, there is provided the IO request processing method of the fourteenth storage system of the first aspect of the present invention, further including: if the storage object cannot be obtained from the second mapping table entry, for the write request in the IO request, a fourth storage object is created, the fourth storage object is recorded in the second mapping table entry, and data is written into the fourth storage object.
According to a second aspect of the present invention, there is provided an IO request processing method of a storage system according to the second aspect of the present invention, the storage system including a plurality of virtual storage disks, a virtual storage disk including a plurality of logical address areas, the method including: receiving a first IO request; generating a first IO command and a second IO command according to the first IO request, wherein the first IO command accesses the first logic address area, and the second IO command accesses the second logic address area; determining a first thread according to the first logic address area, and enabling the first thread to process the first IO command; and determining a second thread according to the second logic address area, and enabling the second thread to process the second IO command.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided the IO request processing method of the second storage system according to the second aspect of the present invention, further including: filling the first IO command into a first queue corresponding to a first thread according to the first logical address area, wherein the first thread takes out the first queue and processes the first IO command, and only processes the commands of the first queue; and filling the second IO command into a second queue corresponding to the second thread according to the second logical address area, and taking out and processing the second IO command from the second queue by the second thread, wherein the second thread only processes the commands in the second queue.
According to an IO request processing method of a storage system of a second aspect of the present invention, there is provided an IO request processing method of a third storage system according to the second aspect of the present invention, further including: determining a first mapping table entry according to the first logic address area; the first thread accesses a first mapping table entry, acquires a first storage object from the first mapping table entry according to a first logical address accessed by a first IO command, and accesses the first storage object to process the first IO command.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided an IO request processing method of a fourth storage system according to the second aspect of the present invention, further including: determining a second mapping table entry according to the second logic address area; and the second thread accesses a second mapping table entry, acquires a second storage object from the second mapping table entry according to a second logical address accessed by a second IO command, and accesses the second storage object to process the second IO command.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided an IO request processing method of a fifth storage system according to the second aspect of the present invention, further including: taking the result of the modulus of the index of the first logic address area to the number of the table items of the mapping table as the index of the table item of the first mapping table; or calculating hash to the index of the first logic address area to obtain the index of the table entry of the first mapping table.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided an IO request processing method of a sixth storage system according to the second aspect of the present invention, further including: taking the result of the modulus of the index of the second logic address area to the number of the table items of the mapping table as the index of the table items of the second mapping table; or calculating hash to the index of the second logic address area to obtain the index of the second mapping table entry.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided a seventh IO request processing method of the storage system according to the second aspect of the present invention, wherein, for a write request in the IO request, a third storage object is created, the third storage object is recorded in the first mapping table entry, and data is written to the third storage object.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided an eighth IO request processing method of the storage system according to the second aspect of the present invention, wherein, for a write request in the IO request, a fourth storage object is created, the fourth storage object is recorded in the second mapping table entry, and data is written to the fourth storage object.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided the IO request processing method of the ninth storage system according to the second aspect of the present invention, wherein the number of the mapping table entries is an integer multiple of the number of threads that process the IO commands.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided the IO request processing method of the tenth storage system according to the second aspect of the present invention, further including: and if the storage object cannot be obtained from the table entry of the first mapping table, returning a result indicating that the read request is abnormal for the read request in the IO request.
According to an IO request processing method of a storage system of a second aspect of the present invention, there is provided an IO request processing method of an eleventh storage system according to the second aspect of the present invention, further including: and if the storage object cannot be obtained from the table entry of the second mapping table, returning a result indicating that the read request is abnormal to the read request in the IO request.
According to the IO request processing method of the storage system of the second aspect of the present invention, there is provided the IO request processing method of the twelfth aspect of the present invention, wherein the first thread is executed only by the first CPU, and the second thread is executed only by the second CPU.
According to a third aspect of the present invention, there is provided an IO request processing apparatus of a storage system according to the third aspect of the present invention, the storage system including a plurality of virtual storage disks, a virtual storage disk including a plurality of logical address areas, the apparatus including: a first receiving module, configured to receive a first IO request, where the first IO request accesses a first logical address region; and the first processing module is used for determining a first thread according to the first logic address area so that the first thread processes the first IO request.
According to the IO request processing apparatus of the storage system of the third aspect of the present invention, there is provided the IO request processing apparatus of the second storage system of the third aspect of the present invention, wherein logical addresses of the plurality of logical address regions do not overlap with each other, the first receiving module is further configured to receive a second IO request, where the second IO request accesses the second logical address region; the first processing module is further configured to determine a second thread according to the second logical address area, so that the second thread processes the second IO request.
According to the IO request processing apparatus of the storage system of the third aspect of the present invention, there is provided the IO request processing apparatus of the third storage system of the third aspect of the present invention, the first processing module is configured to generate a first IO command according to the first IO request, and fill the first IO command into a first queue corresponding to a first thread according to the first logical address region, and the first thread fetches out from the first queue and processes the first IO command, where the first thread processes only commands of the first queue.
According to the IO request processing apparatus of the storage system of the third aspect of the present invention, there is provided the IO request processing apparatus of the fourth storage system of the third aspect of the present invention, the first processing module is configured to generate a second IO command according to the second IO request, and fill the second IO command into a second queue corresponding to a second thread according to the second logical address region, and the second thread takes out the second IO command from the second queue and processes the second IO command, where the second thread processes only commands in the second queue.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides an IO request processing apparatus of a fifth storage system according to the third aspect of the present invention, further including: the first index calculation module is used for taking the result of the modulus of the index of the first logic address area to the number of the threads as the index of the first thread; or the result of taking the index of the second logical address region modulo the number of threads is the index of the second thread.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the sixth storage system according to the third aspect of the present invention, further including: the second index calculation module is used for calculating the hash of the index of the first logic address area to obtain the index of the first thread; or calculating the index of the second logic address area by hash to obtain the index of the second thread.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the seventh storage system according to the third aspect of the present invention, further including: the third index calculation module is used for taking the result of the modulus of the index of the first logic address area to the number of the threads as the index of the first queue; or the result of taking the index of the second logical address region modulo the number of threads is the index of the second queue.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of an eighth storage system according to the third aspect of the present invention, further including: the fourth index calculation module is used for calculating the hash of the index of the first logic address area to obtain the index of the first queue; or calculating the hash of the index of the second logic address area to obtain the index of the second queue.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the ninth storage system according to the third aspect of the present invention, further including: the first mapping table determining module is used for determining a first mapping table entry according to the first logic address area; the first processing module is further configured to access a first mapping table entry through the first thread, obtain a first storage object from the first mapping table entry according to a first logical address accessed by the first IO request, and access the first storage object to process the first IO request.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the tenth storage system according to the third aspect of the present invention, further including: the second mapping table determining module is used for determining a second mapping table entry according to the second logic address area; the first processing module is further configured to access a second mapping table entry through the second thread, obtain a second storage object from the second mapping table entry according to a second logical address accessed by a second IO request, and access the second storage object to process the second IO request.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the eleventh storage system according to the third aspect of the present invention, further including: a fifth index calculation module, configured to use a result obtained by modulo the number of the table entries of the mapping table by the index of the first logical address area as an index of the table entry of the first mapping table; or calculating hash to the index of the first logic address area to obtain the index of the table entry of the first mapping table.
An IO request processing apparatus of a storage system according to a third aspect of the present invention provides the IO request processing apparatus of the twelfth storage system according to the third aspect of the present invention, further including: a sixth index calculation module, configured to obtain a result of modulo the number of table entries of the mapping table by the index of the second logical address area as an index of the table entry of the second mapping table; or calculating hash to the index of the second logic address area to obtain the index of the second mapping table entry.
According to the IO request processing apparatus of the storage system according to the third aspect of the present invention, there is provided the IO request processing apparatus of the thirteenth storage system according to the third aspect of the present invention, where the first processing module is further configured to, when a storage object cannot be obtained from the first mapping table entry, create a third storage object for a write request in the IO request, record the third storage object in the first mapping table entry, and write data to the third storage object.
According to the IO request processing apparatus of the storage system according to the third aspect of the present invention, there is provided the IO request processing apparatus of the fourteenth storage system according to the third aspect of the present invention, where the first processing module is further configured to, when a storage object cannot be obtained from the second mapping table entry, create a fourth storage object for a write request in the IO request, record the fourth storage object in the second mapping table entry, and write data to the fourth storage object.
According to a fourth aspect of the present invention, there is provided an IO request processing apparatus of a storage system according to the fourth aspect of the present invention, the storage system including a plurality of virtual storage disks, a virtual storage disk including a plurality of logical address areas, the apparatus including: the second receiving module is used for receiving the first IO request; the second processing module is used for generating a first IO command and a second IO command according to the first IO request, wherein the first IO command accesses the first logic address area, the second IO command accesses the second logic address area, and the first thread is determined according to the first logic address area so that the first thread processes the first IO command; and determining a second thread according to the second logic address area, and enabling the second thread to process the second IO command.
According to an IO request processing apparatus of a storage system of a fourth aspect of the present invention, there is provided an IO request processing apparatus of a second storage system of the fourth aspect of the present invention, wherein the second processing module is configured to fill a first queue corresponding to a first thread with a first IO command according to the first logical address region, the first thread takes out and processes the first IO command from the first queue, wherein the first thread only processes commands of the first queue, and fill a second IO command to a second queue corresponding to a second thread according to the second logical address region, the second thread takes out and processes the second IO command from the second queue, and wherein the second thread only processes commands of the second queue.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the third storage system according to the fourth aspect of the present invention, further including: the third mapping module is used for determining a table entry of a first mapping table according to the first logic address area; the second processing module is further configured to access a first mapping table entry through the first thread, obtain a first storage object from the first mapping table entry according to a first logical address accessed by the first IO command, and access the first storage object to process the first IO command.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the fourth storage system according to the fourth aspect of the present invention, further including: the fourth mapping module is used for determining a second mapping table entry according to the second logic address area; the second processing module is further configured to access a second mapping table entry through the second thread, obtain a second storage object from the second mapping table entry according to a second logical address accessed by a second IO command, and access the second storage object to process the second IO command.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the fifth storage system according to the fourth aspect of the present invention, further including: a seventh index calculation module, configured to obtain a result of modulo the number of table entries of the mapping table by the index of the first logical address area as an index of the table entry of the first mapping table; or calculating hash to the index of the first logic address area to obtain the index of the table entry of the first mapping table.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the sixth storage system according to the fourth aspect of the present invention, further including: an eighth index calculation module, configured to obtain a result of modulo the number of table entries of the mapping table by the index of the second logical address area as an index of the table entry of the second mapping table; or calculating hash to the index of the second logic address area to obtain the index of the second mapping table entry.
According to an IO request processing apparatus of a storage system of a fourth aspect of the present invention, there is provided the IO request processing apparatus of a seventh storage system of the fourth aspect of the present invention, wherein, for a write request in the IO request, a third storage object is created, and the third storage object is recorded in the first mapping table entry, and data is written to the third storage object.
According to the IO request processing apparatus of the storage system of the fourth aspect of the present invention, there is provided the IO request processing apparatus of the eighth storage system of the fourth aspect of the present invention, wherein, for a write request in the IO request, a fourth storage object is created, and the fourth storage object is recorded in the second mapping table entry, and data is written to the fourth storage object.
According to the IO request processing apparatus of the storage system of the fourth aspect of the present invention, there is provided the IO request processing apparatus of the ninth storage system of the fourth aspect of the present invention, wherein the number of mapping entries is an integer multiple of the number of threads that process IO commands.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the tenth storage system according to the fourth aspect of the present invention, further including: the second processing module is further configured to, if the storage object cannot be obtained from the first mapping table entry, return a result indicating that the read request is abnormal to the read request in the IO request.
An IO request processing apparatus of a storage system according to a fourth aspect of the present invention provides the IO request processing apparatus of the eleventh storage system according to the fourth aspect of the present invention, further including: the second processing module is further configured to, if the storage object cannot be obtained from the second mapping table entry, return a result indicating that the read request is abnormal to the read request in the IO request.
According to the IO request processing apparatus of the storage system of the fourth aspect of the present invention, there is provided the IO request processing apparatus of the twelfth storage system of the fourth aspect of the present invention, wherein the first thread is executed only by the first CPU, and the second thread is executed only by the second CPU.
According to a fifth aspect of the present invention, there is provided a computer program comprising computer program code which, when loaded into a computer system and executed thereon, causes the computer system to perform the IO request processing method of the storage system provided according to the first to second aspects of the present invention.
According to a sixth aspect of the present invention, there is provided a program including program code which, when loaded into and executed on a storage system, causes the storage system to perform the IO request processing method of the storage system provided according to the first to second aspects of the present invention.
According to the embodiment of the invention, the logic address space of the virtual storage disk is divided into a plurality of regions which are not overlapped, and an IO request of one region is processed by a corresponding thread. And the two threads are prevented from processing IO requests of the same region. Embodiments of the invention have the following advantages: on the premise of ensuring the reliability of data, all CPUs can be completely concurrent, and the high performance of the solid state disk is fully exerted; ensuring linear scalability of system performance; the dynamic configuration can be performed according to the performance requirement and the use requirement of resources such as CPU, memory and the like.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 illustrates an architecture of a storage system according to an embodiment of the invention;
FIG. 2 illustrates a structure of a storage object according to an embodiment of the invention;
FIG. 3 illustrates a structure of a storage object according to yet another embodiment of the present invention;
FIG. 4 is a schematic diagram of a lock-free IO request processing model according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a mapping of a logical address space of a virtual storage disk to storage objects according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a mapping of a logical address space of a virtual storage disk to storage objects according to another embodiment of the present invention;
FIG. 7 is a schematic diagram of a logical address area of a virtual storage disk according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a logical address area of a virtual storage disk according to another embodiment of the present invention;
FIG. 9 is a flow diagram of IO request processing for a storage system according to an embodiment of the present invention;
FIG. 10 is a flow diagram of the distribution of IO requests to IO processing threads in accordance with an embodiment of the present invention; and
FIG. 11 is a flow diagram of an IO processing thread processing an IO request according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
FIG. 1 illustrates an architecture of a storage system according to an embodiment of the invention. A storage system according to the present invention includes a computer or server (collectively referred to as a host) and a plurality of storage devices (e.g., drives) coupled to the host. Preferably, the drive is a Solid State Drive (SSD). Optionally, a disk drive may also be included in embodiments consistent with the present invention.
The storage resources provided by the various drives are maintained by a pool of storage resources. The storage resource pool records data blocks or data chunks (chunks) in each drive. By way of example, a data chunk is a plurality of data chunks that are contiguous in logical space or physical space in a drive of a predetermined size. The size of a data chunk may be, for example, hundreds of KB (kilobytes) or MB (megabytes). Optionally, recorded in the storage resource are data blocks or data chunks in the respective drives that have not been allocated to the storage object, which are also referred to as free data blocks or free data chunks. Storage resource pools are also a virtualization technique to virtualize storage resources from physical drives into data blocks or chunks for access or use by upper layers. In a storage system, there may be multiple storage resource pools, and in the example of FIG. 1, only a single storage resource pool is illustrated.
And allocating the storage object for the storage object layer at the resource allocation layer, wherein the storage object comprises a plurality of large blocks. The allocator allocates chunks in the storage resource pool to create storage objects. According to the storage object provided in the embodiment of the invention, a part of the storage space of the storage system is represented. The storage object is a storage unit with RAID functionality, and the storage object structure will be described in detail later in conjunction with fig. 2. A plurality of storage objects are provided at a storage object level. Storage objects may be created and destroyed. When a storage object is created, the required number of chunks, which make up the storage object, are retrieved from the storage resource pool by the allocator. A chunk may belong to only one memory object at a time. Large blocks that have already been allocated to a storage object are no longer allocated to other storage objects. When a storage object is destroyed, the chunks that make up the storage object are freed back into the storage resource pool and may be reassigned to other storage objects.
The storage system includes a plurality of virtual storage disks. The virtual storage disk provides an access interface for an application program and provides services to the outside. The virtual storage disk is composed of a plurality of storage objects, and the application program can create a plurality of virtual storage disks with different attributes according to needs. The virtual storage disk provides a logical address space comprising a plurality of logical address regions.
FIG. 2 illustrates a structure of a storage object according to an embodiment of the present invention. A memory object includes a plurality of data blocks or chunks. In the example of FIG. 2, the storage objects include chunk 220, chunk 222, chunk 224, and chunk 226. The large blocks that make up the storage object come from different drives. Each drive provides at most one chunk to one storage object. Referring to FIG. 2, chunk 220 is from drive 210, chunk 222 is from drive 212, chunk 224 is from drive 214, and chunk 226 is from drive 216. Thus, when a single drive fails, one or a few large blocks in the storage object are inaccessible. By storing other large blocks of the object, the data of the object can be reconstructed to meet the requirement of data reliability.
Data protection is provided for storage objects through RAID techniques and high performance access to storage objects is provided. Referring to FIG. 2, a storage object includes multiple RAID stripes (stripe 230, stripe 232 … … stripe 238), each stripe being composed of storage space from a different large block. Storage space from different chunks of the same stripe may have the same or different address ranges. A stripe is the smallest unit of writing of a storage object, thereby improving performance by writing data to multiple drives in parallel. There is no size limit to the read operation of a memory object. RAID techniques are implemented in stripes. Of the 4 chunks of storage space that make up stripe 230, 3 are used to store user data and 1 is used to store parity data, such that data protection, such as a RAID 5 level, is provided on stripe 230.
Optionally, metadata is also stored in each chunk. In the example of fig. 2, the same metadata is stored in each of the chunks 220 to 226, thereby ensuring the reliability of the metadata, and even if a partial chunk belonging to the same storage object fails, the metadata can be obtained from other chunks. The metadata is used to record information such as the storage object to which the chunk belongs, the data protection level (RAID level) of the storage object to which the chunk belongs, and the number of times of erasing and writing of the chunk.
Fig. 3 illustrates a structure of a storage object according to still another embodiment of the present invention. When a user writes a certain logical address of the storage space for the first time, a storage object is created for the piece of logical address area, and resource allocation occurs once to create the storage object, and the created storage object is associated with the logical address area of the storage space. The storage system includes a plurality of drives (see fig. 3, drive 0, drive 1, drive 2, and drive 3), and the storage space of the drives is divided into storage resources of a fixed size, called chunks. A plurality of large blocks are organized by RAID algorithm to form a data protection unit which is called a storage object. Referring to FIG. 3, drive 0 provides chunk 0, chunk i … …, drive 1 provides chunk 1, chunk j … …, drive 2 provides chunk 2, chunk k … …, drive 3 provides chunk 3, chunk t … … in the embodiment shown in FIG. 3 illustrates 2 storage objects, storage object m is formed by drive 0, drive 1, and drive 2 each providing 1 chunk (chunk 0, chunk 1, and chunk 2), and storage object n is formed by drive 1, drive 2, and drive 3 each providing 1 chunk (chunk j, chunk k, and chunk t).
By way of example, in the embodiment of FIG. 3, the storage capacity of the chunk is on the MB (Megabyte) level, while the storage capacity of the drive is on the TB (Terabyte) level. Therefore, the creation of the storage objects in the storage system is frequent, the use of storage resources can be effectively controlled by controlling the creation process of the storage objects, and the global wear leveling and the inverse leveling can be realized.
In an embodiment according to the present invention, when creating a storage object, a driver providing a large block for the storage object may be randomly selected from a plurality of drivers based on the weight of the driver, thereby ensuring balanced use of driver resources to achieve global wear leveling.
FIG. 4 is a diagram of a lock-free IO request processing model according to an embodiment of the present invention. As shown in fig. 4, an application accesses a virtual storage disk. A number of IO processing threads (IO Handler) are created from the user's configuration to the storage resource pool, which can run completely concurrently on multiple CPUs. And for different IO requests from the virtual storage disk, distributing the IO requests to a specific IO processing thread for processing according to parameters of the IO requests. By way of example, IO requests are distributed to different IO processing threads depending on the type of IO request (read request or write request) and/or the logical address accessed by the IO request.
The IO processing thread is responsible for processing IO requests, such as read and write requests of applications and/or data reconstruction requests inside the storage system. The main work of the IO processing thread includes: mutual exclusion and synchronization between IO requests, RAID encoding and decoding, distribution of IO requests to underlying solid state drives, and drop-back processing of return requests. An IO processing thread may be a thread, process, or other piece of code executing on a CPU. In the example of FIG. 4, each IO processing thread is bound to a CPU or CPU core. The CPU or the CPU core is specially used for executing the IO processing thread bound with the CPU or the CPU core, and the additional overhead caused by thread switching is reduced.
FIG. 5 is a schematic diagram of a mapping of a logical address space of a virtual disk to a storage object according to an embodiment of the present invention, in FIG. 5, "Ct # K" indicates a storage object numbered K. the logical address space of virtual disk 0 is from "L BA # 0" to "L BA # N". L BA #0 "indicates a starting address 0 of the logical address space, and" L BA # N "indicates a maximum address N of the logical address space. As shown in FIG. 5, in the logical address space of virtual disk 0, an unmapped logical address portion is indicated by shading, and a non-shaded portion is a logical address portion to which a storage object has been mapped. the logical address portion of the virtual disk is mapped to a storage object such that access to the logical address portion is carried by a mapped storage object. for example, in FIG. 5, when access to the logical address portion of virtual disk 0 mapped to storage object Ct #0 is read from a storage object, the logical address portion of the logical address mapped to a storage object is read from a storage object.
FIG. 6 is a schematic diagram of a mapping of a logical address space of a virtual storage disk to a storage object according to another embodiment of the present invention. In FIG. 6, the memory objects have different sizes, and thus different memory objects are mapped to different numbers of logical addresses. In comparison, in fig. 5, the memory objects have the same size.
As shown in FIG. 6, some of the logical addresses of the virtual storage disk 1 are mapped to storage objects of varying sizes, while some logical addresses are not yet mapped to storage objects. When writing to a logical address of the virtual storage disk 1, it is first detected whether the logical address has been mapped to a storage object. If the logical address is mapped to a memory object (e.g., memory object Ct #2), directly writing to memory object Ct # 2; if no storage object is mapped to the logical address, a storage object is created and added to the address space mapping management system of the virtual storage disk 1, and then the write operation is continued.
FIG. 7 is a schematic diagram of a logical address area of a virtual storage disk according to an embodiment of the present invention. As shown in fig. 7, the logical address space of the virtual storage disk 0 is divided into consecutive equal-sized logical address areas. The logical address area numbered n is indicated by "Re # n". In the embodiment of the invention, when an IO request is processed, the IO request is distributed to different IO processing threads for processing according to the logical address area accessed by the IO request. In each logical address region, one or more memory objects may be corresponded. The logic addresses corresponding to the logic address areas are not overlapped.
The plurality of logical address areas of the virtual storage disk are of a fixed size. The size of the storage object may be fixed or long. FIG. 8 is a schematic diagram of a logical address area of a virtual storage disk according to another embodiment of the present invention. As shown in fig. 8, the storage objects have different sizes, and the address space of the virtual storage disk will be divided into several equal-sized logical address areas, each corresponding to one or more storage objects. For example, referring to fig. 8, the memory objects Ct #1 and Ct #2 are included in the logical address area Re #0, the logical address corresponding to the logical address area Re #1 is not yet allocated with a memory object, a part of the logical address corresponding to the logical address area Re #3 is allocated with a memory object Ct # K, and another part of the logical address is not yet allocated with a memory object.
Fig. 9 is a flowchart of IO request processing of a storage system according to an embodiment of the present invention. By distributing the IO requests for accessing different logical address areas to different IO processing threads for processing, the simultaneous processing of a plurality of threads is realized. Because each thread processes IO requests of different logical address regions, and no access correlation exists between the read-write requests, the multiple threads have no influence on each other and can process in parallel.
Referring to FIG. 9, to process an IO request of a storage system, a first IO request is received, where the first IO request accesses a first logical address region (910). A first thread is determined based on the first logical address region, causing the first thread to process the first IO request (920).
As an example, the first logical address area is the logical address area indicated by "Re # 0" of fig. 7. The first thread may be, for example, the IO processing thread bound on the CPU 1 shown in fig. 4 (T1).
For example: IO requests for region "Re # 0" (see fig. 7) are assigned to thread T1 processing, while IO requests for region "Re # 2" (see fig. 7) are assigned to thread T2 processing. Thread T2 is an IO processing thread bound to CPU2 (see FIG. 4). Therefore, read and write requests of different logic areas of the address space of the virtual storage disk can be processed by different threads at the same time.
Those skilled in the art will recognize that there are a variety of ways to map from the logical address region R to the T of a thread. For example, the number of created IO processing threads is modulo by the number of logical address regions, and the result is the index of the corresponding IO processing thread, and the IO processing thread indicated by the index processes the IO request for the numbered logical address regions. In another example, a hash is computed over the number of logical address regions R, with the resulting hash result being used as an index to the IO processing thread.
A storage object mapping table is provided to maintain a mapping of addresses of virtual storage disks to storage objects. In embodiments according to the invention, a storage object mapping table is provided for each virtual storage disk, the storage object mapping table being a shared resource of the entire virtual storage disk, and the storage object mapping table is made accessible to multiple IO handlers concurrently and without lock.
The storage object mapping table is composed of a plurality of mapping table entries, each mapping table entry is a red-black tree, and nodes of the red-black tree store the corresponding relation between the initial logical address of the storage object and the storage object. Thus, each mapping table entry has recorded therein a plurality of "< memory object start logical address, memory object >". Which mapping table entry to place the storage object into can be obtained by modulo the number of the mapping table entries by the logical address area number where the storage object is located.
In an embodiment in accordance with the invention, IO requests to logical address region R1 are processed by IO processing thread T1; and a mapping table entry (referred to as M1) recording the mapping relationship of the logical address region R1 and the memory object is also processed by the IO processing thread T1. Meanwhile, an IO request to the logical address region R2 is processed by an IO processing thread T2; and a mapping table entry (referred to as M2) recording the mapping relationship of the logical address region R2 and the memory object is also processed by the IO processing thread T2. Thus, IO processing thread T1 handles IO requests that access different logical address regions and accesses different mapping table entries than IO processing thread T2. In this way, multiple IO processing threads concurrently process their respective tasks, and there is no need to use locks to synchronize among the multiple IO processing threads.
As an example, IO _ handler _ num IO processing threads are provided for a storage resource pool of a storage system, and a storage object mapping table of the virtual storage disk 0 has map _ entry _ num mapping table entries. For a logical address region whose index number is region _ index: the IO processing thread to which the logical address region belongs is indicated by the number ioh _ index, and ioh _ index is region _ index% IO _ handle _ num; the mapping table entry to which the logical address region belongs is indicated by an index map _ entry, where map _ index is region _ index% map _ entry _ num; the mapping table entry to which the logical address region belongs is accessed by an IO processing thread with the number map _ ioh _ index, where map _ ioh _ index is map _ index% IO _ handle _ num.
Further, map _ entry _ num is made divisible by IO _ handle _ num to ensure that for an IO request, its corresponding ioh _ index equals map _ ioh _ index.
Therefore, for a virtual storage disk, the number of mapping table entries corresponding to the virtual storage disk is set to be integral multiple of the number of IO processing threads allocated to the storage resource pool, so as to ensure that each IO processing thread is a unique visitor of some mapping table entries. In this case, when a plurality of IO processing threads access the memory object mapping table, there is no need to synchronize operations with each other using locks, thereby realizing lock-free design.
In another example, the logical address space of the virtual storage disk 1 is divided into 12 regions, and a storage resource pool for providing resources for the virtual storage disk 1 is serviced by 3 IO processing threads, and the storage object mapping table of the virtual storage disk includes 6 mapping table entries. The logical address region of the first 4 logical address regions (numbered 0/1/2/3) and the first 2 mapping table entries (indexed 0/1) are assigned to thread T0, the middle 4 logical address regions (numbered 4/5/6/7) and the mapping table entry indexed 2/3 are assigned to IO processing thread T1, and the last 4 logical address regions and the mapping table entry indexed 5/6 are assigned to IO processing thread T2. Thereby avoiding two or more IO processing threads from accessing the same mapping table entry and also avoiding two or more IO processing threads from accessing the same logical address region.
One pool of storage resources may support multiple virtual storage disks. In an embodiment in accordance with the invention, IO processing threads are provided for a pool of storage resources. The IO processing threads for the same storage resource pool may be shared among multiple virtual storage disks supported by the storage resource pool. So that one IO processing thread processes IO requests for accessing different virtual storage disks. Further, multiple storage resource pools may be provided in the storage system.
Preferably, the number of IO processing threads provided for a storage system or storage resource pool is adjustable, but not more than the number of CPUs or CPU cores in the storage system.
The processing of the virtual storage disk IO request can be divided into two stages: the first stage is to receive an IO request and distribute the IO request to a corresponding IO processing thread; and the second stage is that the IO processing thread processes the IO request and sends the IO request to the storage device or a driver of the storage device. Which will be separately explained below. FIG. 10 is a flowchart of the distribution of IO requests to IO processing threads, corresponding to the first phase described above, according to an embodiment of the present invention; and FIG. 11 is a flowchart of an IO processing thread processing an IO request according to an embodiment of the present invention, corresponding to the second stage described above.
As shown in FIG. 10, a user accesses a virtual storage disk, receives an IO request (1010), and determines whether the IO request spans multiple logical address regions according to a logical address of the IO request (1020). Whether multiple logical address regions are spanned may be determined by the starting logical address and access length of the IO request access. If the IO request only accesses one logical address region, an IO command is created (1030). A response to the IO command can be a response to the IO request. And calculating the number of the logic address area accessed by the IO command. For example, the number of the logical address region accessed by the IO request is determined according to the initial logical address of the IO request. If the logical address range accessed by the IO request spans multiple logical address regions, multiple IO commands are created for the IO request, and each logical address region accessed by the IO request corresponds to one IO command (1040). For example, an IO request accesses the logical address region Re #2 and the logical address region Re #3 (see fig. 7), generates an IO command C1 for the logical address region Re #2, generates an IO command C2 for the logical address region, and responses to the IO command C1 and the IO command C2 can be combined into a response to the IO request.
And determining an IO processing thread for processing the IO command according to the logic address area number corresponding to the IO command, and distributing the IO command to a command queue (1050) of the IO processing thread. In an embodiment in accordance with the invention, a command queue is provided for each IO processing thread. The IO commands are accommodated in entries of the command queue. The IO processing thread takes the IO command out of the command queue for processing. In step 1050, as an example, hash is performed on the logical address area number corresponding to the IO command, or modulo is performed on the number of IO processing threads by the logical address area number, so as to obtain an index of the IO processing thread that processes the IO command, obtain the IO processing thread according to the index, and fill the IO command into the command queue of the IO processing thread. As another example, hash is performed on the logical address area number corresponding to the IO command, or modulo is performed on the number of IO processing threads by the logical address area number, so as to obtain an index of the IO processing thread that processes the IO command, directly obtain the command queue according to the index, and insert the IO command into the command queue.
And in the second stage, the IO processing thread processes the IO command and sends the IO command to the storage device or a driver of the storage device. As shown in FIG. 11, the IO processing thread fetches an IO command from its command queue (1110). According to the logical address of the IO command, the memory object mapping table is searched to determine whether a memory object corresponding to the logical address exists (1120). If the memory object mapping table indicates that the logical address accessed by the processed IO command has been mapped to a memory object, the memory object is accessed and read or written to according to the IO command (1150). When the IO processing thread searches the mapping table of the storage object, determining the table item of the mapping table to be accessed according to the logical address area number accessed by the IO command, and searching the storage object mapped by the logical address of the IO command. In the embodiment of the invention, two IO processing threads do not access the same mapping table entry, so that when the IO processing threads access the storage object mapping table, locking of the storage object mapping table is not needed, and the processing efficiency is improved.
If the storage object mapping table indicates that the logical address accessed by the processed IO command has not yet been mapped to a storage object, it is further determined if the IO command is a read command or a write command (1130). If the IO command is a read command and it is illegal to read a logical address to which a storage object has not yet been assigned, then the specified value is used as a response to the IO command (1160). For example, a result of all 0's is returned for the IO command, or a return value indicates that the IO command accessed an illegal or unassigned logical address. If the IO command is a write command, when writing a logical address of a storage object that is not yet allocated, a storage object is created first, and the created storage object is inserted into the storage object mapping table, so as to record a mapping relationship between the logical address and the created storage object in an entry of the storage object mapping table (1140), and then access the storage object, and write data to the created storage object according to the IO command (1150).
It will be apparent to those skilled in the art that the steps shown in fig. 11 may be performed in other orders. For example, after the IO processing thread fetches an IO command from the command queue, it may first check whether the IO command is a read command or a write command, and then check whether the logical address of the IO command is allocated to a storage object. For the read command, if the logical address of the IO command is allocated to the storage object, taking out the data from the storage object; if the logical address of the IO command does not allocate a memory object, a predetermined value is used as a read result, or an illegal address indicating reading is indicated. For a write command, if the logical address of the IO command is already allocated to a storage object, writing data into the storage object; and if the storage object is not allocated to the logical address of the IO command, allocating a new storage object, establishing a mapping relation between the logical address and the newly allocated storage object, and writing data into the newly allocated cun object as a response to the IO command.
In summary, in the embodiments of the present invention, the logical address space of the virtual storage disk is divided into a plurality of logical address areas that do not overlap with each other, and an IO request for one logical address area is processed by a corresponding thread. The two threads are prevented from processing IO requests of the same logical address area. Further, two threads are prevented from accessing one mapping table entry at the same time. Therefore, resource access among the threads is not conflicted, and critical resources among the threads are not required to be synchronized by using locks or other mechanisms, so that the processing process is simplified, and the parallelism among the threads is improved.
For a storage system comprising a plurality of solid-state drives, the novel lock-free IO processing method provided by the invention can ensure the reliability of data and can fully exert the high performance of the plurality of solid-state drives by utilizing the characteristic of multi-CPU core/multi-CPU concurrent processing. And the performance can be linearly expanded relative to the number of CPU cores/CPUs, so that the requirements of customers on data reliability and performance are met. And dynamic configuration can be carried out according to performance requirements and the use requirements of resources such as a CPU (central processing unit), a memory and the like.
It should be noted that the embodiment of the present invention cannot guarantee that there is no conflict between multiple IO requests on the same stripe inside the storage object. The read request and the read request of the same strip in the storage object can be executed concurrently; however, the write request and the write request, and the write request and the reconstruction request need to be executed synchronously or serially to ensure the correctness of the data. Synchronization between multiple IO requests internal to the same memory object is handled by each IO processing thread.
Embodiments of the present invention also provide a program comprising program code which, when loaded into and executed on a CPU, causes the CPU to perform one of the methods according to embodiments of the present invention provided above.
Embodiments of the present invention also provide a program comprising program code which, when loaded into and executed on a host computer, causes the processor of the host computer to perform one of the methods according to embodiments of the present invention provided above.
It will be understood that each block of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, respectively, can be implemented by various means including computer program instructions.
These computer program instructions may be loaded onto a general purpose computer, special purpose computer, or other programmable data control apparatus to produce a machine, such that the instructions which execute on the computer or other programmable data control apparatus create means for implementing the functions specified in the flowchart block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data control apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including computer-readable instructions for implementing the function specified in the flowchart block or blocks. The computer program instructions may also be loaded onto a computer or other programmable data control apparatus to cause a series of operational operations to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide operations for implementing the functions specified in the flowchart block or blocks.
Accordingly, blocks of the block diagrams and flowchart illustrations support combinations of means for performing the specified functions, combinations of operations for performing the specified functions and program instruction means for performing the specified functions. It will also be understood that each block of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, can be implemented by special purpose hardware-based computer systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (8)

1. An IO request processing method of a storage system, wherein the storage system includes a plurality of virtual storage disks, and a virtual storage disk includes a plurality of logical address areas, the method comprising:
receiving a first IO request, wherein the first IO request accesses a first logical address region;
determining a first thread according to a first logic address area, and enabling the first thread to process the first IO request;
further comprising:
determining a first mapping table entry according to the first logic address area;
the first thread accesses a first mapping table entry, acquires a first storage object from the first mapping table entry according to a first logical address accessed by a first IO request, and accesses the first storage object to process the first IO request.
2. The method of claim 1, wherein determining the first thread based on the first logical address region, causing the first thread to process the first IO request comprises:
and generating a first IO command according to the first IO request, filling the first IO command into a first queue corresponding to a first thread according to the first logic address area, and taking out the first IO command from the first queue and processing the first IO command by the first thread, wherein the first thread only processes the commands of the first queue.
3. The method of claim 1, further comprising:
if the storage object cannot be obtained from the first mapping table entry, for a write request in the IO request, a third storage object is created, the third storage object is recorded in the first mapping table entry, and data is written into the third storage object.
4. An IO request processing method of a storage system, wherein the storage system includes a plurality of virtual storage disks, and a virtual storage disk includes a plurality of logical address areas, the method comprising:
receiving a first IO request;
generating a first IO command and a second IO command according to the first IO request, wherein the first IO command accesses the first logic address area, and the second IO command accesses the second logic address area;
determining a first thread according to the first logic address area, and enabling the first thread to process the first IO command; determining a second thread according to a second logic address area, and enabling the second thread to process the second IO command;
further comprising:
determining a first mapping table entry according to the first logic address area;
the first thread accesses a first mapping table entry, acquires a first storage object from the first mapping table entry according to a first logical address accessed by a first IO command, and accesses the first storage object to process the first IO command.
5. The method of claim 4, further comprising:
filling the first IO command into a first queue corresponding to a first thread according to the first logical address area, wherein the first thread takes out the first queue and processes the first IO command, and only processes the commands of the first queue; and
and filling the second IO command into a second queue corresponding to the second thread according to the second logical address area, and taking out the second IO command from the second queue and processing the second IO command by the second thread, wherein the second thread only processes the commands of the second queue.
6. The method of claim 4, further comprising:
and if the storage object cannot be obtained from the table entry of the first mapping table, returning a result indicating that the read request is abnormal for the read request in the IO request.
7. The method according to one of claims 4 to 6, wherein,
the first thread is executed by only a first CPU and the second thread is executed by only a second CPU.
8. An IO request processing apparatus of a storage system, wherein the storage system includes a plurality of virtual storage disks, and a virtual storage disk includes a plurality of logical address areas, the apparatus comprising:
a first receiving module, configured to receive a first IO request, where the first IO request accesses a first logical address region;
the first processing module is used for determining a first thread according to the first logic address area and enabling the first thread to process the first IO request;
a first mapping table determining module for determining a first mapping table entry according to the first logical address area,
the first processing module is further configured to access a first mapping table entry through the first thread, obtain a first storage object from the first mapping table entry according to a first logical address accessed by the first IO request, and access the first storage object to process the first IO request.
CN201610644949.4A 2016-08-08 2016-08-08 Lock-free IO processing method and device Active CN107704194B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201610644949.4A CN107704194B (en) 2016-08-08 2016-08-08 Lock-free IO processing method and device
CN202010643795.3A CN111679795B (en) 2016-08-08 2016-08-08 Lock-free concurrent IO processing method and device
PCT/CN2017/096152 WO2018028529A1 (en) 2016-08-08 2017-08-07 Lock-free io processing method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610644949.4A CN107704194B (en) 2016-08-08 2016-08-08 Lock-free IO processing method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010643795.3A Division CN111679795B (en) 2016-08-08 2016-08-08 Lock-free concurrent IO processing method and device

Publications (2)

Publication Number Publication Date
CN107704194A CN107704194A (en) 2018-02-16
CN107704194B true CN107704194B (en) 2020-07-31

Family

ID=61161771

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010643795.3A Active CN111679795B (en) 2016-08-08 2016-08-08 Lock-free concurrent IO processing method and device
CN201610644949.4A Active CN107704194B (en) 2016-08-08 2016-08-08 Lock-free IO processing method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010643795.3A Active CN111679795B (en) 2016-08-08 2016-08-08 Lock-free concurrent IO processing method and device

Country Status (2)

Country Link
CN (2) CN111679795B (en)
WO (1) WO2018028529A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110568991B (en) * 2018-06-06 2023-07-25 北京忆恒创源科技股份有限公司 Method and storage device for reducing IO command conflict caused by lock
CN108958944A (en) * 2018-07-26 2018-12-07 郑州云海信息技术有限公司 A kind of multiple core processing system and its method for allocating tasks
CN109101194A (en) * 2018-07-26 2018-12-28 郑州云海信息技术有限公司 One kind writing with a brush dipped in Chinese ink performance optimization method and storage system
US10949204B2 (en) * 2019-06-20 2021-03-16 Microchip Technology Incorporated Microcontroller with configurable logic peripheral
CN111638854A (en) * 2020-05-26 2020-09-08 北京同有飞骥科技股份有限公司 Performance optimization method and device for NAS construction and SAN stack block equipment
CN112306413B (en) * 2020-10-30 2024-05-07 北京百度网讯科技有限公司 Method, device, equipment and storage medium for accessing memory
CN112463037B (en) * 2020-11-13 2022-08-12 苏州浪潮智能科技有限公司 Metadata storage method, device, equipment and product
CN112463306B (en) * 2020-12-03 2024-07-23 南京机敏软件科技有限公司 Method for sharing disk data consistency in virtual machine
CN113568736B (en) * 2021-06-24 2024-07-30 阿里巴巴创新公司 Data processing method and device
CN113849317B (en) * 2021-11-29 2022-03-22 苏州浪潮智能科技有限公司 Memory pool resource using method and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317912A (en) * 2009-02-17 2012-01-11 松下电器产业株式会社 Multi-thread processor and digital TV system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102405460B (en) * 2009-02-11 2016-05-04 艾梵尼达有限公司 Virtual storage system and operation method thereof
CN101937465B (en) * 2010-09-10 2013-09-11 中兴通讯股份有限公司 Access method of distributed file system and upper file system thereof
CN101937466B (en) * 2010-09-15 2011-11-30 任子行网络技术股份有限公司 Webpage mailbox identification classifying method and system
CN102073461B (en) * 2010-12-07 2012-07-04 成都市华为赛门铁克科技有限公司 Input-output request scheduling method, memory controller and memory array
CN102298561B (en) * 2011-08-10 2016-04-27 北京百度网讯科技有限公司 A kind of mthods, systems and devices memory device being carried out to multi-channel data process
CN102637147A (en) * 2011-11-14 2012-08-15 天津神舟通用数据技术有限公司 Storage system using solid state disk as computer write cache and corresponding management scheduling method
CN102622189B (en) * 2011-12-31 2015-11-25 华为数字技术(成都)有限公司 The device of Storage Virtualization, date storage method and system
US9052937B2 (en) * 2013-02-27 2015-06-09 Vmware, Inc. Managing storage commands according to input-output priorities and dependencies

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317912A (en) * 2009-02-17 2012-01-11 松下电器产业株式会社 Multi-thread processor and digital TV system

Also Published As

Publication number Publication date
CN107704194A (en) 2018-02-16
WO2018028529A1 (en) 2018-02-15
CN111679795A (en) 2020-09-18
CN111679795B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN107704194B (en) Lock-free IO processing method and device
US10657101B2 (en) Techniques for implementing hybrid flash/HDD-based virtual disk files
US20220137849A1 (en) Fragment Management Method and Fragment Management Apparatus
US9229826B2 (en) Volatile memory representation of nonvolatile storage device set
US9182927B2 (en) Techniques for implementing hybrid flash/HDD-based virtual disk files
JP6205650B2 (en) Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory
US9280300B2 (en) Techniques for dynamically relocating virtual disk file blocks between flash storage and HDD-based storage
US20040064641A1 (en) Storage device with I/O counter for partial data reallocation
KR102443600B1 (en) hybrid memory system
KR20170038853A (en) Host-managed non-volatile memory
CN113568562A (en) Storage system, memory management method and management node
US10908997B1 (en) Simple and efficient technique to support disk extents of different sizes for mapped RAID
KR20180002259A (en) Structure and design method of flash translation layer
US20240143219A1 (en) Software-hardware combination method for internal mapping address query of zoned namespace
US11687272B2 (en) Method and system for dynamic topology-aware space allocation in a distributed system
CN115793957A (en) Method and device for writing data and computer storage medium
JP5730446B1 (en) Hierarchical storage system with trial area, storage controller and program
CN111124251A (en) Method, apparatus and computer readable medium for I/O control
US11144445B1 (en) Use of compression domains that are more granular than storage allocation units
CN114647376A (en) Associating a data type with a stream identifier to map to an ordered write memory device
CN109918317A (en) It is a kind of based on abrasion perception NVM item between abrasion equilibrium method
US11947803B2 (en) Effective utilization of different drive capacities
CN109558070B (en) Scalable storage system architecture
CN109558236B (en) Method for accessing stripes and storage system thereof
Tsao et al. Rethinking I/O request management over eMMC-based solid-state drives

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100192 room A302, building B-2, Dongsheng Science Park, Zhongguancun, 66 xixiaokou Road, Haidian District, Beijing

Patentee after: Beijing yihengchuangyuan Technology Co.,Ltd.

Address before: 100192 Room 302, 3 / F, building B-2, Dongsheng Science Park, xixiaokou Road, Haidian District, Beijing

Patentee before: MEMBLAZE TECHNOLOGY (BEIJING) Co.,Ltd.