Scheduling method and device of NVMe solid state disk, data processor and equipment

By automatically identifying and scheduling NVMe SSDs that support or do not support FDP through a data processor, the problems of write amplification and complex operation and maintenance in hybrid deployments are solved, and high-performance, low-latency and simple NVMe SSD management are achieved.

CN121070287BActive Publication Date: 2026-02-27SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511622826.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-27
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

In data centers, when DPUs are deployed with both NVMe SSDs that support and do not support FDP, they cannot be automatically identified and scheduled separately, resulting in unoptimized write amplification, command failures, or performance fluctuations, leading to high operational complexity.

Method used

A scheduling method for NVMe solid-state drives is provided, which automatically identifies whether the NVMe SSD supports FDP function through the data processor, and creates virtual block devices that support or do not support FDP function according to the virtual disk allocation policy, and transparently maps FDP capabilities.

Benefits of technology

It enables mixed deployment of NVMe SSDs that support FDP and those that do not at the physical layer, improving the compatibility and deployment flexibility of data processors, reducing write amplification, ensuring high performance and low latency, and simplifying operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070287B_ABST
    Figure CN121070287B_ABST
Patent Text Reader

Abstract

The application relates to a scheduling method and device of an NVMe solid state disk, a data processor and equipment, and relates to the technical field of data processors. The application comprises the following steps: receiving a request of creating a virtual block device, allocating a target NVMe solid state disk satisfying requirements; if the target NVMe solid state disk supports FDP function, selecting a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk, and creating a virtual block device supporting FDP function according to the plurality of placement identifiers and a logical block address segment; if the target NVMe solid state disk does not support FDP function, creating a virtual block device not supporting FDP function. Through the above method, the data processor transparently maps and exposes the FDP capability of the DPU side physical NVMe SSD to the front-end virtual block device, so that the host side can correctly use the FDP technology on the virtual block device, and data placement control consistent with the physical disk capability is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processors, in particular to a scheduling method and device for NVMe solid state disks, a data processor and a computing device. BACKGROUND

[0002] With the increasing demand for high-performance storage in data centers, multiple NVMe (Non-Volatile Memory express) solid state disks (hereinafter referred to as NVMe SSDs) are usually mounted on the DPU (Data Processing Unit) side. When the DPU provides a virtual NVMe block device to the front-end host (HOST), the data of the virtual NVMe block device can be configured and deployed on the physical NVMe SSD on the DPU side, thereby realizing local storage acceleration and other features.

[0003] The emergence of FDP (Flexible Data Placement) technology provides a new solution for the performance optimization and resource management of SSDs, which can reduce the write amplification of SSDs. However, not all NVMe SSDs support FDP capabilities.

[0004] When FDP-capable and non-FDP-capable SSDs are mixed on the same DPU, if the DPU cannot automatically identify and schedule the two types of devices, the advantages of FDP technology cannot be fully realized, and the operation and maintenance complexity will also increase. Currently, there is a lack of scheduling mechanisms for unified management and exposure of FDP capabilities to the upper virtualization layer, resulting in the following problems:

[0005] 1) FDP-capable physical NVMe SSDs cannot be reliably selected and enabled with PIDs (Placement Identifiers), so that write amplification is not optimized.

[0006] 2) Non-FDP-capable physical NVMe SSDs are incorrectly attempted to set PIDs, causing command failures or performance jitter.

[0007] 3) The operation and maintenance personnel need to manually distinguish and configure, which is prone to errors and difficult to expand.

[0008] Therefore, there is an urgent need to provide a technical solution that can automatically identify whether each NVMe SSD supports FDP and flexibly schedule and expose FDP capabilities according to a virtual disk allocation strategy. SUMMARY

[0009] Therefore, it is necessary to provide a scheduling method and device for an NVMe solid-state disk, a data processor and a computing device to transparently map and expose the FDP capability of a DPU-side physical NVMe SSD to a front-end virtual block device, so that the host side can correctly use the FDP technology on the virtual block device.

[0010] In a first aspect, the application provides a scheduling method for an NVMe solid-state disk, which is applied to a data processor, and the method comprises:

[0011] receiving a request for creating a virtual block device;

[0012] allocating a target NVMe solid-state disk that meets the requirements for the virtual block device based on the request;

[0013] if the allocation is successful, detecting whether the target NVMe solid-state disk supports a flexible data placement function;

[0014] if the target NVMe solid-state disk supports the flexible data placement function, selecting a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid-state disk, and creating a virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers;

[0015] if the target NVMe solid-state disk does not support the flexible data placement function, creating a virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid-state disk.

[0016] In one embodiment, selecting a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid-state disk comprises:

[0017] determining the size of a logical block address segment of each placement identifier in the target NVMe solid-state disk;

[0018] determining the number of placement identifiers of the virtual block device according to the capacity of the virtual block device and the size of the logical block address segment;

[0019] selecting a plurality of placement identifiers in an idle state from the placement identifier list of the target NVMe solid-state disk; wherein the number of the selected placement identifiers is the same as the determined number of placement identifiers.

[0020] In one embodiment, before receiving the request for creating the virtual block device, the method further comprises:

[0021] obtaining the total capacity and placement identifier information of each NVMe solid-state disk supporting the flexible data placement function from a preset capability database;

[0022] For each NVMe solid state disk supporting the flexible data placement function, the total capacity is divided according to the placement identifier information, and the logical block address segment size corresponding to each placement identifier is obtained;

[0023] The placement identifier information of each NVMe solid state disk supporting the flexible data placement function, and the logical block address segment size corresponding to each placement identifier are stored.

[0024] In one of the embodiments, based on the request, a target NVMe solid state disk satisfying the requirement is allocated for the virtual block device, comprising:

[0025] In the case where the request indicates that the virtual block device enables the flexible data placement function, a plurality of NVMe solid state disks supporting the flexible data placement function are screened out according to the preset capability database;

[0026] It is detected whether the idle space of the NVMe solid state disk supporting the flexible data placement function is less than the capacity of the virtual block device;

[0027] A target NVMe solid state disk with an idle space not less than the capacity of the virtual block device and supporting the flexible data placement function is allocated for the virtual block device.

[0028] In one of the embodiments, the method further comprises:

