WO2020083067A1 - 资源管理的方法和装置 - Google Patents

资源管理的方法和装置 Download PDF

Info

Publication number
WO2020083067A1
WO2020083067A1 PCT/CN2019/111136 CN2019111136W WO2020083067A1 WO 2020083067 A1 WO2020083067 A1 WO 2020083067A1 CN 2019111136 W CN2019111136 W CN 2019111136W WO 2020083067 A1 WO2020083067 A1 WO 2020083067A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
virtual disk
disk
virtual
access request
Prior art date
Application number
PCT/CN2019/111136
Other languages
English (en)
French (fr)
Inventor
管俊雄
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19876096.9A priority Critical patent/EP3862885A4/en
Publication of WO2020083067A1 publication Critical patent/WO2020083067A1/zh
Priority to US17/239,860 priority patent/US20210240353A1/en

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/0608Saving storage space on 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
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • 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/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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
    • 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/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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/0688Non-volatile semiconductor memory arrays

Definitions

  • the present application relates to the field of storage, and more specifically, to a method and apparatus for resource management.
  • Embodiments of the present application provide a method for resource management, which can improve resource utilization rate and access rate of a device.
  • a resource management method including: a first device receives a request message sent by a second device, the request message is used to instruct the first device to allocate memory for the second device, the The request message carries the size of the requested memory, and the first device and the second device communicate based on a network protocol; the first device determines the size of the requested memory according to the size of the requested memory carried in the request message.
  • the memory interval of a device is divided; the first device uses the memory interval to generate a virtual disk; the first device provides the virtual disk to the second device as the memory of the second device.
  • any two devices communicate through the NVMe over Fabric protocol
  • the Fabric protocol may include a fiber channel (FC) protocol, a transmission control protocol / Internet interconnection protocol (transmission control / protocol / internet protocol), TCP / IP), remote direct data access based Ethernet (RDMA over converged ethernet, RoCE) protocol or wireless bandwidth (infiniband, IB) protocol.
  • the first device when the second device requests the first device to allocate memory for the second device, the first device divides a part of the memory interval in its own memory and uses this part of the memory interval to generate a virtual disk, and finally The generated virtual disk is provided to the second device as the memory of the second device, so that the second device can use the memory allocated by the first device to improve the resource utilization rate and access rate of the device.
  • the use of the memory interval to generate a virtual disk includes: the first device simulating the memory interval as a disk space; the first device using the disk space to generate the virtual disk Virtual disk.
  • the first device first simulates the divided memory interval as a disk interval, and then uses the part of the disk space to generate a virtual disk, and then provides the generated virtual disk to the second device as the memory of the second device .
  • the first device provides the virtual disk to the first device as a memory of the first device, including: the first device receives the data sent by the second device Disk query command; the first device reports the virtual disk to the first device as the memory of the first device.
  • the virtual disk is mounted to the second device: after receiving the disk query command sent by the second device, the first device The related information of the disk is reported to the second device, so that the second device can map the virtual disk to the virtual memory of the second device according to the related information of the virtual disk reported by the first device.
  • the related information of the virtual disk reported by the first device to the second device may include the identifier of the virtual disk and the size of the virtual disk space.
  • the method further includes:
  • the first device receives a disk type query command sent by the second device, where the disk type query command is used to query the type of storage device that generates the virtual disk; the first device sends to the second device Instruction information, the instruction information indicating that the virtual disk is generated by the memory interval.
  • the second device before the second device maps the virtual disk to the virtual memory of the second device, the second device also needs to determine the type of storage device that generates the virtual disk, that is, whether the virtual disk is generated by the first device Generated in the memory interval, the second device sends a disk type query command to the first device.
  • the disk type query command is used to query the first device for the type of storage device that generates the virtual disk.
  • the first device queries the command based on the disk type.
  • the second device sends instruction information used to indicate to the second device that the virtual disk is generated by the memory interval of the first device.
  • the method further includes: the first device receives a virtual disk access request sent by the second device, and the virtual disk access request includes an identifier of the virtual disk; According to the access request of the virtual disk, the first device accesses a memory section that generates the virtual disk.
  • the second device determines whether the memory address carried in the memory access request falls within the address range provided by the virtual memory. If the memory address carried by the memory access request falls within the address range provided by the virtual memory, the second device needs to convert the memory address to the logical address of the virtual disk corresponding to the memory address, and then convert the memory access request to carry the virtual disk.
  • the virtual disk access request that identifies the logical address of the virtual disk corresponding to the memory address and requests the virtual disk access to the first device.
  • a method for resource management including: a second device sends a request message to a first device, the request message is used to instruct the first device to allocate memory for the second device, the request The message carries the size of the requested memory, and the first device and the second device communicate based on a network protocol; the second device receives the virtual disk reported by the first device, and the virtual disk is determined by the first Generated by a memory interval in a device; the second device maps the virtual disk to the virtual memory of the second device.
  • the first device when the second device requests the first device to allocate memory for the second device, the first device divides a part of the memory interval in its own memory and uses this part of the memory interval to generate a virtual disk, and finally The generated virtual disk is provided to the second device as the memory of the second device, so that the second device can use the memory allocated by the first device to improve the resource utilization rate and access rate of the device.
  • the method further includes: the second device sends a disk query command to the first device, and the disk query command instructs the first device to report the virtual disk.
  • the virtual disk is mounted to the second device: after receiving the disk query command sent by the second device, the first device The related information of the disk is reported to the second device, so that the second device can map the virtual disk to the virtual memory of the second device according to the related information of the virtual disk reported by the first device.
  • the related information of the virtual disk reported by the first device to the second device may include the identifier of the virtual disk and the size of the virtual disk space.
  • the method further includes: the second device sending a disk type query command to the first device, where the disk type query command is used to query a storage device that generates the virtual disk Type; the second device receives instruction information sent by the first device, the instruction information is used to indicate that the virtual disk is generated by the memory interval; after receiving the instruction information, the second device Mapping the virtual disk to the virtual memory of the second device.
  • the second device before the second device maps the virtual disk to the virtual memory of the second device, the second device also needs to determine the type of storage device that generates the virtual disk, that is, whether the virtual disk is generated by the first device Generated in the memory interval, the second device sends a disk type query command to the first device.
  • the disk type query command is used to query the first device for the type of storage device that generates the virtual disk.
  • the first device queries the command based on the disk type.
  • the second device sends instruction information used to indicate to the second device that the virtual disk is generated by the memory interval of the first device.
  • the method further includes: the second device generates a memory access request; when the memory address carried in the memory access request falls within the address range provided by the virtual memory, the The second device determines the logical address of the virtual disk corresponding to the memory address; the second device converts the memory access request into an access request of the virtual disk, and the access request of the virtual disk includes the Identification of the virtual disk; the second device sends an access request of the virtual disk to the first device.
  • the second device determines whether the memory address carried in the memory access request falls within the address range provided by the virtual memory. If the memory address carried by the memory access request falls within the address range provided by the virtual memory, the second device needs to convert the memory address to the logical address of the virtual disk corresponding to the memory address, and then convert the memory access request to carry the virtual disk.
  • the virtual disk access request that identifies the logical address of the virtual disk corresponding to the memory address and requests the virtual disk access to the first device.
  • an apparatus for resource management is provided, and the apparatus is used to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus may include a unit for performing the method of resource management in the first aspect or any possible implementation manner of the first aspect.
  • an apparatus for resource management is provided, and the apparatus is configured to execute the method in the second aspect or any possible implementation manner of the second aspect.
  • the apparatus may include a unit for performing the method of resource management in the second aspect or any possible implementation manner of the second aspect.
  • a device for resource management includes a memory and a processor.
  • the memory is used to store instructions; the processor executes the instructions stored in the memory, so that the device executes the resource management method in the first aspect or any possible implementation manner of the first aspect.
  • a computing device includes a memory and a processor.
  • the memory is used to store instructions; the processor executes the instructions stored in the memory, so that the device executes the resource management method in the second aspect or any possible implementation manner of the second aspect.
  • a computer-readable storage medium in which instructions are stored in the computer-readable storage medium, and when the instructions run on a computer, the computer is caused to execute the first aspect or any possible implementation manner of the first aspect Resource management methods.
  • a computer-readable storage medium in which instructions are stored in the computer-readable storage medium, and when the instructions run on a computer, the computer is caused to perform the second aspect or any possible implementation manner of the second aspect Resource management methods.
  • a computer program product containing instructions which when executed on a computer, causes the computer to perform the method of resource management in the first aspect or any possible implementation manner of the first aspect.
  • a computer program product containing instructions that, when executed on a computer, cause the computer to perform the resource management method in the second aspect or any possible implementation manner of the second aspect.
  • FIG. 1 is a schematic structural diagram of a computer system 100 provided by this application.
  • FIG. 2 is a schematic flowchart of a resource management method 200 provided by this application.
  • FIG. 3 is a flowchart of a data access method 300 provided by this application.
  • FIG. 4 is a schematic structural diagram of an apparatus 400 provided by this application.
  • FIG. 5 is a schematic structural diagram of an apparatus 500 provided by this application.
  • FIG. 6 is a schematic structural diagram of a device 600 provided by this application.
  • the computer system 100 shown in FIG. 1 includes at least two devices (for example, device 101, device 102, device 103, and device 104), wherein any two devices communicate based on a network protocol.
  • any two devices communicate through the NVMe over Fabric protocol, where the Fabric protocol may include fiber channel (FC) protocol, transmission control protocol / Internet interconnection protocol (transmission control / protocol / internet) protocol, TCP / IP), Ethernet (RDMA over converged ethernet, RoCE) protocol or wireless bandwidth (infiniband, IB) protocol based on remote direct data access.
  • FC fiber channel
  • transmission control protocol / Internet interconnection protocol transmission control / protocol / internet
  • TCP / IP Transmission control / protocol / internet protocol
  • Ethernet RDMA over converged ethernet, RoCE
  • wireless bandwidth infiniband, IB protocol based on remote direct data access.
  • the device 101, the device 102, the device 103, and the device 104 are all configured with memory, and each device can use its own memory for data access.
  • a device with rich memory resources divides a part of a memory interval in its own memory, and uses this part of the memory interval to generate a virtual disk.
  • the disk provides the device with less memory resources as the memory of the device, so that the device with less memory resources can use the memory allocated by the device with rich memory resources to provide the resource utilization rate and access rate of the device.
  • the device in FIG. 1 may be a server or a controller when specifically implemented, and the computer system 100 may be a distributed system when specifically implemented, and the distributed system may be a distributed computing system or a distributed file system.
  • the distributed storage system may also be a distributed file storage system, a distributed block storage system, etc.
  • the following uses the device 101 in the computer system 100 to share resources to the device 102 as an example to describe the resource management method provided by the embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a resource management method 200 provided by an embodiment of the present application.
  • the method 200 includes at least the following steps.
  • the second device sends a request message to the first device.
  • the request message is used to instruct the first device to allocate memory for the second device.
  • the request message carries the size of the requested memory.
  • the first device and the second device perform the communication based on a network protocol. Communication.
  • the first device receives the request message sent by the second device.
  • the device 102 (for example, the second device) sends a request message to the device 101 (for example, the first device).
  • the request message is used to request the device 101 to allocate memory for the device 101, where the request message carries the request made by the device 102 The size of the memory.
  • the device 102 when the memory of the device 102 itself is insufficient, the device 102 sends a request message to the device 101.
  • the size of the memory requested by the device 102 carried in the request message is 100 Mbyte (megabytes).
  • the device 102 may also broadcast the request message to all other devices in the computer system 100, so that each device in the computer system 100 Both can receive the request message sent by the device 102, and the device that receives the request message can decide whether to allocate memory for the device 102 according to the usage of its own memory.
  • the above request message is generated based on the NVMe protocol, and the generated request message is encapsulated into a request message that can be transmitted in the network communication protocol according to the network communication protocol between the first device and the second device .
  • the first device (device 101) divides the memory interval from the memory of the first device (device 101) according to the size of the requested memory carried in the request message.
  • the device 101 after receiving the request message sent by the device 102, the device 101 first decapsulates the request message into a request message based on the NVMe protocol. According to the size of the memory requested by the device 102 carried in the unpacked request message, the device 101 divides the memory section for the device 102 in its own memory to meet the memory size carried in the request message.
  • the size of the memory requested by the device 102 carried in the request message is 100 Mbyte.
  • the device 101 divides the address range in its own memory into byte # 30 to byte # 1048604.
  • the memory section with addresses byte # 30 to byte # 1048604 is the memory section allocated by the device 101 to the device 102.
  • the first device (device 101) generates a virtual disk using the memory interval.
  • the device 101 uses the partial memory interval to generate a virtual disk, and provides the virtual disk to the device 102 as the memory of the device 102.
  • the virtual memory disk (Ramdisk) technology is first used to simulate the memory interval allocated for the device 102 as disk space, and then the disk space is constructed as a virtual disk that can be accessed by an external device, for example Namespace (Namespace).
  • Namespace Namespace
  • the first device provides the virtual disk to the second device (device 102) as the memory of the second device (device 102).
  • the virtual disk is mounted to the device 120.
  • the specific mounting process is: the device 101 receives the disk query command sent by the device 102, and the disk query command is used to instruct the device 101 reports to the device 102 the virtual disk allocated to the device 102.
  • the device 101 receives the disk query command sent by the device 102, and according to the disk query command, reports the relevant information of the virtual disk allocated to the device 102 (for example, the identifier of the virtual disk and the size of the virtual disk space) to the device 102.
  • the second device receives the virtual disk reported by the first device (device 101), and the virtual disk is generated by the memory interval in the first device (device 101).
  • the second device sends a disk type query command to the first device (device 101), where the disk type query command is used to query the type of the storage device that generates the virtual disk.
  • the device 102 needs to determine the type of storage device that generates the virtual disk.
  • the device 102 can send a disk type query command to the device 101.
  • the query command is used to query the device 101 whether the virtual disk is generated by a memory interval
  • the device 101 receives the disk type query command sent by the device 102, and determines whether the virtual disk is generated by the memory interval according to the disk type query command, if the device 101 determines that the virtual disk is generated by the memory interval.
  • the device 101 generates instruction information and sends the instruction information to the device 102.
  • the instruction information is used to indicate that the virtual disk allocated by the device 101 to the device 102 is generated by the memory interval.
  • the indication information may carry an identifier, and the identifier may be carried in one bit to indicate the type of storage device that generates the virtual disk.
  • the value of the bit carrying the identifier is 0, it means that the virtual disk is generated by the memory interval; when the value of the bit carrying the identifier is 1, it means that the virtual disk is not generated by the memory interval.
  • the second device maps the logical address space of the virtual hard disk to the memory space of the second device (device 102) as the second device (Device 102) virtual memory.
  • the device 102 After the device 102 receives the instruction information sent by the device 101, according to the instruction information, it is determined that the virtual disk allocated by the device 101 to the device 120 is generated by the memory interval of the device 101.
  • the device 102 expands its own memory space, expands its own memory space by a virtual memory space of the same size as the virtual disk, and then maps the address of the virtual memory space to the logical address of the virtual disk.
  • the device 102 determines that the size of the virtual disk space allocated by the device 101 is 100Mbyte, the device 102 expands its own memory space by a virtual memory space of 100Mbyte, and extends the address of the virtual memory space of 100Mbyte The logical address mapped to the virtual disk.
  • the first device When the second device requests the first device to allocate memory for the second device, the first device divides a part of the memory interval in its own memory and uses this part of the memory interval to generate a virtual disk, and finally provides the generated virtual disk to the first device.
  • the two devices serve as the memory of the second device, so that the second device can use the memory allocated by the first device to improve the resource utilization rate and access rate of the device.
  • FIG. 3 is a schematic flowchart of a data access method 300 provided by an embodiment of this application. The method 300 includes at least the following steps.
  • the second device (device 102) generates a memory access request.
  • the second device determines the logical address of the virtual disk corresponding to the memory address.
  • the second device converts the memory access request into a virtual disk access request, and the virtual disk access request includes an identifier of the virtual disk.
  • the second device (device 102) sends the virtual disk access request to the first device (device 101). Accordingly, the first device (device 101) receives the virtual disk access request sent by the second device (device 102).
  • the first device accesses the memory section where the virtual disk is generated according to the virtual disk access request.
  • the device 102 maps the virtual disk allocated by the device 101 to the virtual memory of the device 102, services in the device 102 can perform data access to the virtual memory.
  • the device 102 When a service in the device 102 generates a memory access request, the device 102 needs to determine whether the memory address carried in the memory access request falls within the virtual memory address range. If the memory address carried in the memory access request falls within the address range provided by the virtual memory, the device 102 needs to map the memory address to the logical address of the corresponding virtual disk.
  • the device 102 After determining the logical address of the virtual disk corresponding to the memory address carried in the memory access request, the device 102 converts the memory access request into an access request of the virtual disk, where the access request of the virtual disk carries the identifier and The logical address of the virtual disk corresponding to the memory address. The device 102 sends the virtual disk access request to the device 101.
  • the device 101 After receiving the virtual disk access request, the device 101 obtains the logical address of the virtual disk carried in the virtual disk access request, and performs data access to the corresponding space of the virtual disk in the virtual disk.
  • a certain service in the device 102 requires the virtual memory of the device 102 for write data access
  • the data to be written to the virtual memory carried in the memory access request generated in the device 102 is 0X1223344
  • the carried memory address is byte # 90
  • the length of the address carried is 4 bytes.
  • the device 102 maps the virtual disk allocated by the device 101 to the virtual memory of the device 102, the corresponding virtual memory address range is byte # 30 ⁇ byte # 1048604, then the device 102 according to the memory address byte # carried in the memory access request 90 and the address length is 4 bytes, and it is determined that the memory address carried in the memory access request falls within the address range of the virtual memory.
  • the device 102 needs to determine the logical address of the virtual disk corresponding to the memory address byte # 90 carried in the memory access request. For example, the device 102 determines that the logical address of the virtual disk corresponding to the memory address byte # 90 carried in the memory access request is byte # 60. The device 102 converts the memory access request into a virtual disk access request. The data carried in the virtual disk access request is 0X1223344, the carried address is byte # 60, and the carried address length is 4byte. The device 102 sends the virtual disk access request to the device 101.
  • the device 101 receives the virtual disk access request sent by the device 102, and writes the data 0X1223344 carried in the virtual disk access request to the space corresponding to the logical address byte # 60 ⁇ byte # 63 in the virtual disk according to the virtual disk access request in.
  • FIG. 4 is a schematic block diagram of an apparatus 400 provided by an embodiment of the present application, including a receiving unit 401 and a processing unit 402.
  • the receiving unit 401 is configured to receive a request message sent by a second device.
  • the request message is used to instruct the resource management device to allocate memory for the second device.
  • the request message carries the size of the requested memory. Communication between the resource management device and the second device based on a network protocol;
  • the processing unit 402 is configured to divide a memory interval from the memory of the resource management device according to the size of the requested memory carried in the request message; use the memory interval to generate a virtual disk; and provide the virtual disk to the The second device serves as a memory of the second device.
  • processing unit 402 is further configured to simulate the memory interval as disk space; use the disk space to generate the virtual disk.
  • the receiving unit 401 is further configured to receive a disk query command sent by the second device; the processing unit 402 is further configured to report the virtual disk to the resource management device as the Resource management of device memory.
  • the receiving unit 401 is further configured to receive a disk type query command sent by the second device, where the disk type query command is used to query the type of storage device that generates the virtual disk;
  • the device 400 also includes:
  • the sending unit 403 is configured to send instruction information to the second device, where the instruction information indicates that the virtual disk is generated by the memory interval.
  • the receiving unit 401 is further configured to receive a virtual disk access request sent by the second device, where the virtual disk access request includes an identifier of the virtual disk;
  • the processing unit 402 is further configured to access the memory interval for generating the virtual disk according to the access request of the virtual disk.
  • the apparatus 400 of the embodiment of the present application may be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD may be a complex program logic device (complex programmable logical device, CPLD), field programmable gate array (field-programmable gate array, FPGA), general array logic (generic array logic, GAL) or any combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the resource management method shown in FIG. 2 or the data access method shown in FIG. 3 may also be implemented through software.
  • the device 400 Each of its modules can also be a software module.
  • the apparatus 400 may correspond to performing the method described in the embodiment of the present application, and the above-mentioned and other operations and / or functions of the units in the apparatus 400 are implemented in order to implement the first device in the method shown in FIG. 2
  • the corresponding process or the corresponding process executed by the first device in the method shown in FIG. 3 will not be repeated here for brevity.
  • FIG. 5 is a schematic block diagram of an apparatus 500 provided by an embodiment of the present application, including a sending unit 501, a receiving unit 502, and a processing unit 503.
  • the sending unit 501 is configured to send a request message to the first device.
  • the request message is used to instruct the first device to allocate memory for the resource management device.
  • the request message carries the size of the requested memory.
  • a device communicates with the resource management device based on a network protocol;
  • the receiving unit 502 is configured to receive a virtual disk reported by the first device, and the virtual disk is generated by a memory interval in the first device;
  • the processing unit 503 is configured to map the virtual disk into virtual memory of the resource management device.
  • the sending unit 501 is further configured to send a disk query command to the first device, and the disk query command instructs the first device to report the virtual disk.
  • the sending unit 501 is further configured to send a disk type query command to the first device, where the disk type query command is used to query the type of the virtual disk storage device generated;
  • the receiving unit 502 is further configured to receive indication information sent by the first device, where the indication information is used to indicate that the virtual disk is generated by the memory interval;
  • the processing unit 503 is configured to, after receiving the instruction information, map the virtual disk as virtual memory of the resource management device.
  • the processing unit 503 is further configured to generate a memory access request; when the memory address carried in the memory access request falls within the address range provided by the virtual memory, determine the location corresponding to the memory address A logical address of the virtual disk; converting the memory access request into an access request of the virtual disk, where the access request of the virtual disk includes an identifier of the virtual disk;
  • the sending unit 501 is further configured to send the access request of the virtual disk to the first device.
  • the apparatus 500 of the embodiment of the present application may be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • the PLD may be a complex program logic device (complex programmable logical device, CPLD), field programmable gate array (field-programmable gate array, FPGA), general array logic (generic array logic, GAL) or any combination thereof.
  • the resource management method shown in FIG. 2 or the data access method shown in FIG. 3 may also be implemented through software.
  • the device 500 Each of its modules can also be a software module.
  • the apparatus 500 may correspond to performing the method described in the embodiment of the present application, and the above-mentioned and other operations and / or functions of the units in the apparatus 500 are implemented in order to implement the second device in the method shown in FIG. 2
  • the corresponding process or the corresponding process executed by the second device in the method shown in FIG. 3 will not be repeated here for brevity.
  • the device 600 includes a processor 601, a memory 602, a communication interface 603, and a bus 604.
  • the processor 601, the memory 602, and the communication interface 603 communicate through the bus 604, and may also communicate through other means such as wireless transmission.
  • the memory 602 is used to store instructions, and the processor 601 is used to execute the instructions stored in the memory 602.
  • the memory 602 stores program codes 6021, and the processor 601 can call the program codes 6021 stored in the memory 602 to perform the resource management method shown in FIG. 2 or the data access method shown in FIG. 3.
  • the processor 601 may be a CPU, and the processor 601 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), and field programmable gate arrays (FPGAs). ) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable gate arrays
  • a general-purpose processor may be a microprocessor or any conventional processor.
  • the memory 602 may include a read-only memory and a random access memory, and provide instructions and data to the processor 601.
  • the memory 602 may also include non-volatile random access memory.
  • the memory 602 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically Erase programmable EPROM (EEPROM) or flash memory.
  • the volatile memory may be a random access memory (random access memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • Double data rate synchronous dynamic random access memory double data SDRAM, DDR SDRAM
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • direct RAMbus direct RAMbus, DR, RAM
  • bus 604 may also include a power bus, a control bus, a status signal bus, and so on. However, for clarity, various buses are marked as bus 604 in FIG. 6.
  • the device 600 may correspond to the device 300 or the device 400 in the embodiment of the present application, and may correspond to the first device or the second device in the method shown in FIG. 2 of the embodiment of the present application. It may correspond to the first device or the second device in the method shown in FIG. 3 in the embodiment of the present application.
  • the device 600 corresponds to the first device in the method shown in FIG. 2
  • the device 600 corresponds to the second device in the method shown in FIG.
  • the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination.
  • the above-described embodiments may be fully or partially implemented in the form of computer program products.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmit to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains one or more collections of available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium.
  • the semiconductor medium may be a solid state drive (SSD).
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Part or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application may essentially be part of or contribute to the prior art or the technical solutions may be embodied in the form of software products, and the computer software products are stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of this application.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes .

Landscapes

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

Abstract

一种资源管理的方法,包括:第一设备接收第二设备发送的请求消息,请求消息用于指第一设备为所述二设备分配内存,请求消息中携带有请求内存的大小,第一设备与第二设备之间基于网络协议进行通信;第一设备根据请求消息中携带的请求内存的大小从第一设备的内存中划分内存区间;第一设备利用内存区间生成虚拟磁盘;第一设备将虚拟磁盘提供给第二设备作为第二设备的内存。该方法能够提高设备的资源利用率以及访问速率。

Description

资源管理的方法和装置 技术领域
本申请涉及存储领域,并且更具体地,涉及资源管理的方法和装置。
背景技术
目前,在计算机系统中,多台设备之间通常是基于网络协议进行通信。
在多个设备中,每个设备的配置及数据访问的热度不尽相同,对于数据访问热度比较高的设备或者所配置的内存比较小的设备,很可能出现内存空间不够用,从而影响设备的性能,现有技术一般通过为设备增加内存条的方式保证设备的访问性能。然而增加内存条会增加设备的成本,且需要手动更换。
发明内容
本申请实施例提供一种资源管理的方法,该方法能够提升设备的资源利用率与访问速率。
第一方面,提供了一种资源管理的方法,包括:第一设备接收第二设备发送的请求消息,所述请求消息用于指示所述第一设备为所述第二设备分配内存,所述请求消息中携带有请求内存的大小,所述第一设备与所述第二设备之间基于网络协议进行通信;所述第一设备根据所述请求消息中携带的请求内存的大小从所述第一设备的内存中划分内存区间;所述第一设备利用所述内存区间生成虚拟磁盘;所述第一设备将所述虚拟磁盘提供给所述第二设备作为所述第二设备的内存。
可选地,任意两个设备之间通过NVMe over Fabric协议进行通信,其中所述Fabric协议可以包括光纤通道(fiber channel,FC)协议、传输控制协议/因特网互联协议(transmission control protocol/internet protocol,TCP/IP)、基于远程直接数据存取的以太网(RDMA over converged ethernet,RoCE)协议或无线带宽(infiniband,IB)协议。
在本申请实施例中,当第二设备向第一设备请求为第二设备分配内存时,第一设备通过在自身的内存中划分一部分内存区间,并利用这部分内存区间生成虚拟磁盘,最终将生成的虚拟磁盘提供给第二设备作为第二设备的内存,从而使得第二设备能够对第一设备为其分配的内存进行使用,提高设备的资源利用率以及访问速率。
在一种可能的实现方式中,所述利用所述内存区间生成虚拟磁盘,包括:所述第一设备将所述内存区间模拟为磁盘空间;所述第一设备利用所述磁盘空间生成所述虚拟磁盘。
在本申请实施例中,第一设备通过首先将划分出的内存区间模拟为磁盘区间,再利用该部分磁盘空间生成虚拟磁盘,进而将生成的虚拟磁盘提供给第二设备作为第二设备的内存。
在一种可能的实现方式中,所述第一设备将所述虚拟磁盘提供给所述第一设备作为所述第一设备的内存,包括:所述第一设备接收所述第二设备发送的磁盘查询命令;所述第一设备将所述虚拟磁盘上报至所述第一设备作为所述第一设备的内存。
在本申请实施例中,当第一设备生成所述虚拟磁盘后,会将所述虚拟磁盘挂载至第二设备:第一设备在接收到第二设备发送的磁盘查询命令后,会将虚拟磁盘的相关信息 上报至第二设备,以使第二设备能够根据第一设备上报的虚拟磁盘的相关信息,将该虚拟磁盘映射为第二设备的虚拟内存。
可选地,第一设备向第二设备上报的虚拟磁盘的相关信息可以包括虚拟磁盘的标识与虚拟磁盘空间的大小。
在一种可能的实现方式中,所述方法还包括:
所述第一设备接收所述第二设备发送的磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;所述第一设备向所述第二设备发送指示信息,所述指示信息指示所述虚拟磁盘是由所述内存区间生成的。
在本申请实施例中,第二设备在将虚拟磁盘映射为第二设备的虚拟内存之前,第二设备还需要确定生成虚拟磁盘的存储设备的类型,即确定虚拟磁盘是否是由第一设备的内存区间生成的,第二设备向第一设备发送磁盘类型查询命令,该磁盘类型查询命令用于向第一设备查询生成虚拟磁盘的存储设备的类型,第一设备根据该磁盘类型查询命令,向第二设备发送指示信息,该指示信息用于向第二设备指示虚拟磁盘是由第一设备的内存区间生成的。
在一种可能的实现方式中,所述方法还包括:所述第一设备接收所述第二设备发送的虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;所述第一设备根据所述虚拟磁盘的访问请求,访问生成所述虚拟磁盘的内存区间。
在本申请实施例中,当第二设备中的业务产生内存访问请求时,第二设备通过判断内存访问请求中携带的内存地址是否落在虚拟内存所提供的地址范围。如果内存访问请求携带的内存地址落在虚拟内存所提供的地址范围时,第二设备需要将该内存地址转换为内存地址对应的虚拟磁盘的逻辑地址,进而将内存访问请求转换为携带有虚拟磁盘标识与内存地址对应的虚拟磁盘的逻辑地址的虚拟磁盘的访问请求,并向第一设备虚拟磁盘的访问请求。
可以看出,当第二设备中产生的内存访问请求中携带的内存地址落入虚拟内存的地址范围时,第二设备中的业务对第二设备中虚拟内存的访问实际上是对第一设备中分配给第二设备的内存区间的访问。
第二方面,提供了一种资源管理的方法,包括:第二设备向第一设备发送请求消息,所述请求消息用于指示所述第一设备为所述第二设备分配内存,所述请求消息中携带请求内存的大小,所述第一设备与所述第二设备之间基于网络协议进行通信;所述第二设备接收第一设备上报的虚拟磁盘,所述虚拟磁盘是由所述第一设备中的内存区间生成的;所述第二设备将所述虚拟磁盘映射为所述第二设备的虚拟内存。
在本申请实施例中,当第二设备向第一设备请求为第二设备分配内存时,第一设备通过在自身的内存中划分一部分内存区间,并利用这部分内存区间生成虚拟磁盘,最终将生成的虚拟磁盘提供给第二设备作为第二设备的内存,从而使得第二设备能够对第一设备为其分配的内存进行使用,提高设备的资源利用率以及访问速率。
在一种可能的实现方式中,所述方法还包括:所述第二设备向所述第一设备发送磁盘查询命令,所述磁盘查询命令指示所述第一设备上报所述虚拟磁盘。
在本申请实施例中,当第一设备生成所述虚拟磁盘后,会将所述虚拟磁盘挂载至第二设备:第一设备在接收到第二设备发送的磁盘查询命令后,会将虚拟磁盘的相关信息上报至第二设备,以使第二设备能够根据第一设备上报的虚拟磁盘的相关信息,将该虚拟磁盘映射为第二设备的虚拟内存。
可选地,第一设备向第二设备上报的虚拟磁盘的相关信息可以包括虚拟磁盘的标识与虚拟磁盘空间的大小。
在一种可能的实现方式中,所述方法还包括:所述第二设备向所述第一设备发送磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;所述第二设备接收所述第一设备发送的指示信息,所述指示信息用于指示虚拟磁盘是由所述内存区间生成的;所述第二设备在接收到所述指示信息后,将所述虚拟磁盘映射为所述第二设备的虚拟内存。
在本申请实施例中,第二设备在将虚拟磁盘映射为第二设备的虚拟内存之前,第二设备还需要确定生成虚拟磁盘的存储设备的类型,即确定虚拟磁盘是否是由第一设备的内存区间生成的,第二设备向第一设备发送磁盘类型查询命令,该磁盘类型查询命令用于向第一设备查询生成虚拟磁盘的存储设备的类型,第一设备根据该磁盘类型查询命令,向第二设备发送指示信息,该指示信息用于向第二设备指示虚拟磁盘是由第一设备的内存区间生成的。
在一种可能的实现方式中,所述方法还包括:所述第二设备产生内存访问请求;当所述内存访问请求中携带的内存地址落在所述虚拟内存所提供的地址范围时,所述第二设备确定所述内存地址对应的所述虚拟磁盘的逻辑地址;所述第二设备将所述内存访问请求转换为所述虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;所述第二设备将所述虚拟磁盘的访问请求发送至所述第一设备。
在本申请实施例中,当第二设备中的业务产生内存访问请求时,第二设备通过判断内存访问请求中携带的内存地址是否落在虚拟内存所提供的地址范围。如果内存访问请求携带的内存地址落在虚拟内存所提供的地址范围时,第二设备需要将该内存地址转换为内存地址对应的虚拟磁盘的逻辑地址,进而将内存访问请求转换为携带有虚拟磁盘标识与内存地址对应的虚拟磁盘的逻辑地址的虚拟磁盘的访问请求,并向第一设备虚拟磁盘的访问请求。
可以看出,当第二设备中产生的内存访问请求中携带的内存地址落入虚拟内存的地址范围时,第二设备中的业务对第二设备中虚拟内存的访问实际上是对第一设备中分配给第二设备的内存区间的访问。
第三方面,提供一种资源管理的装置,该装置用于执行上述第一方面或第一方面的任一可能的实现方式中的方法。具体地,该装置可以包括用于执行第一方面或第一方面的任一可能的实现方式中资源管理的方法的单元。
第四方面,提供一种资源管理的装置,该装置用于执行上述第二方面或第二方面的任一可能的实现方式中的方法。具体地,该装置可以包括用于执行第二方面或第二方面的任一可能的实现方式中资源管理的方法的单元。
第五方面,提供一种资源管理的设备,该设备包括存储器与处理器。该存储器用于存储指令;该处理器执行该存储器存储的指令,使得该设备执行第一方面或第一方面的任一可能的实现方式中资源管理的方法。
第六方面,提供一种计算设备,该设备包括存储器和处理器。该存储器用于存储指令;该处理器执行该存储器存储的指令,使得该设备执行第二方面或第二方面的任一可能的实现方式中资源管理的方法。
第七方面,提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行第一方面或第一方面的任一可能的实现方 式中资源管理的方法。
第八方面,提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行第二方面或第二方面的任一可能的实现方式中资源管理的方法。
第九方面,提供一种包含指令的计算机程序产品,当该指令在计算机上运行时,使得计算机执行第一方面或第一方面的任一可能的实现方式中资源管理的方法。
第十方面,提供一种包含指令的计算机程序产品,当该指令在计算机上运行时,使得计算机执行第二方面或第二方面的任一可能的实现方式中资源管理的方法。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
附图说明
图1是本申请提供的计算机系统100的架构示意图。
图2是本申请提供的资源管理的方法200的流程图示意图。
图3是本申请提供的数据访问的方法300的流程图示意图。
图4为本申请提供的装置400的结构示意图。
图5为本申请提供的装置500的结构示意图。
图6为本申请提供的设备600的结构示意图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
为了便于理解,首先结合图1介绍适用于本申请实施例的计算机系统的架构。图1所示的计算机系统100包括至少两个设备(例如,设备101、设备102、设备103以及设备104),其中,任意两个设备基于网络协议进行通信。
作为示例而非限定,任意两个设备之间通过NVMe over Fabric协议进行通信,其中所述Fabric协议可以包括光纤通道(fiber channel,FC)协议、传输控制协议/因特网互联协议(transmission control protocol/internet protocol,TCP/IP)、基于远程直接数据存取的以太网(RDMA over converged ethernet,RoCE)协议或无线带宽(infiniband,IB)协议。
设备101、设备102、设备103以及设备104中均配置有内存,每个设备均可以使用自身的内存进行数据访问。
本申请实施例提供了一种资源管理的方法,在计算机系统中,通过使内存资源丰富的设备在自身内存中划分出一部分内存区间,并利用这部分内存区间生成虚拟磁盘,最终将生成的虚拟磁盘提供给内存资源较匮乏的设备作为该设备的内存,使得内存资源较匮乏的设备能够对内存资源丰富的设备为其分配的内存进行使用,从而提供设备的资源利用率与访问速率。
需要说明的是,图1中的设备具体实现时可以为服务器或控制器,计算机系统100具体实现时可以为分布式系统,该分布式系统可以为分布式计算系统或分布式文件系统。其中,分布式存储系统还可以为分布式文件存储系统,分布式块存储系统等。
下面以计算机系统100中的设备101将资源共享给设备102使用为例,对本申请实施例提供的资源管理的方法进行说明。
图2是本申请实施例提供的资源管理的方法200的示意性流程图。该方法200至少 包括以下步骤。
S201,第二设备向第一设备发送请求消息,请求消息用于指示第一设备为第二设备分配内存,请求消息中携带请求内存的大小,第一设备与第二设备之间基于网络协议进行通信。相应地,第一设备接收第二设备发送的请求消息。
具体地,设备102(例如,第二设备)向设备101(例如,第一设备)发送请求消息,请求消息用于请求设备101为设备101分配内存,其中,请求消息中携带有设备102所请求的内存的大小。
例如,当设备102自身的内存不够用时,设备102向设备101发送请求消息,该请求消息中携带的设备102所请求的内存的大小为100Mbyte(兆字节)。
需要说明的是,当设备102需要计算机系统100中的其他设备为其分配内存时,设备102还可以向计算机系统100中的其他所有设备广播该请求消息,以使计算机系统100中的每个设备均可以接收到设备102发送的请求消息,接收到请求消息的设备可以根据自身内存的使用情况,决定是否要为设备102分配内存。
需要说明的是,上述的请求消息为基于NVMe协议产生的,所产生的请求消息根据第一设备与第二设备之间的网络通信协议被封装为能够在所述网络通信协议中传输的请求消息。
S202,第一设备(设备101)根据请求消息中携带的请求内存的大小从第一设备(设备101)的内存中划分内存区间。
具体地,设备101在接收到设备102发送的请求消息后,先将该请求消息解封装为基于NVMe协议的请求消息。设备101根据解封装后的请求消息中携带的设备102所请求分配的内存的大小,在自身内存中为设备102划分满足请求消息中携带的内存大小的内存区间。
例如,请求消息中携带的设备102请求分配的内存的大小为100Mbyte,设备101接收到该请求消息后,将自身内存中的地址区间为字节byte#30~byte#1048604的内存区间划分出来,地址为byte#30~byte#1048604的内存区间为设备101为设备102分配的内存区间。
S203,第一设备(设备101)利用内存区间生成虚拟磁盘。
具体地,设备101在自身的内存中为设备102划分出内存区间后,利用该部分内存区间生成虚拟磁盘,并将虚拟磁盘提供给设备102作为设备102的内存。
例如,设备101在生成虚拟磁盘时,首先利用虚拟内存盘(Ramdisk)技术将为设备102分配的内存区间模拟为磁盘空间,然后将所述磁盘空间构建为能够被外部设备访问的虚拟磁盘,例如命名空间(Namespace)。
S204,第一设备(设备101)将虚拟磁盘提供给第二设备(设备102)作为第二设备(设备102)的内存。
具体地,当设备101生成虚拟磁盘后,会将所述虚拟磁盘挂载至设备120,具体挂载的过程为:设备101接收设备102发送的磁盘查询命令,所述磁盘查询命令用于指示设备101向设备102上报为设备102分配的虚拟磁盘。
设备101接收设备102发送的磁盘查询命令,根据该磁盘查询命令,将为设备102分配的虚拟磁盘的相关信息(例如,虚拟磁盘的标识与虚拟磁盘空间的大小)上报至设备102。
S205,第二设备(设备102)接收第一设备(设备101)上报的虚拟磁盘,虚拟磁盘 是由第一设备(设备101)中的内存区间生成的。
S206,第二设备(设备102)向第一设备(设备101)发送磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型。
具体地,在设备102将设备101分配的虚拟磁盘映射为设备102的虚拟内存之前,设备102需要确定生成该虚拟磁盘的存储设备的类型,设备102可以向设备101发送磁盘类型查询命令,磁盘类型查询命令用于向设备101查询所述虚拟磁盘是否是由内存区间生成的
S207,所述第一设备(设备101)在接收到所述第二设备(设备102)上报的磁盘类型查询命令后,如果确定所述虚拟磁盘是由所述内存区间生成的,则返回指示所述虚拟磁盘是由所述内存区间生成的指示信息。
具体地,设备101接收设备102发送的磁盘类型查询命令,根据磁盘类型查询命令,确定所述虚拟磁盘是否是由内存区间生成的,如果设备101确定所述虚拟磁盘是由所述内存区间生成的,设备101会生成指示信息,并向设备102发送该指示信息,该指示信息用于指示设备101为设备102分配的虚拟磁盘的是由内存区间生成的。
例如,该指示信息中可以携带有标识,该标识可以承载在一个比特中,以指示生成虚拟磁盘的存储设备的类型。当承载该标识的比特的取值为0时,代表虚拟磁盘是由内存区间生成的;当承载该标识的比特的取值为1时,代表虚拟磁盘不是由内存区间生成的。
S208,所述第二设备(设备102)在接收到所述指示信息后,将所述虚拟硬盘的逻辑地址空间映射至所述第二设备(设备102)的内存空间,作为所述第二设备(设备102)的虚拟内存。
具体地,当设备102接收到设备101发送的指示信息后,根据该指示信息,确定设备101为设备120分配的虚拟磁盘是由设备101的内存区间生成的。设备102会对自身的内存空间进行扩展,将自身的内存空间扩展一段与所述虚拟磁盘同样大小的虚拟内存空间,然后将所述虚拟内存空间的地址映射至所述虚拟磁盘的逻辑地址。
例如,设备102在S204中确定设备101为其分配的虚拟磁盘空间的大小为100Mbyte,设备102将自身的内存空间扩展一段大小为100Mbyte的虚拟内存空间,并将大小为100Mbyte的虚拟内存空间的地址映射至虚拟磁盘的逻辑地址。
当第二设备向第一设备请求为第二设备分配内存时,第一设备通过在自身的内存中划分一部分内存区间,并利用这部分内存区间生成虚拟磁盘,最终将生成的虚拟磁盘提供给第二设备作为第二设备的内存,从而使得第二设备能够对第一设备为其分配的内存进行使用,提高设备的资源利用率以及访问速率。
上述以设备101将资源共享给设备102为例,对计算机系统100中的设备之间共享内存的方法作了介绍。下面对同样以设备101将资源共享给设备102为例,对设备102使用设备101为其分配的内存进行数据访问的方法300进行介绍。图3为本申请实施例提供的数据访问的方法300的示意性流程图。方法300至少包括以下步骤。
S301,第二设备(设备102)产生内存访问请求。
S302,当内存访问请求中携带的内存地址落在虚拟内存所提供的地址范围时,第二设备(设备102)确定内存地址对应的虚拟磁盘的逻辑地址。
S303,第二设备(设备102)将内存访问请求转换为虚拟磁盘的访问请求,虚拟磁盘的访问请求包括虚拟磁盘的标识。
S304,第二设备(设备102)将虚拟磁盘的访问请求发送至第一设备(设备101)。相应地,第一设备(设备101)接收第二设备(设备102)发送的虚拟磁盘的访问请求。
S305,第一设备(设备101)根据虚拟磁盘的访问请求,访问生成虚拟磁盘的内存区间。
具体地,设备102在将设备101为其分配的虚拟磁盘映射为设备102的虚拟内存后,设备102中的业务便可以对该虚拟内存进行数据访问了。
当设备102中的业务产生内存访问请求时,设备102需要确定内存访问请求携带的内存地址是否落在虚拟内存的地址范围。如果内存访问请求携带的内存地址落在虚拟内存所提供的地址范围时,设备102需要将该内存地址映射为与其对应的虚拟磁盘的逻辑地址。
设备102在确定了内存访问请求携带的内存地址对应的虚拟磁盘的逻辑地址后,将该内存访问请求转换为虚拟磁盘的访问请求,其中,该虚拟磁盘的访问请求中携带有虚拟磁盘的标识与该内存地址对应的虚拟磁盘的逻辑地址。设备102将虚拟磁盘的访问请求发送至设备101.
设备101在接收到该虚拟磁盘的访问请求后,获取虚拟磁盘的访问请求携带的虚拟磁盘的逻辑地址,对虚拟磁盘的逻辑地址在虚拟磁盘中对应的空间进行数据访问。
例如,设备102中的某一业务需要设备102的虚拟内存进行写数据访问,设备102中产生的内存访问请求中携带的待写入虚拟内存的数据为0X1223344、携带的内存地址为byte#90、携带的地址长度为4byte。
假设设备102将设备101为其分配的虚拟磁盘映射为设备102的虚拟内存后对应的虚拟内存的地址范围为byte#30~byte#1048604,则设备102根据内存访问请求中携带的内存地址byte#90以及地址长度4byte,确定内存访问请求携带的内存地址落入虚拟内存的地址范围。
此时,设备102需要确定内存访问请求携带的内存地址byte#90对应的虚拟磁盘的逻辑地址,例如,设备102确定内存访问请求携带的内存地址byte#90对应的虚拟磁盘的逻辑地址为byte#60,设备102将内存访问请求转换为虚拟磁盘的访问请求,该虚拟磁盘的访问请求中携带的数据为0X1223344、携带的地址为byte#60、携带的地址长度为4byte。设备102向设备101发送该虚拟磁盘的访问请求。
设备101接收设备102发送的虚拟磁盘的访问请求,根据该虚拟磁盘的访问请求,将虚拟磁盘的访问请求中携带的数据0X1223344写入虚拟磁盘中的逻辑地址byte#60~byte#63对应的空间中。
可以看出,当设备102中产生的内存访问请求中携带的内存地址落入虚拟内存的地址范围时,设备102中的业务对设备102中虚拟内存的访问实际上是对设备101中分配给设备102的内存区间的访问。
上文结合图1至图3详细介绍了本申请实施例的资源管理的方法与数据访问的方法,下文结合图4至图6详细地描述本申请实施例的提供的装置与设备。
图4为本申请实施例提供的装置400的示意性框图,包括接收单元401与处理单元402。
接收单元401,用于接收第二设备发送的请求消息,所述请求消息用于指示所述资源管理的设备为所述第二设备分配内存,所述请求消息中携带有请求内存的大小,所述资源管理的设备与所述第二设备之间基于网络协议进行通信;
处理单元402,用于根据所述请求消息中携带的请求内存的大小从所述资源管理的设备的内存中划分内存区间;利用所述内存区间生成虚拟磁盘;将所述虚拟磁盘提供给所述第二设备作为所述第二设备的内存。
可选地,所述处理单元402,还用于将所述内存区间模拟为磁盘空间;利用所述磁盘空间生成所述虚拟磁盘。
可选地,所述接收单元401,还用于接收所述第二设备发送的磁盘查询命令;所述处理单元402,还用于将所述虚拟磁盘上报至所述资源管理的设备作为所述资源管理的设备的内存。
可选地,所述接收单元401,还用于接收所述第二设备发送的磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;
所述设备400还包括:
发送单元403,用于向所述第二设备发送指示信息,所述指示信息指示所述虚拟磁盘是由所述内存区间生成的。
可选地,所述接收单元401,还用于接收所述第二设备发送的虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
所述处理单元402,还用于根据所述虚拟磁盘的访问请求,访问生成所述虚拟磁盘的内存区间。
应理解的是,本申请实施例的装置400可以通过专用集成电路(application-specific integrated circuit,ASIC)实现,或可编程逻辑器件(programmable logic device,PLD)实现,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。也可以通过软件实现图2所示的资源管理方法或图3所示的数据访问的方法,当通过软件实现图2所示的资源管理方法或图3所示的数据访问的方法时,装置400及其各个模块也可以为软件模块。
根据本申请实施例的装置400可对应于执行本申请实施例中描述的方法,并且装置400中的各个单元的上述和其它操作和/或功能为了实现图2所示方法中第一设备执行的相应流程或图3所示方法中第一设备执行的相应流程,为了简洁,在此不再赘述。
图5为本申请实施例提供的装置500的示意性框图,包括发送单元501、接收单元502与处理单元503。
发送单元501,用于向第一设备发送请求消息,所述请求消息用于指示所述第一设备为所述资源管理的设备分配内存,所述请求消息中携带请求内存的大小,所述第一设备与所述资源管理的设备之间基于网络协议进行通信;
接收单元502,用于接收第一设备上报的虚拟磁盘,所述虚拟磁盘是由所述第一设备中的内存区间生成的;
处理单元503,用于将所述虚拟磁盘映射为所述资源管理的设备的虚拟内存。
可选地,所述发送单元501,还用于向所述第一设备发送磁盘查询命令,所述磁盘查询命令指示所述第一设备上报所述虚拟磁盘。
可选地,所述发送单元501,还用于向所述第一设备发送磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘存储设备的类型;
所述接收单元502,还用于接收所述第一设备发送的指示信息,所述指示信息用于指示虚拟磁盘是由所述内存区间生成的;
所述处理单元503,用于在接收到所述指示信息后,将所述虚拟磁盘映射为所述资源管理的设备的虚拟内存。
可选地,所述处理单元503,还用于产生内存访问请求;当所述内存访问请求中携带的内存地址落在所述虚拟内存所提供的地址范围时,确定所述内存地址对应的所述虚拟磁盘的逻辑地址;将所述内存访问请求转换为所述虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
所述发送单元501,还用于将所述虚拟磁盘的访问请求发送至所述第一设备。
应理解的是,本申请实施例的装置500可以通过专用集成电路(application-specific integrated circuit,ASIC)实现,或可编程逻辑器件(programmable logic device,PLD)实现,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。也可以通过软件实现图2所示的资源管理方法或图3所示的数据访问的方法,当通过软件实现图2所示的资源管理方法或图3所示的数据访问的方法时,装置500及其各个模块也可以为软件模块。
根据本申请实施例的装置500可对应于执行本申请实施例中描述的方法,并且装置500中的各个单元的上述和其它操作和/或功能为了实现图2所示方法中第二设备执行的相应流程或图3所示方法中第二设备执行的相应流程,为了简洁,在此不再赘述。
图6为本申请实施例提供的一种设备的结构示意图。如图6所示,所述设备600包括处理器601、存储器602、通信接口603和总线604。其中,处理器601、存储器602、通信接口603通过总线604进行通信,也可以通过无线传输等其他手段实现通信。该存储器602用于存储指令,该处理器601用于执行该存储器602存储的指令。该存储器602存储程序代码6021,且处理器601可以调用存储器602中存储的程序代码6021执行图2所示的资源管理的方法或图3所示的数据访问的方法。
应理解,在本申请实施例中,处理器601可以是CPU,处理器601还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。
该存储器602可以包括只读存储器和随机存取存储器,并向处理器601提供指令和数据。存储器602还可以包括非易失性随机存取存储器。该存储器602可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
该总线604除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线 等。但是为了清楚说明起见,在图6中将各种总线都标为总线604。
应理解,根据本申请实施例的设备600可对应于本申请实施例中的装置300或装置400,并可以对应于本申请实施例图2所示方法中的第一设备或第二设备,也可以对应于本申请实施例图3所示方法中的第一设备或第二设备,当设备600对应于图2所示方法中的第一设备时,设备600中的各个模块的上述和其它操作和/或功能分别为了实现图2中的由第一设备执行的方法的操作步骤,当设备600对应于图2所示方法中的第二设备时,设备600中的各个模块的上述和其它操作和/或功能分别为了实现图2中的由第二设备执行的方法的操作步骤,当设备600对应于图3所示方法中的第一设备时,设备600中的各个模块的上述和其它操作和/或功能分别为了实现图3中的由第一设备执行的方法的操作步骤,当设备600对应于图3所示方法中的第二设备时,设备600中的各个模块的上述和其它操作和/或功能分别为了实现图3中的由第二设备执行的方法的操作步骤,为了简洁,在此不再赘述。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘(solid state drive,SSD)。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的 目的。
另外,在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种资源管理的方法,其特征在于,包括:
    第一设备接收第二设备发送的请求消息,所述请求消息用于指示所述第一设备为所述第二设备分配内存,所述请求消息中携带有请求内存的大小,所述第一设备与所述第二设备之间基于网络协议进行通信;
    所述第一设备根据所述请求消息中携带的请求内存的大小从所述第一设备的内存中划分内存区间;
    所述第一设备利用所述内存区间生成虚拟磁盘;
    所述第一设备将所述虚拟磁盘提供给所述第二设备作为所述第二设备的内存。
  2. 根据权利要求1所述的方法,其特征在于,所述利用所述内存区间生成虚拟磁盘,包括:
    所述第一设备将所述内存区间模拟为磁盘空间;
    所述第一设备利用所述磁盘空间生成所述虚拟磁盘。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一设备将所述虚拟磁盘提供给所述第一设备作为所述第一设备的内存,包括:
    所述第一设备接收所述第二设备发送的磁盘查询命令;
    所述第一设备将所述虚拟磁盘上报至所述第一设备作为所述第一设备的内存。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一设备接收所述第二设备发送的磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;
    所述第一设备向所述第二设备发送指示信息,所述指示信息指示所述虚拟磁盘是由所述内存区间生成的。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一设备接收所述第二设备发送的虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
    所述第一设备根据所述虚拟磁盘的访问请求,访问生成所述虚拟磁盘的内存区间。
  6. 一种资源管理的方法,其特征在于,包括:
    第二设备向第一设备发送请求消息,所述请求消息用于指示所述第一设备为所述第二设备分配内存,所述请求消息中携带请求内存的大小,所述第一设备与所述第二设备之间基于网络协议进行通信;
    所述第二设备接收第一设备上报的虚拟磁盘,所述虚拟磁盘是由所述第一设备中的内存区间生成的;
    所述第二设备将所述虚拟磁盘映射为所述第二设备的虚拟内存。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    所述第二设备向所述第一设备发送磁盘查询命令,所述磁盘查询命令指示所述第一设备上报所述虚拟磁盘。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    所述第二设备向所述第一设备发送磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;
    所述第二设备接收所述第一设备发送的指示信息,所述指示信息用于指示虚拟磁盘是由所述内存区间生成的;
    所述第二设备在接收到所述指示信息后,将所述虚拟磁盘映射为所述第二设备的虚拟内存。
  9. 根据权利要求6至8中任一项所述的方法,其特征在于,所述方法还包括:
    所述第二设备产生内存访问请求;
    当所述内存访问请求中携带的内存地址落在所述虚拟内存所提供的地址范围时,所述第二设备确定所述内存地址对应的所述虚拟磁盘的逻辑地址;
    所述第二设备将所述内存访问请求转换为所述虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
    所述第二设备将所述虚拟磁盘的访问请求发送至所述第一设备。
  10. 一种资源管理的装置,其特征在于,包括:
    接收单元,用于接收第二设备发送的请求消息,所述请求消息用于指示所述资源管理的装置为所述第二设备分配内存,所述请求消息中携带有请求内存的大小,所述资源管理的装置与所述第二设备之间基于网络协议进行通信;
    处理单元,用于根据所述请求消息中携带的请求内存的大小从所述资源管理的装置的内存中划分内存区间;利用所述内存区间生成虚拟磁盘;将所述虚拟磁盘提供给所述第二设备作为所述第二设备的内存。
  11. 根据权利要求10所述的装置,其特征在于,所述处理单元,还用于将所述内存区间模拟为磁盘空间;利用所述磁盘空间生成所述虚拟磁盘。
  12. 根据权利要求10或11所述的装置,其特征在于,所述接收单元,还用于接收所述第二设备发送的磁盘查询命令;
    所述处理单元,还用于将所述虚拟磁盘上报至所述资源管理的装置作为所述资源管理的装置的内存。
  13. 根据权利要求10至12中任一项所述的装置,其特征在于,所述接收单元,还用于接收所述第二设备发送的磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;
    所述设备还包括:
    发送单元,用于向所述第二设备发送指示信息,所述指示信息指示所述虚拟磁盘是由所述内存区间生成的。
  14. 根据权利要求10至13中任一项所述的装置,其特征在于,所述接收单元,还用于接收所述第二设备发送的虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
    所述处理单元,还用于根据所述虚拟磁盘的访问请求,访问生成所述虚拟磁盘的内存区间。
  15. 一种资源管理的装置,其特征在于,包括:
    发送模块,用于向第一设备发送请求消息,所述请求消息用于指示所述第一设备为所述资源管理的装置分配内存,所述请求消息中携带请求内存的大小,所述第一设备与所述资源管理的装置之间基于网络协议进行通信;
    接收模块,用于接收第一设备上报的虚拟磁盘,所述虚拟磁盘是由所述第一设备中 的内存区间生成的;
    处理模块,用于将所述虚拟磁盘映射为所述资源管理的装置的虚拟内存。
  16. 根据权利要求15所述的装置,其特征在于,所述发送模块,还用于向所述第一设备发送磁盘查询命令,所述磁盘查询命令指示所述第一设备上报所述虚拟磁盘。
  17. 根据权利要求15或16所述的装置,其特征在于,所述发送模块,还用于向所述第一设备发送磁盘类型查询命令,所述磁盘类型查询命令用于查询生成所述虚拟磁盘的存储设备的类型;
    所述接收模块,还用于接收所述第一设备发送的指示信息,所述指示信息用于指示虚拟磁盘是由所述内存区间生成的;
    所述处理模块,用于在接收到所述指示信息后,将所述虚拟磁盘映射为所述资源管理的装置的虚拟内存。
  18. 根据权利要求15至17中任一项所述的装置,其特征在于,所述处理模块,还用于产生内存访问请求;当所述内存访问请求中携带的内存地址落在所述虚拟内存所提供的地址范围时,确定所述内存地址对应的所述虚拟磁盘的逻辑地址;将所述内存访问请求转换为所述虚拟磁盘的访问请求,所述虚拟磁盘的访问请求包括所述虚拟磁盘的标识;
    所述发送模块,还用于将所述虚拟磁盘的访问请求发送至所述第一设备。
PCT/CN2019/111136 2018-10-26 2019-10-15 资源管理的方法和装置 WO2020083067A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19876096.9A EP3862885A4 (en) 2018-10-26 2019-10-15 RESOURCE MANAGEMENT PROCESS AND DEVICE
US17/239,860 US20210240353A1 (en) 2018-10-26 2021-04-26 Resource management method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811255735.3 2018-10-26
CN201811255735.3A CN109582592B (zh) 2018-10-26 2018-10-26 资源管理的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/239,860 Continuation US20210240353A1 (en) 2018-10-26 2021-04-26 Resource management method and apparatus

Publications (1)

Publication Number Publication Date
WO2020083067A1 true WO2020083067A1 (zh) 2020-04-30

Family

ID=65920821

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/111136 WO2020083067A1 (zh) 2018-10-26 2019-10-15 资源管理的方法和装置

Country Status (4)

Country Link
US (1) US20210240353A1 (zh)
EP (1) EP3862885A4 (zh)
CN (1) CN109582592B (zh)
WO (1) WO2020083067A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582592B (zh) * 2018-10-26 2021-06-15 华为技术有限公司 资源管理的方法和装置
CN113590364B (zh) * 2021-09-29 2021-12-21 阿里云计算有限公司 一种基于分布式共享内存系统的数据处理方法和装置
CN114089926B (zh) * 2022-01-20 2022-07-05 阿里云计算有限公司 分布式存储空间的管理方法、计算设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889485A (zh) * 2005-06-30 2007-01-03 西门子(中国)有限公司 分布式对等网络实体之间的资源共享方法与资源共享系统
CN103793330A (zh) * 2012-10-31 2014-05-14 国际商业机器公司 在虚拟机环境中进行数据交换的方法和装置
CN104461698A (zh) * 2014-12-29 2015-03-25 成都致云科技有限公司 虚拟磁盘动态挂载的方法、管理装置及分布式存储系统
US20150242231A1 (en) * 2014-02-27 2015-08-27 International Business Machines Corporation Data swap in virtual machine environment
CN105159782A (zh) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 基于云主机为订单分配资源的方法和装置
CN108228076A (zh) * 2016-12-14 2018-06-29 华为技术有限公司 访问磁盘的方法和主机
CN109582592A (zh) * 2018-10-26 2019-04-05 华为技术有限公司 资源管理的方法和装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011143068A2 (en) * 2010-05-09 2011-11-17 Citrix Systems, Inc. Systems and methods for creation and delivery of encrypted virtual disks
CN102833237B (zh) * 2012-08-14 2015-01-14 南京斯坦德云科技股份有限公司 一种基于桥接的无限带宽协议转换方法及系统
CN107402891B (zh) * 2012-12-25 2020-12-22 华为技术有限公司 确定共享虚拟内存页面管理模式的方法和相关设备
CN103763173B (zh) * 2013-12-31 2017-08-25 华为技术有限公司 数据传输方法和计算节点
US9875063B2 (en) * 2014-07-02 2018-01-23 Hedvig, Inc. Method for writing data to a virtual disk using a controller virtual machine and different storage and communication protocols
WO2016101288A1 (zh) * 2014-12-27 2016-06-30 华为技术有限公司 一种远程直接数据存取方法、设备和系统
US10735513B2 (en) * 2016-09-08 2020-08-04 Toshiba Memory Corporation Remote NVMe activation
EP3358456A4 (en) * 2016-12-05 2018-08-08 Huawei Technologies Co., Ltd. Control method, storage device and system for data read/write command in nvme over fabric architecture
CN106844048B (zh) * 2017-01-13 2020-11-06 上海交通大学 基于硬件特性的分布式共享内存方法及系统
CN107203411B (zh) * 2017-04-18 2020-02-28 中国科学院计算技术研究所 一种基于远程ssd的虚拟机内存扩展方法及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889485A (zh) * 2005-06-30 2007-01-03 西门子(中国)有限公司 分布式对等网络实体之间的资源共享方法与资源共享系统
CN103793330A (zh) * 2012-10-31 2014-05-14 国际商业机器公司 在虚拟机环境中进行数据交换的方法和装置
US20150242231A1 (en) * 2014-02-27 2015-08-27 International Business Machines Corporation Data swap in virtual machine environment
CN104461698A (zh) * 2014-12-29 2015-03-25 成都致云科技有限公司 虚拟磁盘动态挂载的方法、管理装置及分布式存储系统
CN105159782A (zh) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 基于云主机为订单分配资源的方法和装置
CN108228076A (zh) * 2016-12-14 2018-06-29 华为技术有限公司 访问磁盘的方法和主机
CN109582592A (zh) * 2018-10-26 2019-04-05 华为技术有限公司 资源管理的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3862885A4 *

Also Published As

Publication number Publication date
CN109582592A (zh) 2019-04-05
EP3862885A1 (en) 2021-08-11
CN109582592B (zh) 2021-06-15
US20210240353A1 (en) 2021-08-05
EP3862885A4 (en) 2021-12-01

Similar Documents

Publication Publication Date Title
US9678918B2 (en) Data processing system and data processing method
US20200278880A1 (en) Method, apparatus, and system for accessing storage device
US11636052B2 (en) Non-volatile memory express (NVMe) data processing method and system
US11275530B2 (en) Method, system, and related device for NAS data access
US20210240353A1 (en) Resource management method and apparatus
CN108701004A (zh) 一种数据处理的系统、方法及对应装置
WO2016101288A1 (zh) 一种远程直接数据存取方法、设备和系统
US9092366B2 (en) Splitting direct memory access windows
WO2019127018A1 (zh) 存储系统访问方法及装置
WO2020034729A1 (zh) 数据处理方法、相关设备及计算机存储介质
WO2021063160A1 (zh) 访问固态硬盘的方法及存储设备
WO2023115852A1 (zh) 基于pcie的通信方法、装置、计算机设备和可读存储介质
WO2019127021A1 (zh) 存储系统中存储设备的管理方法及装置
US9104601B2 (en) Merging direct memory access windows
TW202219778A (zh) 針對每輸入輸出密鑰安全的元件、方法以及電腦可讀取儲存元件
US12014173B2 (en) Data processing method for network adapter and network adapter
WO2022141250A1 (zh) 数据传输方法和相关装置
CN117834707A (zh) 虚拟私有云vpc的访问方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19876096

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019876096

Country of ref document: EP

Effective date: 20210505