[0029] In the process of starting or initializing the management service of the data processor, each NVMe solid state disk connected is traversed, and the total capacity of each NVMe solid state disk is identified;

[0030] It is detected whether each NVMe solid state disk supports the flexible data placement function, and the capability information is obtained;

[0031] The placement identifier list of the NVMe solid state disk supporting the flexible data placement function is obtained, and the placement identifier information is obtained;

[0032] The total capacity, the capability information and the placement identifier information of each NVMe solid state disk are stored in the preset capability database.

[0033] In one of the embodiments, the method further comprises:

[0034] In the case where the request does not indicate that the virtual block device enables the flexible data placement function, a target NVMe solid state disk with an idle space not less than the capacity of the virtual block device and not supporting the flexible data placement function is allocated for the virtual block device;

[0035] In a case where all the idle spaces of the NVMe solid state disks that do not support the flexible data placement function are less than the capacity of the virtual block device, the target NVMe solid state disk that has an idle space not less than the capacity of the virtual block device and supports the flexible data placement function is allocated to the virtual block device.

[0036] In one of the embodiments, the method further comprises:

[0037] receiving command information transmitted by the host through the current virtual block device;

[0038] According to the placement identifier information carried in the command information, accessing the NVMe solid state disk corresponding to the placement identifier information.

[0039] In a second aspect, the application further provides a scheduling device of a solid state disk, the device is applied to a data processor, and the device comprises:

[0040] a receiving module configured to receive a request for creating a virtual block device;

[0041] an allocating module configured to allocate a target NVMe solid state disk meeting the requirements to the virtual block device based on the request;

[0042] a detecting module configured to detect whether the target NVMe solid state disk supports the flexible data placement function in a case where the allocation is successful;

[0043] a creating module configured to select a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk, and create the virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers in a case where the target NVMe solid state disk supports the flexible data placement function;

[0044] The creating module is further configured to create the virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid state disk in a case where the target NVMe solid state disk does not support the flexible data placement function.

[0045] In a third aspect, the application further provides a data processor connected with at least one NVMe solid state disk, and the data processor is configured to execute the steps of the method according to the first aspect.

[0046] In a fourth aspect, the application further provides a computing device comprising a host and the data processor according to the second aspect.

[0047] The scheduling method, device, data processor and computing device of the NVMe solid state disk receive a request for creating a virtual block device; based on the request, a target NVMe solid state disk meeting the requirements is allocated for the virtual block device; in the case of successful allocation, it is detected whether the target NVMe solid state disk supports a flexible data placement function; in the case that the target NVMe solid state disk supports the flexible data placement function, a plurality of placement identifiers to be allocated are selected from a placement identifier list of the target NVMe solid state disk, and a virtual block device supporting the flexible data placement function is created according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers; in the case that the target NVMe solid state disk does not support the flexible data placement function, a virtual block device not supporting the flexible data placement function is created according to a logical block address space of the target NVMe solid state disk. In this way, the data processor can automatically identify whether each NVMe SSD supports the FDP function, and in response to the request, if the allocated physical NVMe SSD supports the FDP function, a virtual block device supporting the FDP function is created, so that the FDP capability of the DPU side physical NVMe SSD is transparently mapped and exposed to the front-end virtual block device, so that the host side can correctly use the FDP technology on the virtual block device, reducing the write amplification of the virtual block device. If the allocated physical NVMe SSD supports the FDP function, a virtual block device not supporting the FDP function is created. The data placement control consistent with the physical disk capability is realized to balance high performance, low delay, device life optimization and easy operation and maintenance. The mixed deployment of the NVMe SSDs supporting FDP and not supporting FDP at the physical level is possible, and the compatibility and deployment flexibility of the data processor are improved. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0049] Figure 1 An application environment diagram of the scheduling method of the NVMe solid state disk in one embodiment;

[0050] Figure 2 A flowchart of the scheduling method of the NVMe solid state disk in one embodiment;

[0051] Figure 3 A flowchart of the scheduling method of the NVMe solid state disk in another embodiment;

[0052] Figure 4A structure block diagram of a scheduling device of an NVMe solid state disk in an embodiment. DETAILED DESCRIPTION

[0053] For the purpose, technical solutions and advantages of the present application to be more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0054] It should be noted that the terms "first", "second" and the like used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "a plurality of" used in the present application refers to two and more than two. The term "and / or" used in the present application refers to one of the options, or any combination of a plurality of options.

[0055] It can be understood that as the scale of data centers continues to expand, the traditional server architecture has been difficult to meet the multiple requirements of high throughput, low latency and security isolation. Therefore, a programmable hardware unit, i.e., a data processing unit (DPU), which is specially used for offloading network, storage, encryption and other data plane tasks, appears. The DPU usually has a multi-core processor, a network interface and a special acceleration engine built-in, and can sink network packets, NVMe storage access, encryption and decryption, traffic monitoring and other work to the hardware layer without occupying the host CPU (Central Processing Unit) resources, and complete them by the DPU, thereby greatly improving the performance and security of the overall system. At present, it has begun to be widely applied in the industry.

[0056] NVMe SSD (Non-Volatile Memory Host Controller Interface Specification Solid State Disk) as a high-speed storage medium has been widely used in modern data centers, but the internal data management mechanism of NVMe SSD gradually exposes some shortcomings, among which the write amplification has a greater impact, which will affect the performance and service life of NVMe SSD. The write amplification of NVMe SSD refers to the actual amount of data written in the storage device is greater than the actual amount of data requested to be written by the host. The write amplification is determined by the hardware characteristics of flash memory (NAND Flash). According to the working principle of NAND, data is written in units of pages and erased in units of blocks. When new data is written, the write position needs to be erased first. Since a block contains multiple pages, some pages may still store valid data, so the valid data needs to be migrated before erasing, such as migrating the valid data in multiple blocks to an erased block, and then the multiple blocks can be erased. This process is called garbage collection (GC). Write amplification reduces the service life of SSD, affects storage performance, and reduces storage efficiency.

[0057] Therefore, the industry proposes NVMe Flexible Data Placement (FDP) technology to reduce the write amplification of NVMe SSD. A typical NVMe SSD supporting FDP features usually contains an endurance group (Endurance Group, EG) containing NAND blocks on the NVMe SSD, and an endurance group contains multiple reclaim groups (Reclaim Group, RG), and each RG contains multiple reclaim units (Reclaim Unit). According to the PID (Placement Identifier) information provided by FDP, the application can specify the reclaim group and reclaim unit corresponding to the data to be written, and control the distribution of application data on different reclaim groups and reclaim units, so that the application can control the layout of data on the NVMe SSD according to the attributes of the data, such as hotness, and when the data is deleted, the reclaim needs to be performed in units of reclaim units. NVMe FDP needs to be adapted by the application to maximize its value.

[0058] With the growing demand for high-performance storage in data centers, multiple NVMe solid state disks (hereinafter referred to as NVMe SSD) are usually mounted on the DPU side. When the DPU provides a virtual NVMe block device to the front-end host (HOST), the data of the virtual NVMe block device can be configured and deployed on the physical NVMe SSD on the DPU side, thereby realizing local storage acceleration and other features.

[0059] When FDP-capable SSDs and non-FDP-capable SSDs are mixedly deployed on the same DPU, if the DPU cannot automatically identify and separately schedule the two types of devices, the advantages of FDP technology cannot be fully realized, and the operation and maintenance complexity will also be increased. Currently, there is a lack of scheduling mechanisms for unified management and exposure of FDP capabilities to the upper virtualization layer, resulting in the following problems:

[0060] 1) FDP-capable physical NVMe SSDs cannot be reliably selected and enabled with PIDs (Placement Identifiers), so that write amplification is not optimized.

[0061] 2) Non-FDP-capable physical NVMe SSDs are incorrectly attempted to be set with PIDs, causing command failures or performance jitter.

[0062] 3) Operation and maintenance personnel need to manually distinguish and configure, which is prone to errors and difficult to expand.

[0063] Therefore, there is an urgent need to provide a technical solution that can automatically identify whether each NVMe SSD supports FDP and flexibly schedule and expose FDP capabilities according to a virtual disk allocation strategy.

[0064] To solve the above technical problems, the application provides a scheduling method and device of an NVMe solid state disk, a data processor and a computing device. The data processor receives a request for creating a virtual block device, allocates a target NVMe solid state disk satisfying a requirement for the virtual block device based on the request, detects whether the target NVMe solid state disk supports a flexible data placement function in the case of successful allocation, selects a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk and creates a virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers in the case that the target NVMe solid state disk supports the flexible data placement function, and creates a virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid state disk in the case that the target NVMe solid state disk does not support the flexible data placement function. In this way, the data processor can automatically identify whether each NVMe SSD supports the FDP function, and in response to the request, if the allocated physical NVMe SSD supports the FDP function, a virtual block device supporting the FDP function is created, so that the FDP capability of the DPU side physical NVMe SSD is transparently mapped and exposed to the front-end virtual block device, so that the host side can correctly use the FDP technology on the virtual block device, reducing the write amplification of the virtual block device. If the allocated physical NVMe SSD supports the FDP function, a virtual block device not supporting the FDP function is created. The data placement control consistent with the physical disk capability is realized to balance high performance, low delay, device life optimization and easy operation and maintenance. The mixed deployment of the NVMe SSDs supporting FDP and not supporting FDP at the physical level becomes possible, and the compatibility and deployment flexibility of the data processor are improved.

[0065] The scheduling method of the NVMe solid state disk provided by the embodiments of the application can be applied in an application environment as shown in Figure 1 The application environment includes a host 102 and a data processor 104. The data processor 104 is connected with at least one NVMe solid state disk (NVMe SSD). Some of the NVMe SSDs can support the FDP function, and some of the NVMe SSDs can not support the FDP function. The data processor 104 manages and schedules the connected NVMe SSDs by using the scheduling method of the NVMe solid state disk provided by the application, and realizes the resource allocation of the virtual block device. The host 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, servers, etc.

[0066] In an exemplary embodiment, as Figure 2As shown, a scheduling method of an NVMe solid state disk is provided, and the method is applied to Figure 1 The method is described by taking the data processor 104 in the data processing system 100 as an example, and the method comprises the following steps.

[0067] In step S202, a request for creating a virtual block device is received.

[0068] The data processor is connected with a host (HOST) and receives a request sent by the host. The host refers to a front-end device in a data center, and a plurality of virtual devices or containers can be created on the host through virtualization technology. In this embodiment, the host serves as an initiator of an action and sends a request for a virtual block device. The virtual block device is used to provide high-performance and low-latency virtual storage close to the native performance of a physical NVMe SSD for the host. The request for creating a virtual block device is used to instruct a data processing unit (DPU hereinafter) to map and authorize a part of space from all storage resources to a virtual block device and create a virtual block device for the host to use.

[0069] In step S204, a target NVMe solid state disk meeting the requirements is allocated to the virtual block device based on the request.

[0070] The request carries information related to the virtual block device to be created, and the DPU selects a target NVMe SSD meeting the requirements from all connected NVMe SSDs according to the information carried in the request.

[0071] Optionally, the request carries the capacity of the virtual block device, and the DPU selects an NVMe SSD with an idle space not less than the capacity of the virtual block device from all connected NVMe SSDs as the target NVMe SSD.

[0072] Optionally, the request carries the capacity of the virtual block device and a parameter indicating that the virtual block device enables a flexible data placement (FDP hereinafter) function, and the DPU selects an NVMe SSD with an idle space not less than the capacity of the virtual block device and supporting the FDP function from all connected NVMe SSDs as the target NVMe SSD. Correspondingly, in the case where the request does not indicate that the virtual block device enables the FDP function, the DPU selects an NVMe SSD with an idle space not less than the capacity of the virtual block device and not supporting the FDP function from all connected NVMe SSDs as the target NVMe SSD.

[0073] In step S206, it is detected whether the target NVMe solid state disk supports the flexible data placement function in the case where the allocation is successful.

[0074] The DPU can detect whether the target NVMe SSD supports the FDP function in real time by reading information related to the FDP function in the target NVMe SSD. The DPU can also query the capability information of the target NVMe SSD from a pre-constructed preset capability database to determine whether the target NVMe SSD supports the FDP function.

[0075] Optionally, the real-time detection method includes obtaining Identify Controller information of the target NVMe SSD, screening fields related to the FDP, and determining whether the target NVMe SSD supports the FDP function according to the field values. For example, if the value of the FDPSupported field is “Yes”, it indicates that the NVMe SSD supports the FDP function.

[0076] Optionally, the real-time detection method includes obtaining NVMe version information of the target NVMe SSD, and determining whether the target NVMe SSD supports the FDP function according to the NVMe version information. For example, if the NVMe version number is higher than a set value, it is determined that the target NVMe SSD supports the FDP function; if the NVMe version number is not higher than the set value, it is determined that the target NVMe SSD does not support the FDP function.

[0077] In step S208, if the target NVMe SSD supports the FDP function, a plurality of PIDs to be allocated are selected from a placement identifier list (PIDL, PID list for short) of the target NVMe SSD. In a specific implementation, a plurality of PIDs in an idle state are selected from the PID list.

[0078] In step S208, if the target NVMe SSD supports the FDP function, a plurality of PIDs to be allocated are selected from a placement identifier list (PIDL, PID list for short) of the target NVMe SSD. In a specific implementation, a plurality of PIDs in an idle state are selected from the PID list.

[0079] Exemplarily, the preset database records the PID information of each NVMe SSD, the logical block address (LBA) information of each PID, and the allocation state of each PID. Optionally, the logical block address information recorded in the preset database is an LBA segment size, according to the order of each PID in the PID list and the LBA segment size, the corresponding LBA space displacement of each PID on the physical NVMe SSD is determined, and according to the LBA space displacement and the LBA segment size, the corresponding LBA segment of each PID is determined. Optionally, the logical block address information recorded in the preset database is an LBA segment, and according to the information of a plurality of PIDs, the preset database is queried, so that the LBA segments corresponding to the plurality of PIDs can be determined.

[0080] Wherein, the plurality of PIDs can constitute a PID list, the DPU uses the allocated PID list and the LBA space to initialize the virtual block device, and creates a virtual block device supporting the FDP function, so that the FDP capability of the DPU side physical NVMe SSD is automatically transmitted to the virtual block device on the front-end HOST.

[0081] Step S210, in the case that the target NVMe solid state disk does not support the flexible data placement function, a virtual block device not supporting the flexible data placement function is created according to the logical block address space of the target NVMe solid state disk.

[0082] Wherein, in the case that the target NVMe SSD does not support the FDP function, the LBA space is directly allocated from the target NVMe SSD to the virtual block device, and a virtual block device not supporting the FDP function is created.

[0083] In the scheduling method of the NVMe solid state disk, a request for creating a virtual block device is received; based on the request, a target NVMe solid state disk meeting the requirements is allocated for the virtual block device; in the case of successful allocation, it is detected whether the target NVMe solid state disk supports a flexible data placement function; in the case that the target NVMe solid state disk supports the flexible data placement function, a plurality of placement identifiers to be allocated are selected from a placement identifier list of the target NVMe solid state disk, and a virtual block device supporting the flexible data placement function is created according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers; in the case that the target NVMe solid state disk does not support the flexible data placement function, a virtual block device not supporting the flexible data placement function is created according to a logical block address space of the target NVMe solid state disk. In the above manner, the data processor can automatically identify whether each NVMe SSD supports the FDP function, and in response to the request, if the allocated physical NVMe SSD supports the FDP function, a virtual block device supporting the FDP function is created, thereby transparently mapping and exposing the FDP capability of the DPU side physical NVMe SSD to the front-end virtual block device, so that the host side can correctly use the FDP technology on the virtual block device, reducing the write amplification of the virtual block device. If the allocated physical NVMe SSD supports the FDP function, a virtual block device not supporting the FDP function is created. The data placement control consistent with the physical disk capability is realized to balance high performance, low delay, device life optimization and easy operation and maintenance. It makes it possible to deploy NVMe SSDs with and without FDP support at the physical level, improving the compatibility and deployment flexibility of the data processor.

[0084] In one exemplary embodiment, selecting a plurality of placement identifiers to be allocated from the placement identifier list of the target NVMe solid state disk includes: determining the logical block address segment size of each placement identifier in the target NVMe solid state disk; determining the number of placement identifiers of the virtual block device according to the capacity of the virtual block device and the logical block address segment size; selecting a plurality of placement identifiers in an idle state from the placement identifier list of the target NVMe solid state disk; wherein the number of selected placement identifiers is the same as the determined number of placement identifiers.

[0085] The LBA segment size of each PID in the target NVMe SSD is determined by querying the data from the preset database. The preset database refers to a database for storing information related to each NVMe SSD, which records the PID information of each NVMe SSD, the LBA information of each PID, and the allocation state of each PID. The LBA information of each PID recorded in the preset database can be the LBA segment size, and the LBA segment sizes of multiple PIDs corresponding to the same NVMe SSD are the same. According to the target NVMe SSD, the LBA segment size of each PID in the target NVMe SSD can be determined by querying the preset database. Alternatively, the LBA information recorded in the preset database can be the LBA segment, and according to the target NVMe SSD, the LBA segment of any one PID in the target NVMe SSD is determined, so as to determine the LBA segment size.

[0086] Suppose the LBA segment size of each PID in the target NVMe SSD is LBA_PID, and the capacity of the virtual block device to be created is VIRT_NVME_SIZE. The number of placement identifiers NUM_PID of the virtual block device is determined by the following formula: NUM_PID = VIRT_NVME_SIZE / LBA_PID, and the calculation result is rounded up.

[0087] It can be understood that each PID is only effective within the same NVMe SSD. When allocating storage space from a physical NVMe SSD supporting FDP, the corresponding Placement Identifiers need to be occupied, and each virtual block device cannot occupy the same PID on a physical NVMe SSD.

[0088] The allocation state recorded in the preset database includes an idle state or an allocated state. According to the data stored in the preset database, the DPU selects NUM_PID PIDs in the idle state from the PID list of the target NVMe SSD. Alternatively, after selecting multiple placement identifiers in the idle state, the method further comprises: the DPU adjusts the allocation state of the selected multiple placement identifiers in the preset database to the allocated state.

[0089] Optionally, the logical block address information recorded in the preset database is LBA segment size, the LBA space displacement corresponding to each PID on the physical NVMe SSD is determined according to the order of each PID in the PID list and the LBA segment size, and the LBA segment corresponding to each PID is determined according to the LBA space displacement and the LBA segment size. Optionally, the logical block address information recorded in the preset database is an LBA segment, and the LBA segment corresponding to the plurality of PIDs can be determined by querying the preset database according to the information of the plurality of PIDs.

[0090] The DPU allocates the plurality of PIDs and the LBA segments corresponding to the plurality of PIDs determined by the embodiment to the virtual block device. The DPU provides the virtual block device for the front-end host by using the virtualization capability, and the data of the virtual block device can be configured to be stored in the physical NVMe SSD on the DPU side, specifically in the configured LBA segment.

[0091] In the embodiment, the DPU allocates the PIDs and the physical space for the virtual block device of the front-end host in combination with the related information of the physical NVMe SSD and the capacity of the virtual block device, thereby enabling the FDP capability for the virtual block device.

[0092] In an exemplary embodiment, before step S202, the method further comprises: obtaining the total capacity and placement identifier information of each NVMe solid state disk supporting the flexible data placement function from a preset capability database; for each NVMe solid state disk supporting the flexible data placement function, dividing the total capacity according to the placement identifier information to obtain the logical block address segment size corresponding to each placement identifier; and storing the placement identifier information of each NVMe solid state disk supporting the flexible data placement function and the logical block address segment size corresponding to each placement identifier.

[0093] The preset capability database is a database for storing the capability information of each NVMe SSD constructed in advance, and the data stored in the preset capability database includes but is not limited to: the total capacity of each NVMe SSD, the capability information (whether supporting the FDP function) of each NVMe SSD, and the PID information of each NVMe SSD. The PID information recorded in the preset capability database can be the number and distribution of PIDs, and can also be a PID list.

[0094] In an alternative implementation, based on the preset capability database, for each NVMe SSD supporting the FDP function, the total capacity (denoted as LBA_total) and the number of PIDs (denoted as N) of the NVMe SSD are obtained, and the entire LBA space is evenly divided into N segments, each LBA segment corresponding to a PID. The LBA segment size of each PID LBA_PID = LBA_total / N. Optionally, the LBA segment size and / or the LBA segment of each PID are taken as logical block address information.

[0095] It can be understood that the LBA segments corresponding to each PID in the same NVMe SSD are sequentially arranged on the LBA of the NVMe SSD, forming continuous but non-overlapping space intervals.

[0096] Exemplarily, the storage process includes: storing the PID information (such as the number of PIDs) of each NVMe SSD supporting the FDP function, and the LBA information (such as the LBA segment size) corresponding to each PID, into the preset database. Initially, the PIDs of each NVMe SSD and the corresponding LBA space are in an unallocated state, and accordingly, the allocation state of each PID in the preset database is set to an idle state.

[0097] In this embodiment, the LBA space of the NVMe SSD is divided according to the PID dimension, so as to map data of different life cycles or different service types to different Reclaim Units of the physical disk, thereby providing data support for subsequent resource allocation of the virtual block device.

[0098] In an exemplary embodiment, step S204 includes: in the case where the request indicates that the virtual block device enables the flexible data placement function, filtering out a plurality of NVMe solid state disks supporting the flexible data placement function according to the preset capability database; detecting whether the idle space of the NVMe solid state disk supporting the flexible data placement function is less than the capacity of the virtual block device; and allocating a target NVMe solid state disk supporting the flexible data placement function to the virtual block device, the idle space of the target NVMe solid state disk being not less than the capacity of the virtual block device.

[0099] Optionally, the request indicates enabling the FDP function of the virtual block device by carrying a preset parameter, and the preset parameter is an additional parameter introduced for the FDP, used to control whether the created virtual block device supports the FDP function. If the preset parameter for enabling the FDP function is passed in the request, the DPU filters the physical NVMe SSDs marked as supporting the FDP function from the preset capability database. Further, the free space of the selected NVMe SSD needs to be greater than or equal to the capacity of the virtual block device. If there is no target NVMe SSD meeting the requirement at present, the request fails, and the DPU returns error information to the host. The meeting the requirement means that the free space is not less than the capacity of the virtual block device and supports the FDP function.

[0100] Optionally, the free space of each NVMe SSD is determined according to the data stored in the preset database: for each NVMe SSD, the number of PIDs in an idle state corresponding to the NVMe SSD is determined according to the allocation state of each PID recorded in the preset database; and the free space size is determined according to the number of PIDs and the LBA segment size corresponding to each PID in the NVMe SSD.

[0101] If there is an NVMe SSD meeting the requirement, a physical NVMe SSD in its range is selected for the backend bearing of the virtual block device. In an optional implementation, if there are multiple NVMe SSDs meeting the requirement, the NVMe SSD with the smallest remaining free capacity is selected as the target NVMe SSD corresponding to the virtual block device.

[0102] In this embodiment, considering the parameters specified by the host, the capability information and the free space of each connected NVMe SSD, a suitable target NVMe SSD is selected, which can meet the individualized requirements of the host side and the capacity requirements of the virtual block device, and the reliability of constructing the virtual block device is improved.

[0103] In an exemplary embodiment, the method further comprises: in the process of starting or managing service initialization of the data processor, traversing each connected NVMe solid state disk, identifying the total capacity of each NVMe solid state disk; detecting whether each NVMe solid state disk supports the flexible data placement function to obtain the capability information; obtaining the placement identifier list of the NVMe solid state disk supporting the flexible data placement function to obtain the placement identifier information; and storing the total capacity, the capability information and the placement identifier information of each NVMe solid state disk into the preset capability database.

[0104] In the embodiment, the FDP information management module is responsible for unified capability identification and information collection of all local NVMe SSDs on the DPU side in the DPU software system initialization stage, aiming to provide basic data support for subsequent PID-based space allocation. The following content is included: when the DPU starts or the management service initializes, all accessed local NVMe SSDs are automatically traversed to identify the basic information of each device, such as capacity, device identifier, and namespace. The capability of each device is detected to determine whether it supports the FDP function, which is used for subsequent scheduling logic to distinguish between "devices supporting the FDP function" and "devices not supporting the FDP function". For NVMe SSDs supporting the FDP function, the PID list and related information provided by the NVMe SSDs are further obtained, and each PID is only effective on the NVMe SSD on which it is located. The capability information is centrally managed and registered, and all collected information (including the capacity of each NVMe SSD, whether it supports the FDP function, the number and distribution of PIDs, etc.) is summarized and registered in a local preset capability database or memory management structure for subsequent space allocation. Optionally, real-time sensing of device attribute changes caused by hot plugging is performed, and the NVMe SSD information stored in the preset capability database is adjusted according to the sensed information.

[0105] In the embodiment, it is automatically identified whether each physical NVMe device supports the FDP function, and the devices supporting and not supporting the FDP function are classified and managed, so that the mixed deployment of NVMe SSDs supporting and not supporting the FDP function at the physical level is possible, and the compatibility and deployment flexibility of the DPU are improved.

[0106] In an exemplary embodiment, the method further comprises: in the case where the request does not indicate that the virtual block device enables the flexible data placement function, allocating, for the virtual block device, a target NVMe solid state disk that does not support the flexible data placement function and has free space not less than the capacity of the virtual block device; and in the case where the free space of all NVMe solid state disks that do not support the flexible data placement function is less than the capacity of the virtual block device, allocating, for the virtual block device, a target NVMe solid state disk that supports the flexible data placement function and has free space not less than the capacity of the virtual block device.

[0107] Optionally, if the preset parameter is not carried in the request, i.e., the parameter enabling the FDP is not transmitted in the request, the DPU selects, among the NVMe SSDs that do not support the FDP function, an NVMe SSD that has free space not less than the capacity of the virtual block device as the target NVMe SSD corresponding to the virtual block device, and can randomly select a physical disk with sufficient free space as the backend storage device. Optionally, the DPU determines the free space corresponding to the NVMe SSD that does not support the FDP function by querying the remaining capacity of the NVMe SSD.

[0108] If there is no NVMe SSD with sufficient free space and without FDP function support at present, the DPU attempts to select an NVMe SSD with sufficient free space from the NVMe SSDs supporting FDP function. If it still fails (i.e., the free space of all the NVMe SSDs connected by the DPU is insufficient), the request fails, and the DPU returns error information to the host.

[0109] In this embodiment, the appropriate target NVMe SSD is selected considering the parameters specified by the host, the capability information and free space of each NVMe SSD connected, which can meet the individualized requirements of the host side and the capacity requirements of the virtual block device, and the reliability of constructing the virtual block device is improved.

[0110] In an exemplary embodiment, the method further comprises: receiving command information transmitted by the host through the current virtual block device; and accessing the NVMe solid state disk corresponding to the placement identifier information according to the placement identifier information carried in the command information.

[0111] After the DPU creates the virtual block device supporting FDP function, the NVMe kernel driver on the front-end host will identify that the virtual block device supports FDP when loading the virtual block device, so as to obtain the PID information. Exemplarily, when the host submits an IO (Input / Output) request through the virtual block device, if the user specifies the corresponding PID in the NVMe command word, the DPU in the back-end intercepts the NVMe command word, and uses the PID information in the command word to access the corresponding physical NVMe SSD, so that the virtual block device also has FDP capability.

[0112] In an exemplary embodiment, with reference to Figure 3 , the scheduling method of the NVMe solid state disk comprises the following steps:

[0113] 1. The DPU controls the creation of a virtual NVMe block device.

[0114] 2. Determine whether the virtual block device enables FDP function according to the request.

[0115] 3. When the request specifies that the virtual block device enables FDP, select a disk satisfying the size of the virtual block device from the physical NVMe SSDs supporting FDP feature.

[0116] 4. When the request does not specify that the virtual block device enables FDP, the DPU selects a disk satisfying the size of the virtual block device from all the physical NVMe SSDs, and preferentially starts allocation from the disk without FDP capability.

[0117] 5、In the case of successfully selecting a physical NVMe SSD, the FDP capability of the currently selected physical disk needs to be checked to determine whether the allocated physical NVMe SSD supports FDP.

[0118] 6、If the allocated physical NVMe SSD supports FDP function, based on the size of the virtual block device divided by the LBA segment size corresponding to the PID (i.e. LBA_PID), the value is the number N of PIDs allocated to the virtual block device, N free PIDs are allocated to the virtual block device from the PID list of the selected physical NVMe SSD.

[0119] 7、Get the allocated PID list and its corresponding LBA space, and DPU creates a virtual NVMe block device.

[0120] 8、If the allocated physical NVMe SSD does not support FDP function, DPU creates a virtual NVMe block device that does not support FDP capability.

[0121] It should be understood that although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by combination are within the scope of protection of the present application.

[0122] Based on the same inventive concept, the embodiments of the present application also provide a scheduling device of an NVMe solid state disk for implementing the scheduling method of the NVMe solid state disk as described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more scheduling device embodiments of the NVMe solid state disk provided below can refer to the limitations of the NVMe solid state disk scheduling method in the above, which will not be repeated here.

[0123] In one exemplary embodiment, as shown in Figure 4 a scheduling device of an NVMe solid state disk is provided, which is applied to a data processor, and the device comprises:

[0124] The receiving module 402 is configured to receive a request for creating a virtual block device.

[0125] The selecting module 404 is configured to assign a target NVMe SSD satisfying the requirement to the virtual block device based on the request.

[0126] The detecting module 406 is configured to detect whether the target NVMe SSD supports a flexible data placement function in a case where the assignment is successful.

[0127] The configuring module 408 is configured to select a plurality of placement identifiers to be assigned from a placement identifier list of the target NVMe SSD, and create the virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers, in a case where the target NVMe SSD supports the flexible data placement function.

[0128] The configuring module 408 is further configured to create the virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe SSD, in a case where the target NVMe SSD does not support the flexible data placement function.

[0129] In the above scheduling apparatus of the NVMe SSD, the data processor can automatically identify whether each NVMe SSD supports the FDP function, and in response to the request, if the assigned physical NVMe SSD supports the FDP function, the virtual block device supporting the FDP function is created, so that the FDP capability of the physical NVMe SSD on the DPU side is transparently mapped and exposed to the front-end virtual block device, and the host side can correctly use the FDP technology on the virtual block device, thereby reducing the write amplification of the virtual block device. If the assigned physical NVMe SSD supports the FDP function, the virtual block device not supporting the FDP function is created. The data placement control consistent with the physical disk capability is implemented to balance the high performance, low latency, device life optimization and easy operation and maintenance. The mixed deployment of the NVMe SSDs supporting the FDP and not supporting the FDP at the physical level is made possible, and the compatibility and deployment flexibility of the data processor are improved.

[0130] In an exemplary embodiment, the configuring module 408 is further configured to determine a logical block address segment size of each placement identifier in the target NVMe SSD, determine a number of placement identifiers of the virtual block device according to a capacity of the virtual block device and the logical block address segment size, and select a plurality of placement identifiers in an idle state from a placement identifier list of the target NVMe SSD, wherein the number of the selected placement identifiers is the same as the determined number of the placement identifiers.

[0131] In an exemplary embodiment, the scheduling apparatus of the NVMe solid state disk further comprises a space allocation module, configured to: obtain total capacity and placement identifier information of each NVMe solid state disk supporting the flexible data placement function from the preset capability database; divide the total capacity according to the placement identifier information to obtain a logical block address segment size corresponding to each placement identifier for each NVMe solid state disk supporting the flexible data placement function; and store the placement identifier information of each NVMe solid state disk supporting the flexible data placement function and the logical block address segment size corresponding to each placement identifier.

[0132] In an exemplary embodiment, the selection module 404 is further configured to: in a case where the request indicates that the virtual block device enables the flexible data placement function, filter out a plurality of NVMe solid state disks supporting the flexible data placement function according to the preset capability database; detect whether the idle space of the NVMe solid state disk supporting the flexible data placement function is smaller than the capacity of the virtual block device; and allocate, for the virtual block device, a target NVMe solid state disk whose idle space is not smaller than the capacity of the virtual block device and which supports the flexible data placement function.

[0133] In an exemplary embodiment, the scheduling apparatus of the NVMe solid state disk further comprises an FDP information management module, configured to: in a process of starting or initializing a service of a data processor, traverse each NVMe solid state disk connected, identify total capacity of each NVMe solid state disk; detect whether each NVMe solid state disk supports the flexible data placement function to obtain capability information; obtain a placement identifier list of the NVMe solid state disk supporting the flexible data placement function to obtain placement identifier information; and store the total capacity, the capability information and the placement identifier information of each NVMe solid state disk into a preset capability database.

[0134] In an exemplary embodiment, the selection module 404 is further configured to: in a case where the request does not indicate that the virtual block device enables the flexible data placement function, allocate, for the virtual block device, a target NVMe solid state disk whose idle space is not smaller than the capacity of the virtual block device and which does not support the flexible data placement function; and in a case where the idle space of all the NVMe solid state disks not supporting the flexible data placement function is smaller than the capacity of the virtual block device, allocate, for the virtual block device, a target NVMe solid state disk whose idle space is not smaller than the capacity of the virtual block device and which supports the flexible data placement function.

[0135] In an exemplary embodiment, the scheduling apparatus of the NVMe solid state disk further comprises an access module, configured to: receive command information transmitted by a host through a current virtual block device; and access an NVMe solid state disk corresponding to placement identifier information carried in the command information according to the placement identifier information.

[0136] The various modules in the scheduling device of the NVMe solid state disk can be implemented by software, hardware, and combinations thereof, in whole or in part. The various modules can be embedded in or independent of a processor in the data processor in hardware form, or stored in a memory in the data processor in software form, so as to be called and executed by the processor to perform the operations corresponding to the various modules.

[0137] In one exemplary embodiment, a data processor connected with at least one NVMe solid state disk is provided, and the data processor is configured to perform the following steps: receiving a request for creating a virtual block device; allocating a target NVMe solid state disk satisfying the requirements for the virtual block device based on the request; in the case of successful allocation, detecting whether the target NVMe solid state disk supports a flexible data placement function; in the case that the target NVMe solid state disk supports the flexible data placement function, selecting a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk, and creating the virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers; in the case that the target NVMe solid state disk does not support the flexible data placement function, creating the virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid state disk.

[0138] In one embodiment, the processor, when executing the computer program, further implements the following steps: determining a logical block address segment size of each placement identifier in the target NVMe solid state disk; determining a number of placement identifiers of the virtual block device according to a capacity of the virtual block device and the logical block address segment size; and selecting a plurality of placement identifiers in an idle state from a placement identifier list of the target NVMe solid state disk; wherein the number of the selected placement identifiers is the same as the determined number of placement identifiers.

[0139] In one embodiment, the processor, when executing the computer program, further implements the following steps: obtaining a total capacity and placement identifier information of each NVMe solid state disk supporting the flexible data placement function from a preset capability database; for each NVMe solid state disk supporting the flexible data placement function, dividing the total capacity according to the placement identifier information to obtain a logical block address segment size corresponding to each placement identifier; and storing the placement identifier information of each NVMe solid state disk supporting the flexible data placement function and the logical block address segment size corresponding to each placement identifier.

[0140] In one embodiment, the processor, when executing the computer program, further implements the following steps: in the case that the request indicates that the virtual block device enables the flexible data placement function, screening a plurality of NVMe solid state disks supporting the flexible data placement function according to the preset capability database; detecting whether the idle space of the NVMe solid state disk supporting the flexible data placement function is less than the capacity of the virtual block device; and allocating a target NVMe solid state disk with an idle space not less than the capacity of the virtual block device and supporting the flexible data placement function to the virtual block device.

[0141] In one embodiment, the processor, when executing the computer program, further implements the following steps: in the process of starting or managing service initialization of the data processor, traversing each NVMe solid state disk connected to identify the total capacity of each NVMe solid state disk; detecting whether each NVMe solid state disk supports the flexible data placement function to obtain capability information; obtaining a placement identifier list of the NVMe solid state disk supporting the flexible data placement function to obtain placement identifier information; and storing the total capacity, the capability information and the placement identifier information of each NVMe solid state disk into the preset capability database.

[0142] In one embodiment, the processor, when executing the computer program, further implements the following steps: in the case that the request does not indicate that the virtual block device enables the flexible data placement function, allocating a target NVMe solid state disk with an idle space not less than the capacity of the virtual block device and not supporting the flexible data placement function to the virtual block device; and in the case that the idle space of all the NVMe solid state disks not supporting the flexible data placement function is less than the capacity of the virtual block device, allocating a target NVMe solid state disk with an idle space not less than the capacity of the virtual block device and supporting the flexible data placement function to the virtual block device.

[0143] In one embodiment, the processor, when executing the computer program, further implements the following steps: receiving command information transmitted by the host through the current virtual block device; and accessing the NVMe solid state disk corresponding to the placement identifier information according to the placement identifier information carried in the command information.

[0144] In one exemplary embodiment, with reference to Figure 1The application also provides a computing device including a host 102 and a data processor 104 provided by any one of the embodiments of the application. The data processor 104 is connected with at least one NVMe solid state disk, i.e. NVMe SSD, some of which support FDP function and some of which support FDP function. The data processor 104 of the embodiment can automatically identify whether each NVMe SSD supports FDP function, and in response to a request of the host, if the assigned physical NVMe SSD supports FDP function, a virtual block device supporting FDP function is created, so that the FDP capability of the DPU side physical NVMe SSD is transparently mapped and exposed to the front-end virtual block device, so that the host side can correctly use FDP technology on the virtual block device, reducing the write amplification of the virtual block device. If the assigned physical NVMe SSD supports FDP function, a virtual block device not supporting FDP function is created. The data placement control consistent with the physical disk capability is implemented to balance high performance, low latency, device life optimization and easy operation and maintenance. It makes it possible to mix and deploy NVMe SSDs supporting FDP and not supporting FDP at the physical level, improving the compatibility and deployment flexibility of the data processor 104.

[0145] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0147] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0148] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method for scheduling an NVMe solid state disk, characterized in that, The method is applied to a data processor, and the method comprises: receiving a request for creating a virtual block device; allocating a target NVMe solid state disk satisfying a requirement for the virtual block device based on the request; in a case where the allocation is successful, detecting whether the target NVMe solid state disk supports a flexible data placement function; in a case where the target NVMe solid state disk supports the flexible data placement function, selecting a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk, and creating a virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers; in a case where the target NVMe solid state disk does not support the flexible data placement function, creating a virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid state disk.

2. The method of claim 1, wherein, The selecting of the plurality of placement identifiers to be allocated from the placement identifier list of the target NVMe solid state disk comprises: determining a logical block address segment size of each placement identifier in the target NVMe solid state disk; determining a number of placement identifiers of the virtual block device according to a capacity of the virtual block device and the logical block address segment size; selecting a plurality of placement identifiers in an idle state from the placement identifier list of the target NVMe solid state disk; wherein the number of the selected placement identifiers is the same as the determined number of the placement identifiers.

3. The method of claim 2, wherein, Before the receiving of the request for creating the virtual block device, the method further comprises: obtaining total capacity and placement identifier information of each NVMe solid state disk supporting the flexible data placement function from a preset capability database; dividing the total capacity to obtain a logical block address segment size corresponding to each placement identifier according to the placement identifier information for each NVMe solid state disk supporting the flexible data placement function; storing the placement identifier information of each NVMe solid state disk supporting the flexible data placement function and the logical block address segment size corresponding to each placement identifier.

4. The method of claim 1, wherein, The allocating of the target NVMe solid state disk satisfying the requirement for the virtual block device based on the request comprises: in a case where the request indicates that the virtual block device enables the flexible data placement function, screening a plurality of NVMe solid state disks supporting the flexible data placement function according to a preset capability database; detecting whether an idle space of the NVMe solid state disk supporting the flexible data placement function is less than a capacity of the virtual block device; allocating, for the virtual block device, a target NVMe solid state disk whose idle space is not less than the capacity of the virtual block device and which supports the flexible data placement function.

5. The method of claim 4, wherein, The method further comprises: in a process of starting or initializing a service of the data processor, traversing each NVMe solid state disk connected to identify total capacity of each NVMe solid state disk; detecting whether each NVMe solid state disk supports the flexible data placement function to obtain capability information; Obtain a placement identifier list of the NVMe solid state disk supporting the flexible data placement function, to obtain the placement identifier information; Store the total capacity, capability information and placement identifier information of each NVMe solid state disk into a preset capability database.

6. The method of claim 1, wherein, The method further comprises: In a case where the request does not indicate that the virtual block device enables the flexible data placement function, allocating, for the virtual block device, a target NVMe solid state disk which has an idle space not less than a capacity of the virtual block device and does not support the flexible data placement function; In a case where all the idle spaces of the NVMe solid state disks which do not support the flexible data placement function are less than the capacity of the virtual block device, allocating, for the virtual block device, a target NVMe solid state disk which has an idle space not less than the capacity of the virtual block device and supports the flexible data placement function.

7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: Receiving command information transmitted by a host through a current virtual block device; Accessing, according to placement identifier information carried in the command information, an NVMe solid state disk corresponding to the placement identifier information.

8. A scheduling apparatus of an NVMe solid state disk, characterized by, The device is applied to a data processor, and the device comprises: A receiving module configured to receive a request for creating a virtual block device; An allocating module configured to allocate, based on the request, a target NVMe solid state disk meeting requirements for the virtual block device; A detecting module configured to, in a case where the allocation is successful, detect whether the target NVMe solid state disk supports a flexible data placement function; A creating module configured to, in a case where the target NVMe solid state disk supports the flexible data placement function, select a plurality of placement identifiers to be allocated from a placement identifier list of the target NVMe solid state disk, and create a virtual block device supporting the flexible data placement function according to the plurality of placement identifiers and logical block address segments corresponding to the plurality of placement identifiers; The creating module is further configured to, in a case where the target NVMe solid state disk does not support the flexible data placement function, create a virtual block device not supporting the flexible data placement function according to a logical block address space of the target NVMe solid state disk.

9. A data processor, characterized by The data processor is connected with at least one NVMe solid state disk, and the data processor is configured to perform steps of the method according to any one of claims 1 to 7.

10. A computing device, comprising: The computing device comprises a host and the data processor according to claim 9.

Citation Information

Patent Citations

  • Adaptive construction method of storage block and storage device

    CN117762341A

  • System and method for data storage and storage device

    CN119088287A