WO2016041453A1 - 远程资源访问方法和交换设备 - Google Patents

远程资源访问方法和交换设备 Download PDF

Info

Publication number
WO2016041453A1
WO2016041453A1 PCT/CN2015/089155 CN2015089155W WO2016041453A1 WO 2016041453 A1 WO2016041453 A1 WO 2016041453A1 CN 2015089155 W CN2015089155 W CN 2015089155W WO 2016041453 A1 WO2016041453 A1 WO 2016041453A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource device
address
physical
physical resource
virtual
Prior art date
Application number
PCT/CN2015/089155
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 EP15841487.0A priority Critical patent/EP3188446B1/en
Publication of WO2016041453A1 publication Critical patent/WO2016041453A1/zh
Priority to US15/460,923 priority patent/US10216664B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation

Definitions

  • the embodiments of the present invention relate to the field of computer technologies, and in particular, to a remote resource access method and a switching device.
  • the prior art applies a computer system that is separate from an external device and an input/output method thereof.
  • the host can communicate through a wired or wireless network, and the host redirects the I/O operation of the remote device to the dock. Station on the external device.
  • the device driver When the host communicates with the remote physical resource device, the device driver needs to be modified, and the accessed external device needs to be configured in advance. In the prior art architecture, when the remote physical resource device accesses the host, the interrupt cannot be provided. Access method.
  • the embodiment of the invention provides a remote resource access method and a switching device, which can implement data transmission between a local computer system and a remote physical resource device.
  • an embodiment of the present invention provides a remote resource access method for accessing a physical resource device separate from a computer system, where the computer system includes at least one computing node, and the computer system exchanges with the physical resource device.
  • Device connection the method includes:
  • the switching device acquires a first access message sent by the computing node, where the first access message is used to access the virtual resource device, and the destination address in the first access message is a virtual address of the virtual resource device;
  • the preset virtual address of the virtual resource device and the physical location of the physical resource device Determining, by the mapping relationship of the address, the physical address of the physical resource device corresponding to the virtual resource device, where the virtual resource device is a virtualized device of the physical resource device at the local end;
  • the method further includes:
  • the physical resource information includes a physical address of the physical resource device, where the management platform is configured to manage a physical resource device separated from the computer system ;
  • the method further includes:
  • the generating the virtual resource device corresponding to the physical resource device includes:
  • the determining, according to a preset mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device, determining a location corresponding to the virtual resource device includes:
  • Determining by querying the address translation table, a mapping relationship between the virtual address of the virtual resource device and the physical address of the physical resource device, and determining a physical address of the physical resource device corresponding to the virtual resource device, where the address translation table is A mapping relationship between the virtual address and the physical address is stored.
  • an embodiment of the present invention provides a switching device for accessing a physical resource device separate from a computer system, the computer system including at least one computing node, the computer system and the physical resource device Connected by a switching device, characterized in that the device comprises:
  • a receiving module configured to acquire a first access message sent by the computing node, where the first access message is used to access a virtual resource device, where a destination address in the first access message is a virtual address of the virtual resource device;
  • An obtaining module configured to determine, according to a preset mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device, a physical address of the physical resource device corresponding to the virtual resource device, where The virtual resource device is a virtualized device of the physical resource device at the local end;
  • a conversion module configured to convert the first access message into a second access message, where a destination address of the second access message is the physical address
  • a sending module configured to send the second access message to the physical resource device by using a network, where the physical resource device includes at least one physical resource.
  • the device further includes:
  • a physical resource information obtaining module configured to acquire physical resource information allocated by the management platform for the computing node, where the physical resource information includes a physical address of the physical resource device, where the management platform is used for management and A physical resource device separated by a computer system.
  • a generating module configured to generate the virtual resource device corresponding to the physical resource device
  • a recording module configured to record a mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device.
  • the receiving module is further configured to acquire, by the physical resource device, the first An interrupt request, where the first interrupt request carries a physical address of the physical resource device;
  • the obtaining module is further configured to determine, according to the preset mapping relationship between the virtual address of the virtual resource device and the physical address of the physical resource device, the virtual address of the virtual resource device corresponding to the physical resource device ;
  • the conversion module is further configured to convert the first interrupt request into a second interrupt request, where the second interrupt request carries a virtual address of the virtual resource device;
  • the sending module is further configured to send the second interrupt request to the computing node, so that the computing node accesses the virtual resource device according to the second interrupt request.
  • the generating module is specifically configured to:
  • the acquiring module is specifically configured to:
  • Determining by querying the address translation table, a mapping relationship between the virtual address of the virtual resource device and the physical address of the physical resource device, and determining a physical address of the physical resource device corresponding to the virtual resource device, where the address translation table is A mapping relationship between the virtual address and the physical address is stored.
  • An embodiment of the present invention provides a remote resource access method and a switching device, which first converts a virtual address in a first access message of a virtual resource device into a physical address of a corresponding remote physical resource device, and generates a second access message, and The access message is sent to the remote physical resource device corresponding to the physical address through the network, so that data transmission between the local computer system and the remote physical resource device can be realized without driving through the remote physical resource device.
  • Figure 1a is a schematic diagram of a remote resource access scenario according to an embodiment of the present invention.
  • FIG. 1b is a schematic flowchart 1 of a remote resource access method according to an embodiment of the present invention
  • FIG. 2 is a second schematic flowchart of a remote resource access method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram 1 of a switching device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a physical resource device according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram 2 of a switching device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram 3 of a switching device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram 4 of a switching device according to an embodiment of the present invention.
  • Embodiments of the present invention provide a remote resource access method for accessing a physical resource device that is separate from a computer system.
  • FIG. 1a is an application scenario of separating a computer system from a physical resource device according to an embodiment of the present invention.
  • computer system 10 is coupled to physical resource device 40 via switching device 20.
  • the CPU system 10 may include a CPU (Central Processing Unit) board 101, and the CPU board 101 may include at least one CPU 1011.
  • the switching device 20 is located in the same bus structure as the computer system.
  • the switching device 20 can be a Peripheral Component Interconnect Express (PCIE) switching device.
  • PCIE Peripheral Component Interconnect Express
  • the switching device 20 can be presented to the computer system in a PCIE-switch manner. 10 operating system.
  • the switching device 20 is in communication with the physical resource device through an internetwork, and the switching device 20 is responsible for communication forwarding between the computer system 10 and the remote physical resource device 40.
  • the physical resource device 40 may specifically include physical resources such as a MEM (Memory) board 401 and an IO (Input and Output) board 402.
  • the management platform 30 can be connected to the switching device 20 and the physical resource device 40 via the Internet.
  • the management platform 30 can be used to manage all resources, save specific information and usage status of physical resource devices, and the like. For example, the management platform 30 can be directed to the computer system according to the request of the computer system 10.
  • the system 10 assigns management resource information.
  • Figure 1b is a flowchart of a remote resource access method according to an embodiment of the present invention. As shown in Figure 1b, the method includes:
  • the switching device acquires a first access message sent by the computing node, where the first access message is used to access the virtual resource device, and the destination address in the first access message is a virtual address of the virtual resource device.
  • the computer system When the computer system needs to access the remote physical resource device, the computer system directly accesses the virtual device connected to the computer system, and the computing node of the computer system sends a first access message to the switching device, and the first access message has the message transmission Destination address, the message is used to access the virtual resource device, and the destination address in the first access message is a virtual address of the virtual resource device.
  • S102 Determine, according to a mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device, a physical address of the physical resource device corresponding to the virtual resource device, where the virtual resource device is virtualized by the physical resource device at the local end.
  • Equipment
  • the physical address of the physical resource device corresponding to the virtual resource device is determined by querying the address translation table, and the mapping between the virtual address of the virtual resource device and the physical address of the physical resource device is determined, and the address translation table stores the virtual address and the physical address.
  • the method may be implemented by: changing a destination address in the first access message to a physical address of a physical resource device corresponding to the virtual address in the first access message, thereby generating a second access message, and the second access
  • the destination address of the message is the physical address of the physical resource device, and then the second access message can be converted into a message in a network format.
  • S104 Send the second access message to the physical resource device by using a network, where the physical resource device includes at least one physical resource.
  • the second access message may be sent to the physical resource device by using the Internet.
  • the destination address in the second access message is the physical address of the physical resource device.
  • the second access message can be a message in the internet format.
  • the embodiment of the present invention provides a remote resource access method, which firstly converts a virtual address in a first access message of a virtual resource device into a physical address of a corresponding remote physical resource device, generates a second access message, and passes the access message.
  • the network sends to the remote physical resource device corresponding to the physical address, so that data transmission between the local computer system and the remote physical resource device can be realized without driving through the remote physical resource device.
  • the switching device may be located on a side of the computer system, and the physical resource device may be connected to the switching device through the Internet, and the switching device may be a relay device between the physical resource device and the computer system.
  • FIG. 2 is a flowchart of still another method according to an embodiment of the present invention. As shown in Figure 2, the method includes:
  • the computing node sends a physical resource request message to the management platform, where the physical resource request message is used to apply for an available physical resource device to the management platform.
  • the management platform determines the available physical resource device of the remote end, and the resource table stores the state of the remote physical resource device, where the state includes idle or non-idle.
  • the state of all remote physical resource devices may be stored in the management platform.
  • the remote physical resource device When the remote physical resource device is not occupied by any computer system, the remote physical resource device sends its state information to the management platform, and the management platform Update the local resource table according to the received status information, where the resource table stores the state of the remote physical resource device, and the state includes idle or non-idle, and the remote resource includes the remote physical resource device and the remote memory device.
  • the remote physical resource device is a hardware device that is not in the same bus structure as the computer system;
  • the management platform may query the resource table to determine which remote physical resource devices are currently available, if the remote device in the resource table The state of the physical resource device is represented as idle, and the management platform determines that the physical resource device at the far end where the state is idle is available.
  • the management platform may voluntarily query the resource table. If it is determined in the resource table that the state of the remote physical resource device is idle, the state of the physical air source device is sent to the switching device.
  • the management platform sends the physical resource information of the remote physical resource device to the switching device.
  • the physical resource information includes the remote physical resource device address of the remote physical resource device and the access of the remote physical resource device.
  • the mode, device type, programming interface, and manufacturer ID of the available remote physical device is the remote physical resource device address of the remote physical resource device and the access of the remote physical resource device.
  • the remote physical resource device may also send the physical resource information of the device to the management platform, where the physical resource information includes the remote physical resource device address of the remote physical resource device and the access mode of the available remote physical resource device.
  • the switching device installs a driver corresponding to the available remote physical resource device according to the physical resource information, where the switching device is a relay device that performs data transmission between the computer system and the remote physical resource device.
  • the switching device receives the physical resource device address of the remote physical resource device that is sent by the management platform, and adds the remote physical resource device address to the address translation table.
  • the address translation table may include a local address of the remote physical resource device on the switching device side, and a physical resource device address of the remote physical resource device.
  • the switching device generates the virtual resource device corresponding to the physical resource device.
  • the switching device may fill the address translation table according to the received physical resource device address of the remote end, and the received physical resource information is saved in the local cache, and the physical import is simulated by the slot hot plug operation.
  • the hot swap operation of the slot is as follows:
  • Selecting a free slot in the switching device sets the slot sensor level corresponding to the slot to a high level.
  • the slot sensor notifies the hot plug controller of the insertion according to the high level
  • the device is inserted in the slot.
  • the hot plug controller sets a value of a hot plug register corresponding to the slot to a preset identifier according to the high level, the preset identifier being used to indicate that the physical medium is inserted in the slot Resource equipment.
  • the slot event monitoring thread in the hot plug driver reads the physical resource information from the local cache after detecting that the value of the hot plug register is a preset identifier by polling or interrupting. And selecting, according to the physical resource information, a device driver corresponding to the physical resource device, and running the device driver, so that the switching device is simulated on the switching device to insert the physical resource device to generate a A virtual resource device corresponding to the physical resource device.
  • the virtual resource device needs to be locally assigned a virtual address, so that the computing node can access the virtual device according to the virtual address. And, after running the driver of the physical resource device, the switching device needs to update the state of the slot to a non-idle state.
  • the switching device fills the address translation table of the switching device according to the virtual address of the generated virtual resource device on the computer system side, and corresponds to the physical resource device address of the far end of the remote physical resource device.
  • the remote physical resource device can perform data transmission with the computer system.
  • the switching device receives the virtual resource device access message sent by the computer system, where the virtual resource device includes virtual hardware created by the computer system, and the virtual resource device access message includes a virtual address of the virtual resource device.
  • the switching device determines the physical resource device address of the remote physical resource device corresponding to the virtual address by querying the address translation table, and replaces the virtual address with the remote physical resource device address.
  • the switching device queries the address translation table, and determines the physical resource device address of the remote physical resource device corresponding to the virtual address by using the mapping between the virtual address in the address translation table and the remote physical resource device address, and the virtual address is obtained. Replace with the remote physical resource device address.
  • the switching device converts the first access message of the virtual resource device into a second message, where the format of the second message is a message format corresponding to the transmission medium, and the second message is sent to the remote physical resource by using the transmission medium. device.
  • the structure of the switching device 03 is as shown in FIG. 3.
  • the device 03 includes a communication protocol converter 031, a programmable logic device 032 for curing code, a segment cache 033, and a bus interface switch 034.
  • the bus interface switch 034 includes a virtual network.
  • the converter 031 can be a standard PCI (Peripheral Component Interconnect) or PCIE device, connected to the PCI bus, the programmable logic device has a piece of curing code , has a certain control function, the function can find the corresponding virtual resource device according to the message sent by the internet, generate an interrupt notification local CPU, receive and save the physical resource information sent by the management platform, select the available slot, generate hot plug The event is sent to the local operating system, and the physical resource information sent by the management platform is saved in a buffer of the device.
  • PCI Peripheral Component Interconnect
  • PCIE Peripheral Component Interconnect
  • the switching device and the remote physical resource device can transmit data through the Internet as a transmission medium, and the converter can be responsible for the conversion of the PCIE protocol and the internet protocol, and the first access message format of the virtual resource device can be converted by the communication protocol converter. Translating into a second access message of the internet protocol format, and then transmitting the second access message of the network protocol format to the remote physical resource device.
  • the remote physical resource device receives a second access message sent by the switching device to the remote physical resource device, and performs format conversion on the second access message to be converted into a third access message in a bus interface format, and a third access message.
  • the remote physical resource device address of the remote physical resource device is sent to the remote physical resource device corresponding to the remote physical resource device address.
  • the structure of the physical resource device 04 is as shown in FIG. 4, and includes a communication protocol converter 041, a bus 0442, a processor 043, and other functional modules 044, which may be a standard PCI or PCIE device connected to the PCI.
  • the switching device and the remote physical resource device can transmit data through the Internet as a transmission medium, and the remote physical resource device converts the second access message into a third access message through the communication protocol converter.
  • the third access message format is a bus interface format, and the third access message is sent to the remote physical resource device corresponding to the remote physical resource device address, and the remote physical resource device is not in the same bus structure as the computer system.
  • Hardware device is a bus interface format
  • the switching device receives an interrupt message sent by the physical resource device, where the interrupt message includes a device address of the device that generates the interrupt message.
  • the remote physical resource device When the remote physical resource device needs to access the computer system, the remote physical resource device generates an interrupt message, and the interrupt message may be an MSI (Message-Signaled Interrupts) message, and the MSI is processed by an interrupt handler.
  • the message is sent to the switching device, and the MSI message includes the device address of the device that generated the MSI message.
  • MSI Message-Signaled Interrupts
  • the switching device determines the virtual address of the virtual resource device corresponding to the device address by querying the address translation table, thereby determining the virtual resource device, and acquiring the interrupt address and the interrupt data of the virtual resource device, where the address translation table stores the virtual address and the device address.
  • the remote resource access device After receiving the MSI interrupt message, the remote resource access device queries the local address translation table, and determines the local virtual resource device corresponding to the device address in the MSI interrupt message by mapping between the virtual address and the device address in the address translation table.
  • the virtual address determines a local virtual resource device corresponding to the virtual address according to the virtual address, and then acquires an MSI Interrupt Address (MSI Address) and MSI Interrupt Data (MSI Data) of the virtual resource device.
  • MSI Address MSI Interrupt Address
  • MSI Data MSI Interrupt Data
  • the switching device generates an interrupt signal according to the interrupt address and the interrupt data, where the interrupt signal includes a virtual address, and sends the interrupt signal to the computer system.
  • the interrupt address and the interrupt data of the virtual resource device may be acquired, and an MSI interrupt signal may be generated according to the interrupt address and the interrupt data, and the interrupt signal is sent to the computer.
  • the system is such that the central processing unit of the computer system responds to the interrupt signal to access the device that generated the interrupt message, and the access procedure is the same as steps S205 to S208.
  • the computer system when the computer system is performing memory access, the computer system first searches for the required data from the cache of the switching device. If the required data does not exist in the cache, the computer system needs to access the remote storage device to The process of accessing the remote device is the same as the process of accessing the remote physical device by the computer system in steps S205 to S208, and is not described here.
  • the required data is stored in the cache of the switching device, so that the next time the data is invoked, the cache of the switching device is directly accessed.
  • the embodiment of the present invention provides a remote resource access method, which firstly converts a virtual address in a first access message of a virtual resource device into a physical address of a corresponding remote physical resource device, generates a second access message, and passes the access message.
  • the network sends the physical resource device to the remote physical device corresponding to the physical address, so that the data transmission between the local computer system and the remote physical resource device can be realized without driving through the remote physical resource device, and can be implemented by interrupting.
  • a compute node (such as a CPU) accesses physical resources.
  • the embodiment of the present invention provides a switching device 01. As shown in FIG. 5, the switching device 01 includes:
  • the receiving module 011 is configured to acquire a first access message sent by the computing node, where the first access message is used to access the virtual resource device, and the destination address in the first access message is a virtual address of the virtual resource device;
  • the obtaining module 012 is configured to determine, according to a mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device, a physical address of the physical resource device corresponding to the virtual resource device, where the virtual resource device is a physical resource device Virtualization device at the local end;
  • the conversion module 013 is configured to convert the first access message into a second access message, where the destination address of the second access message is a physical address;
  • the sending module 014 is configured to send the second access message to the physical resource device by using a network, where the physical resource device includes at least one physical resource.
  • the device 01 further includes:
  • the physical resource information obtaining module 015 is configured to obtain physical resource information allocated by the management platform for the computing node, where the physical resource information includes a physical address of the physical resource device, where the management platform is used to manage the physical resource device separated from the computer system.
  • a generating module 016, configured to generate a virtual resource device corresponding to the physical resource device
  • the recording module 017 is configured to record a mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device.
  • the receiving module is further configured to acquire the physical resource device to the Calculating a first interrupt request sent by the node, where the first interrupt request carries a physical address of the physical resource device;
  • the acquiring unit module is further configured to determine, according to the preset mapping relationship between a virtual address of the virtual resource device and a physical address of the physical resource device, a virtual state of the virtual resource device corresponding to the physical resource device address;
  • the conversion unit module is further configured to convert the first interrupt request into a second interrupt request, where the second interrupt request carries a virtual address of the virtual resource device;
  • the sending unit module is further configured to send the second interrupt request to the computing node, so that the computing node accesses the virtual resource device according to the second interrupt request.
  • the generating module 016 is specifically configured to:
  • the obtaining module 012 is specifically configured to:
  • the physical address of the physical resource device corresponding to the virtual resource device is determined by querying the address translation table, and the mapping between the virtual address of the virtual resource device and the physical address of the physical resource device is determined, and the address translation table stores the virtual address and the physical address.
  • the embodiment of the present invention provides a switching device, which first converts a virtual address in a first access message of a virtual resource device into a physical address of a corresponding remote physical resource device, generates a second access message, and sends the access message through the network.
  • the physical resource device to the remote end corresponding to the physical address so that data transmission between the local computer system and the remote physical resource device can be realized without modifying the device driver of the remote physical resource device.
  • the access of the computing node (such as CPU) to the physical resource can be realized by means of interruption.
  • the embodiment of the present invention provides a switching device 03.
  • the device 03 includes at least one interface 031, a memory 032, a bus 033, and a processor 034.
  • the memory 032 and the processor 034 are connected by a bus 033.
  • the processor 034 is configured to read the instructions for:
  • the first access message sent by the computing node is obtained by using the interface 031, where the first access message is used to access the virtual resource device, and the destination address in the first access message is a virtual place of the virtual resource device. site;
  • the second access message is sent to the physical resource device through the network through the interface 031, where the physical resource device includes at least one physical resource.
  • processor 034 read command is further used to:
  • the physical resource information allocated by the management platform for the computing node is obtained through the interface 031, where the physical resource information includes the physical address of the physical resource device, where the management platform is used to manage the physical resource device separated from the computer system;
  • processor 034 reads the instruction and is further used to:
  • the second interrupt request is sent to the computing node through the interface 031, so that the computing node accesses the virtual resource device according to the second interrupt request.
  • processor 034 reads the instruction specifically for:
  • processor 034 reads the instruction and is further used to:
  • the physical address of the physical resource device corresponding to the virtual resource device is determined by querying the address translation table, and the mapping between the virtual address of the virtual resource device and the physical address of the physical resource device is determined, and the address translation table stores the virtual address and the physical address.
  • the embodiment of the present invention provides a switching device, which first converts a virtual address in a first access message of a virtual resource device into a physical address of a corresponding remote physical resource device, generates a second access message, and sends the access message through the network.
  • the physical resource device to the remote end corresponding to the physical address, thereby implementing data transmission between the local computer system and the remote physical resource device.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Power Engineering (AREA)
  • Computer And Data Communications (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供一种远程资源访问方法和交换设备,能够实现本地计算机系统与远端的物理资源设备之间的数据传输且实现远端的物理资源设备以中断的方式访问计算机系统。其方法为:计算机系统访问远端的物理资源设备时,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而实现本地计算机系统与远端的物理资源设备之间的数据传输。

Description

远程资源访问方法和交换设备 技术领域
本发明实施例涉及计算机技术领域,尤其涉及远程资源访问方法和交换设备。
背景技术
随着计算机技术的不断发展,计算机系统中集成有越来越多的硬件资源,不同应用的特性导致这些硬件资源大多数时间处于闲置状态,资源利用率较低。
为了提高资源利用率,现有技术应用一种与外部设备分离设置的计算机系统及其输入输出方法,主机可通过有线方式或无线网络通信,主机对远程设备的I/O操作都重定向到坞站的外部设备上。
在实现现有技术的过程中,发明人发现现有技术存在如下问题:
当主机与远端的物理资源设备进行通信时,需要修改设备驱动,并且访问的外部设备需要提前配置,且现有技术的架构下,当远端的物理资源设备对主机进行访问时提供不了中断的访问方式。
发明内容
本发明实施例提供一种远程资源访问方法和交换设备,能够实现本地计算机系统与远端的物理资源设备之间的数据传输。
第一方面,本发明实施例提供一种远程资源访问方法,用于访问与计算机系统分离的物理资源设备,所述计算机系统包括至少一个计算节点,所述计算机系统与所述物理资源设备通过交换设备连接,所述方法包括:
所述交换设备获取计算节点发送的第一访问消息,所述第一访问消息用于访问虚拟资源设备,所述第一访问消息中的目的地址为所述虚拟资源设备的虚拟地址;
根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地 址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,其中,所述虚拟资源设备为所述物理资源设备在本端的虚拟化设备;
将所述第一访问消息转换为第二访问消息,其中所述第二访问消息的目的地址为所述物理资源设备的物理地址;
将所述第二访问消息通过网络发送给所述物理资源设备,其中,所述物理资源设备中包括至少一种物理资源。
结合第一方面,在第一种可能的实现方式中,所述方法还包括:
获取管理平台为所述计算节点分配的物理资源信息,所述物理资源信息中包含有所述物理资源设备的物理地址,其中,所述管理平台用于管理与所述计算机系统分离的物理资源设备;
生成与所述物理资源设备对应的所述虚拟资源设备;
记录所述虚拟资源设备的虚拟地址与所述物理资源设备的物理地址的映射关系。
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述方法还包括:
获取所述物理资源设备向所述计算节点发送的第一中断请求,所述第一中断请求中携带有所述物理资源设备的物理地址;
根据所述预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述物理资源设备对应的所述虚拟资源设备的虚拟地址;
将所述第一中断请求转换为第二中断请求,其中,所述第二中断请求中携带有所述虚拟资源设备的虚拟地址;
将所述第二中断请求发送给所述计算节点,以使所述计算节点根据所述第二中断请求访问所述虚拟资源设备。
结合第一方面的第一种可能的实现方式,在第三种可能的实现方式中,所述生成与所述物理资源设备对应的所述虚拟资源设备包括:
根据所述物理资源信息选择所述物理资源设备的驱动程序;
根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
结合第一方面,在第四种可能的实现方式中,所述根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址包括:
通过查询地址转换表,检索所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,所述地址转换表中存储有所述虚拟地址与所述物理地址之间的映射关系。
第二方面,本发明的实施例提供一种交换设备,所述设备用于访问与计算机系统分离的物理资源设备,所述计算机系统包括至少一个计算节点,所述计算机系统与所述物理资源设备通过交换设备连接,其特征在于,该设备包括:
接收模块,用于获取计算节点发送的第一访问消息,所述第一访问消息用于访问虚拟资源设备,所述第一访问消息中的目的地址为所述虚拟资源设备的虚拟地址;
获取模块,用于根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,其中,所述虚拟资源设备为所述物理资源设备在本端的虚拟化设备;
转换模块,用于将所述第一访问消息转换为第二访问消息,其中所述第二访问消息的目的地址为所述物理地址;
发送模块,用于将所述第二访问消息通过网络发送给所述物理资源设备,其中,所述物理资源设备中包括至少一种物理资源。
结合第二方面,在第一种可能的实现方式中,所述设备还包括:
物理资源信息获取模块,用于获取管理平台为所述计算节点分配的物理资源信息,所述物理资源信息中包含有所述物理资源设备的物理地址,其中,所述管理平台用于管理与所述计算机系统分离的物理资源设备。
生成模块,用于生成与所述物理资源设备对应的所述虚拟资源设备;
记录模块,用于记录所述虚拟资源设备的虚拟地址与所述物理资源设备的物理地址的映射关系。
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述接收模块,还用于获取所述物理资源设备向所述计算节点发送的第一中断请求,所述第一中断请求中携带有所述物理资源设备的物理地址;
所述获取模块,还用于根据所述预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述物理资源设备对应的所述虚拟资源设备的虚拟地址;
所述转换模块,还用于将所述第一中断请求转换为第二中断请求,其中,所述第二中断请求中携带有所述虚拟资源设备的虚拟地址;
所述发送模块,还用于将所述第二中断请求发送给所述计算节点,以使所述计算节点根据所述第二中断请求访问所述虚拟资源设备。
结合第二方面的第一种可能的实现方式,在第四种可能的实现方式中,所述生成模块具体用于:
根据所述物理资源信息选择所述物理资源设备的驱动程序;
根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
结合第二方面,在第四种可能的实现方式中,所述获取模块具体用于:
通过查询地址转换表,检索所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,所述地址转换表中存储有所述虚拟地址与所述物理地址之间的映射关系。
本发明实施例提供一种远程资源访问方法和交换设备,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而无需通过远端物理资源设备的驱动也能够实现本地计算机系统与远端的物理资源设备之间的数据传输。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易 见地,下面描述中的附图是本发明的一些实施例的附图。
图1a为本发明实施例提供的远程资源访问的场景示意图;
图1b为本发明实施例提供的远程资源访问方法流程示意图一;
图2为本发明实施例提供的远程资源访问方法流程示意图二;
图3为本发明实施例提供的交换设备的结构示意图一;
图4为本发明实施例提供的物理资源设备的结构示意图;
图5为本发明实施例提供的交换设备的结构示意图二;
图6为本发明实施例提供的交换设备的结构示意图三;
图7为本发明实施例提供的交换设备的结构示意图四。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。
本发明实施例提供远程资源访问方法,用于访问与计算机系统分离的物理资源设备。如图1a所示,图1a为本发明实施例提供的一种计算机系统与物理资源设备分离的应用场景。如图所示,计算机系统10与物理资源设备40通过交换设备20连接。其中,计算机系统10中可以包括CPU(Central Processing Unit,中央处理器)板101,CPU板101中可以包括至少一个CPU1011。交换设备20与计算机系统位于同一个总线结构中,交换设备20通常可以为快捷外设组件互联(Peripheral Component Interconnect Express,PCIE)交换设备,例如交换设备20可以以PCIE-switch的方式呈现给计算机系统10中的操作系统。交换设备20与物理资源设备通过互联网络进行通信连接,交换设备20用于负责计算机系统10与远程物理资源设备40的通信转发。物理资源设备40具体可以包括MEM(Memory,存储器)板401以及IO(Input and Output,输入输出)板402等等物理资源。管理平台30可以通过互联网与所述交换设备20和所述物理资源设备40相连接。管理平台30可以用于管理所有资源,保存物理资源设备的具体信息和使用状态等。例如,管理平台30可以根据计算机系统10的请求向计算机系 统10分配管理资源信息。
下面将基于上述应用场景对本发明实施例中提供的远程资源访问方法进行详细描述。图1b为本发明实施例提供的一种远程资源访问方法的流程图,如图1b所示,该方法包括:
S101、交换设备获取计算节点发送的第一访问消息,第一访问消息用于访问虚拟资源设备,第一访问消息中的目的地址为虚拟资源设备的虚拟地址。
具体的,可通过以下方法实现:
当计算机系统需要访问远端的物理资源设备时,该计算机系统直接访问与该计算机系统连接的虚拟设备,该计算机系统的计算节点向交换设备发送第一访问消息,第一访问消息具有该消息传送的目的地址,该消息用于访问虚拟资源设备,第一访问消息中的目的地址为虚拟资源设备的虚拟地址。
S102、根据预设的虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,其中,虚拟资源设备为物理资源设备在本端的虚拟化设备。
具体的,可通过以下方法实现:
通过查询地址转换表,检索虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,地址转换表中存储有虚拟地址与物理地址之间的映射关系。
S103、将第一访问消息转换为第二访问消息,其中第二访问消息的目的地址为物理资源设备的物理地址。
具体的,可通过以下方法实现:将该第一访问消息中的目的地址改成与该第一访问消息中的虚拟地址对应的物理资源设备的物理地址,从而生成第二访问消息,第二访问消息的目的地址为上述物理资源设备的物理地址,而后还可以将该第二访问消息转换为网络格式的消息。
S104、将第二访问消息通过网络发送给物理资源设备,其中,物理资源设备中包括至少一种物理资源。
具体的,可通过以下方法实现:
交换设备将第一访问消息转换为第二访问消息后可通过互联网络将第二访问消息发送给物理资源设备,该第二访问消息中的目的地址为上述物理资源设备的物理地址,所述第二访问消息可以为互联网络格式的消息。
本发明实施例提供远程资源访问方法,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而无需通过远端物理资源设备的驱动也能够实现本地计算机系统与远端的物理资源设备之间的数据传输。
为了使本技术领域人员能够更清楚地了解本发明实施例的技术方案,下面提供一种更为详细的实施例。
本发明实施例中,上述交换设备可以位于计算机系统一侧,物理资源设备可以通过互联网与该交换设备相连接,该交换设备可以为物理资源设备与计算机系统之间的中继设备。图2为本发明实施例提供的又一种方法流程图。如图2所示,该方法包括:
S201、计算节点向管理平台发送物理资源请求消息,该物理资源请求消息用于向管理平台申请可用的物理资源设备。
S202、管理平台接收到物理资源请求消息后,查询资源表确定可用远端的物理资源设备,资源表存储有远端的物理资源设备的状态,状态包括空闲或非空闲。
具体的,可通过以下方法实现:
在管理平台中可以存储有所有远端的物理资源设备的状态,当远端的物理资源设备没有被任何计算机系统占用时,该远端的物理资源设备将其状态信息发送至管理平台,管理平台根据接收到的状态信息更新本地的资源表,资源表存储有远端的物理资源设备的状态,状态包括空闲或非空闲,该远端资源包括上述远端的物理资源设备和远端内存设备,其中,远端的物理资源设备为与计算机系统不在同一个总线结构中的硬件设备;
管理平台接收到计算单元发送的物理资源请求消息后,可以查询该资源表,从而确定哪些远端的物理资源设备目前是可用的,若资源表中的远端的 物理资源设备的状态表示为空闲,则管理平台确定该状态处于空闲的远端的物理资源设备是可用的。
需要说明的是,还可以是管理平台自发查询该资源表,若在该资源表中确定有远端的物理资源设备的状态为空闲,则将该物理气源设备的状态发送至交换设备。
S203、管理平台将可用远端的物理资源设备的物理资源信息发送至交换设备,物理资源信息包括可用远端的物理资源设备的远端的物理资源设备地址、可用远端的物理资源设备的访问方式、设备类型、编程接口以及可用远端的物理资源设备的制造商标识。
具体的,可通过以下方法实现:
远端的物理资源设备还可以将该设备的物理资源信息发送至管理平台,物理资源信息包括可用远端的物理资源设备的远端的物理资源设备地址、可用远端的物理资源设备的访问方式、设备类型、编程接口以及可用远端的物理资源设备的制造商标识,由于不同的设备需要对应不同的驱动程序,因此管理平台将可用远端的物理资源设备的物理资源信息发送至交换设备,以便交换设备根据物理资源信息安装与可用远端的物理资源设备对应的驱动程序,其中,交换设备为计算机系统与远端的物理资源设备进行数据传输的中继设备。
S204、交换设备接收管理平台发送的可用远端的物理资源设备的远端的物理资源设备地址,将远端的物理资源设备地址添加到地址转换表中。
其中,在地址转换表中,可以包括该远端的物理资源设备在交换设备一侧的本地地址,还包括该远端的物理资源设备的物理资源设备地址。
S205、交换设备生成与所述物理资源设备对应的所述虚拟资源设备
具体的,可通过以下方法实现:
交换设备可以根据收到的远端的物理资源设备地址填充地址转换表,收到的物理资源信息保存在本地缓存中,通过插槽热插拔操作来模拟所述交换设备插入了所述物理资源设备,所述插槽热插拔操作如下:
在所述交换设备中选择一个空闲的插槽,将所述插槽对应的插槽感应器电平置成高电平。插槽感应器根据所述高电平通知热插拔控制器所述插 槽中插入了设备。热插拔控制器将根据所述高电平将与所述插槽对应的热插拔寄存器的值设置为预设标识,所述预设标识用于表示所述插槽中插入了所述物理资源设备。热插拔驱动程序中的插槽事件监控线程通过轮询或中断的方式检测到所述热插拔寄存器的值为预设标识后,从所述本地缓存中读取所述物理资源信息。并根据所述物理资源信息选择与所述物理资源设备对应的设备驱动程序,运行所述设备驱动程序,从而在所述交换设备上模拟所述交换设备插入了所述物理资源设备,以生成所述物理资源设备对应的虚拟资源设备。
可以理解的是,在生成所述虚拟资源设备后,需要在本地为所述虚拟资源设备分配虚拟地址,以使计算节点可以根据所述虚拟地址访问所述虚拟设备。并且,在运行了所述物理资源设备的驱动程序后,所述交换设备需要将所述插槽的状态更新为非空闲状态。
热插拔操作完成后,交换设备根据生成的虚拟资源设备在计算机系统端的虚拟地址填充交换设备的地址转换表,与之前填充的远端的物理资源设备的远端的物理资源设备地址对应起来,该远端的物理资源设备即可与计算机系统进行数据传输。
S206、交换设备接收计算机系统发送的虚拟资源设备访问消息,虚拟资源设备包括计算机系统创建的虚拟硬件,虚拟资源设备访问消息包括虚拟资源设备的虚拟地址。
S207、交换设备通过查询地址转换表,确定虚拟地址对应的远端的物理资源设备的远端的物理资源设备地址,并将虚拟地址替换为远端的物理资源设备地址。
具体的,可通过以下方法实现:
交换设备查询地址转换表,通过地址转换表中虚拟地址与远端的物理资源设备地址的映射关系,确定虚拟地址对应的远端的物理资源设备的远端的物理资源设备地址,并将虚拟地址替换为远端的物理资源设备地址。
S208、交换设备对虚拟资源设备第一访问消息进行格式转换,转换为第二消息,第二消息的格式为传输媒介对应的消息格式,并将第二消息通过传输媒介发送至远端的物理资源设备。
具体的,可通过以下方法实现:
交换设备03的结构如图3所示,该设备03包含一个通信协议转换器031、固化代码的可编程逻辑器件032和一段缓存033以及总线接口交换器034,该总线接口交换器034包括虚拟网桥0341、虚拟插槽0342和虚拟硬件0343,该转换器031可以是一个标准的PCI(Peripheral Component Interconnect,外设组件互联)或PCIE设备,连接在PCI总线上,可编程逻辑器件拥有一段固化代码,具有一定的控制功能,该功能可以根据互联网络发来的消息找到对应的虚拟资源设备、生成中断通知本地CPU、接收并保存管理平台发来的物理资源信息,选择可用插槽,生成热插拔事件,将插槽信息发送给本地操作系统,管理平台发来的物理资源信息都保存在该设备的一段缓存中。
交换设备和远端的物理资源设备可以通过互联网作为传输媒介进行数据传输,则转换器可以负责PCIE协议和互联网络协议的转换,可以通过该通信协议转换器将上述虚拟资源设备第一访问消息格式转换成互联网络协议格式的第二访问消息,而后将该网络协议格式的第二访问消息发送至远端的物理资源设备。
S209、远端的物理资源设备接收交换设备发送的对远端的物理资源设备的第二访问消息,将第二访问消息进行格式转换,转换为总线接口格式的第三访问消息,第三访问消息包括远端的物理资源设备的远端的物理资源设备地址,将第三访问消息发送至与远端的物理资源设备地址对应的远端的物理资源设备。
具体的,可通过以下方法实现:
物理资源设备04的结构如图4所示,其中包含一个通信协议转换器041、总线042、处理器043和其他功能模块044,该转换器041可以是一个标准的PCI或PCIE设备,连接在PCI总线上,交换设备和远端的物理资源设备可以通过互联网作为传输媒介进行数据传输,远端的物理资源设备通过通信协议转换器对第二访问消息进行格式转换,转换为第三访问消息,第三访问消息格式为总线接口格式,并将第三访问消息发送至与远端的物理资源设备地址对应的远端的物理资源设备,远端的物理资源设备为与计算机系统不在同一个总线结构中的硬件设备。
S210、交换设备接收物理资源设备发送的中断消息,中断消息中包括产生该中断消息的设备的设备地址。
具体的,可通过以下方法实现:
当远端的物理资源设备需要访问计算机系统,该远端的物理资源设备产生中断消息,该中断消息可以为MSI(Message-Signaled Interrupts,消息知讯中断)消息,并通过中断处理程序将该MSI消息发送至交换设备,MSI消息包括产生该MSI消息的设备的设备地址。
S211、交换设备通过查询地址转换表,确定设备地址对应的虚拟资源设备的虚拟地址,从而确定虚拟资源设备,并获取虚拟资源设备的中断地址与中断数据,地址转换表存储有虚拟地址与设备地址之间的映射。
具体的,可通过以下方法实现:
远程资源访问设备接收到该MSI中断消息后,查询本地的地址转换表,通过该地址转换表中虚拟地址与设备地址之间的映射确定出该MSI中断消息中的设备地址对应的本地虚拟资源设备的虚拟地址,根据该虚拟地址确定与该虚拟地址对应的本地虚拟资源设备,而后获取该虚拟资源设备的MSI中断地址(MSI Address)和MSI中断数据(MSI Data)。
S212、交换设备根据中断地址与中断数据生成中断信号,中断信号包括虚拟地址,并将中断信号发送至计算机系统。
具体的,可通过以下方法实现:
当确定与产生该中断消息的设备对应的虚拟资源设备后,可以获取该虚拟资源设备的中断地址和中断数据,可以根据该中断地址和中断数据生成一条MSI中断信号,并将中断信号发送至计算机系统,以便计算机系统的中央处理器响应中断信号,进而访问产生中断消息的设备,访问过程同步骤S205至步骤S208。
需要说明的是,当计算机系统在进行内存访问时,计算机系统首先从交换设备的缓存中查找需要的数据,若该缓存中不存在需要的数据,则计算机系统需要访问远端的存储设备,以查找需要的数据,此时计算机系统对远端存储设备的访问过程同步骤S205至步骤S208的计算机系统对远端的物理资源设备的访问过程相同,此处不再赘述;
当计算机系统通过访问上述远端存储设备后,获取到需要的数据,则将需要的数据存储在交换设备的缓存中,以便下次调用该数据时直接访问交换设备的缓存。
本发明实施例提供远程资源访问方法,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而无需通过远端物理资源设备的驱动也能够实现本地计算机系统与远端的物理资源设备之间的数据传输,并且能够通过中断的方式实现计算节点(例如CPU)对物理资源的访问。
本发明的实施例提供交换设备01,如图5所示,该交换设备01包括:
接收模块011,用于获取计算节点发送的第一访问消息,第一访问消息用于访问虚拟资源设备,第一访问消息中的目的地址为虚拟资源设备的虚拟地址;
获取模块012,用于根据预设的虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,其中,虚拟资源设备为物理资源设备在本端的虚拟化设备;
转换模块013,用于将第一访问消息转换为第二访问消息,其中第二访问消息的目的地址为物理地址;
发送模块014,用于将第二访问消息通过网络发送给物理资源设备,其中,物理资源设备中包括至少一种物理资源。
进一步的,如图6所示,设备01还包括:
物理资源信息获取模块015,用于获取管理平台为计算节点分配的物理资源信息,物理资源信息中包含有物理资源设备的物理地址,其中,管理平台用于管理与计算机系统分离的物理资源设备。
生成模块016,用于生成与物理资源设备对应的虚拟资源设备;
记录模块017,用于记录虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系。
再进一步的,所述接收模块,还用于获取所述物理资源设备向所述 计算节点发送的第一中断请求,所述第一中断请求中携带有所述物理资源设备的物理地址;
所述获取单元模块,还用于根据所述预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述物理资源设备对应的所述虚拟资源设备的虚拟地址;
所述转换单元模块,还用于将所述第一中断请求转换为第二中断请求,其中,所述第二中断请求中携带有所述虚拟资源设备的虚拟地址;
所述发送单元模块,还用于将所述第二中断请求发送给所述计算节点,以使所述计算节点根据所述第二中断请求访问所述虚拟资源设备。
再进一步的,生成模块016具体用于::
根据所述物理资源信息选择所述物理资源设备的驱动程序;
根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
更进一步的,获取模块012具体用于:
通过查询地址转换表,检索虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,地址转换表中存储有虚拟地址与物理地址之间的映射关系。
本发明实施例提供交换设备,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而无需通过修改远程物理资源设备的设备驱动也能够实现本地计算机系统与远端的物理资源设备之间的数据传输。并且能够通过中断的方式实现计算节点(例如CPU)对物理资源的访问。
本发明实施例提供交换设备03,如图7所示,该设备03包括至少一个接口031、存储器032,总线033以及处理器034,其中存储器032、处理器034通过总线033相连接,该存储器032用于存储指令,该处理器034用于读取该指令用于:
通过接口031获取计算节点发送的第一访问消息,第一访问消息用于访问虚拟资源设备,第一访问消息中的目的地址为虚拟资源设备的虚拟地 址;
根据预设的虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,其中,虚拟资源设备为物理资源设备在本端的虚拟化设备;
将第一访问消息转换为第二访问消息,其中第二访问消息的目的地址为物理资源设备的物理地址;
通过接口031将第二访问消息通过网络发送给物理资源设备,其中,物理资源设备中包括至少一种物理资源。
进一步的,该处理器034读取指令还用于:
通过接口031获取管理平台为计算节点分配的物理资源信息,物理资源信息中包含有物理资源设备的物理地址,其中,管理平台用于管理与计算机系统分离的物理资源设备;
生成与物理资源设备对应的虚拟资源设备;
记录虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系。
再进一步的,该处理器034读取该指令还用于:
通过接口031获取物理资源设备向计算节点发送的第一中断请求,第一中断请求中携带有物理资源设备的物理地址;
根据预设的虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与物理资源设备对应的虚拟资源设备的虚拟地址;
将第一中断请求转换为第二中断请求,其中,第二中断请求中携带有虚拟资源设备的虚拟地址;
通过接口031将第二中断请求发送给计算节点,以使计算节点根据第二中断请求访问虚拟资源设备。
再进一步的,该处理器034读取该指令具体用于:
根据所述物理资源信息选择所述物理资源设备的驱动程序;
根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
更进一步的,该处理器034读取该指令还用于:
通过查询地址转换表,检索虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与虚拟资源设备对应的物理资源设备的物理地址,地址转换表中存储有虚拟地址与物理地址之间的映射关系。
本发明实施例提供交换设备,首先将虚拟资源设备的第一访问消息中的虚拟地址转换为对应的远端的物理资源设备的物理地址,生成第二访问消息,并将该访问消息通过网络发送至物理地址对应的远端的物理资源设备,从而实现本地计算机系统与远端的物理资源设备之间的数据传输。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是,本申请所提供的实施例仅仅是示意性的。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。在本发明实施例、权利要求以及附图中揭示的特征可以独立存在也可以组合存在。在本发明实施例中以硬件形式描述的特征可以通过软件来执行,反之亦然。在此不做限定。

Claims (10)

  1. 一种远程资源访问方法,用于访问与计算机系统分离的物理资源设备,所述计算机系统包括至少一个计算节点,所述计算机系统与所述物理资源设备通过交换设备连接,其特征在于,所述方法包括:
    所述交换设备获取计算节点发送的第一访问消息,所述第一访问消息用于访问虚拟资源设备,所述第一访问消息中的目的地址为所述虚拟资源设备的虚拟地址;
    根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,其中,所述虚拟资源设备为所述物理资源设备在本端的虚拟化设备;
    将所述第一访问消息转换为第二访问消息,其中所述第二访问消息的目的地址为所述物理资源设备的物理地址;
    将所述第二访问消息通过网络发送给所述物理资源设备,其中,所述物理资源设备中包括至少一种物理资源。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    获取管理平台为所述计算节点分配的物理资源信息,所述物理资源信息中包含有所述物理资源设备的物理地址,其中,所述管理平台用于管理与所述计算机系统分离的物理资源设备;
    生成与所述物理资源设备对应的所述虚拟资源设备;
    记录所述虚拟资源设备的虚拟地址与所述物理资源设备的物理地址的映射关系。
  3. 根据权利要求1或2所述的方法,其特征在于,还包括:
    获取所述物理资源设备向所述计算节点发送的第一中断请求,所述第一中断请求中携带有所述物理资源设备的物理地址;
    根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述物理资源设备对应的所述虚拟资源设备的虚拟地址;
    将所述第一中断请求转换为第二中断请求,其中,所述第二中断请求 中携带有所述虚拟资源设备的虚拟地址;
    将所述第二中断请求发送给所述计算节点,以使所述计算节点根据所述第二中断请求访问所述虚拟资源设备。
  4. 根据权利要求2所述的方法,其特征在于,所述生成与所述物理资源设备对应的所述虚拟资源设备包括:
    根据所述物理资源信息选择所述物理资源设备的驱动程序;
    根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
  5. 根据权利要求1所述的方法,其特征在于,所述根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址包括:
    通过查询地址转换表,检索所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,所述地址转换表中存储有所述虚拟地址与所述物理地址之间的映射关系。
  6. 一种交换设备,所述交换设备用于访问与计算机系统分离的物理资源设备,所述计算机系统包括至少一个计算节点,所述计算机系统与所述物理资源设备通过交换设备连接,其特征在于,该设备包括:
    接收模块,用于获取计算节点发送的第一访问消息,所述第一访问消息用于访问虚拟资源设备,所述第一访问消息中的目的地址为所述虚拟资源设备的虚拟地址;
    获取模块,用于根据预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,其中,所述虚拟资源设备为所述物理资源设备在本端的虚拟化设备;
    转换模块,用于将所述第一访问消息转换为第二访问消息,其中所述第二访问消息的目的地址为所述物理地址;
    发送模块,用于将所述第二访问消息通过网络发送给所述物理资源设备,其中,所述物理资源设备中包括至少一种物理资源。
  7. 根据权利要求6所述的设备,其特征在于,所述设备还包括:
    物理资源信息获取模块,用于获取管理平台为所述计算节点分配的物理资源信息,所述物理资源信息中包含有所述物理资源设备的物理地址,其中,所述管理平台用于管理与所述计算机系统分离的物理资源设备。
    生成模块,用于生成与所述物理资源设备对应的所述虚拟资源设备;
    记录模块,用于记录所述虚拟资源设备的虚拟地址与所述物理资源设备的物理地址的映射关系。
  8. 根据权利要求6或7所述的设备,其特征在于:
    所述接收模块,还用于获取所述物理资源设备向所述计算节点发送的第一中断请求,所述第一中断请求中携带有所述物理资源设备的物理地址;
    所述获取模块,还用于根据所述预设的所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述物理资源设备对应的所述虚拟资源设备的虚拟地址;
    所述转换模块,还用于将所述第一中断请求转换为第二中断请求,其中,所述第二中断请求中携带有所述虚拟资源设备的虚拟地址;
    所述发送模块,还用于将所述第二中断请求发送给所述计算节点,以使所述计算节点根据所述第二中断请求访问所述虚拟资源设备。
  9. 根据权利要求7所述的设备,其特征在于,所述生成模块具体用于:
    根据所述物理资源信息选择所述物理资源设备的驱动程序;
    根据选择的所述驱动程序在所述交换设备上模拟所述物理资源设备,从而生成与所述物理资源设备对应的虚拟资源设备。
  10. 根据权利要求6所述的设备,其特征在于,所述获取模块具体用于:
    通过查询地址转换表,检索所述虚拟资源设备的虚拟地址与物理资源设备的物理地址的映射关系,确定与所述虚拟资源设备对应的所述物理资源设备的物理地址,所述地址转换表中存储有所述虚拟地址与所述物理地址之间的映射关系。
PCT/CN2015/089155 2014-09-16 2015-09-08 远程资源访问方法和交换设备 WO2016041453A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15841487.0A EP3188446B1 (en) 2014-09-16 2015-09-08 Remote resource access method and switching device
US15/460,923 US10216664B2 (en) 2014-09-16 2017-03-16 Remote resource access method and switching device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410471932.4 2014-09-16
CN201410471932.4A CN105491082B (zh) 2014-09-16 2014-09-16 远程资源访问方法和交换设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/460,923 Continuation US10216664B2 (en) 2014-09-16 2017-03-16 Remote resource access method and switching device

Publications (1)

Publication Number Publication Date
WO2016041453A1 true WO2016041453A1 (zh) 2016-03-24

Family

ID=55532547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/089155 WO2016041453A1 (zh) 2014-09-16 2015-09-08 远程资源访问方法和交换设备

Country Status (4)

Country Link
US (1) US10216664B2 (zh)
EP (1) EP3188446B1 (zh)
CN (1) CN105491082B (zh)
WO (1) WO2016041453A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872542B (zh) * 2016-09-27 2021-05-04 阿里巴巴集团控股有限公司 一种数据传输的方法及网络设备
CN113722110B (zh) * 2021-11-02 2022-04-15 阿里云计算有限公司 计算机系统、内存访问方法及设备
CN116418848A (zh) * 2021-12-31 2023-07-11 华为技术有限公司 网络节点的配置和访问请求的处理方法、装置
CN117170854A (zh) * 2022-05-26 2023-12-05 华为技术有限公司 一种内存访问方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163133A (zh) * 2006-10-10 2008-04-16 中国科学院计算技术研究所 一种多机虚拟环境下实现资源共享的通信系统及通信方法
CN102246465A (zh) * 2008-12-10 2011-11-16 亚马逊技术有限公司 提供对远程服务的本地安全网络访问
CN102523207A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 基于虚拟网络计算机的远程资源访问方法及代理设备
WO2013143121A1 (en) * 2012-03-30 2013-10-03 Intel Corporation Accessing a device on a remote machine

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7609649B1 (en) * 2005-04-26 2009-10-27 Cisco Technology, Inc. Methods and apparatus for improving network based virtualization performance
US8082387B2 (en) * 2007-10-29 2011-12-20 Micron Technology, Inc. Methods, systems, and devices for management of a memory system
CN101520738A (zh) * 2008-02-27 2009-09-02 黄歆媚 基于设备访存管理技术的虚拟机系统及其设备访问方法
US8239655B2 (en) * 2010-01-18 2012-08-07 Vmware, Inc. Virtual target addressing during direct data access via VF of IO storage adapter
US8639976B2 (en) * 2011-02-15 2014-01-28 Coraid, Inc. Power failure management in components of storage area network
CN103823638B (zh) * 2014-02-08 2017-01-18 华为技术有限公司 一种虚拟设备访问方法及装置
CN103986602B (zh) * 2014-05-16 2017-12-12 华为技术有限公司 一种启动操作系统的方法、相关设备和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163133A (zh) * 2006-10-10 2008-04-16 中国科学院计算技术研究所 一种多机虚拟环境下实现资源共享的通信系统及通信方法
CN102246465A (zh) * 2008-12-10 2011-11-16 亚马逊技术有限公司 提供对远程服务的本地安全网络访问
CN102523207A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 基于虚拟网络计算机的远程资源访问方法及代理设备
WO2013143121A1 (en) * 2012-03-30 2013-10-03 Intel Corporation Accessing a device on a remote machine

Also Published As

Publication number Publication date
CN105491082A (zh) 2016-04-13
EP3188446B1 (en) 2019-01-09
US20170185546A1 (en) 2017-06-29
CN105491082B (zh) 2019-02-19
EP3188446A1 (en) 2017-07-05
EP3188446A4 (en) 2017-08-30
US10216664B2 (en) 2019-02-26

Similar Documents

Publication Publication Date Title
US10282192B1 (en) Updating device code through a bus
US20200278880A1 (en) Method, apparatus, and system for accessing storage device
US10372648B2 (en) Device management method and apparatus
AU2013388031C1 (en) Data processing system and data processing method
US10127170B2 (en) High density serial over LAN management system
US11113089B2 (en) Sharing data via virtual machine to host device bridging
US10216664B2 (en) Remote resource access method and switching device
JP2008090375A (ja) 割込み制御システム、およびこれを利用した記憶制御システム
US10621124B2 (en) Method, device and computer program product for enabling SR-IOV functions in endpoint device
WO2016082522A1 (zh) 管理路径确定方法及装置
US9170963B2 (en) Apparatus and method for generating interrupt signal that supports multi-processor
JP2021504804A (ja) 仮想マシンの動的アドレス変換のためのコンピュータ実装方法、システム、およびコンピュータ・プログラム
US9319313B2 (en) System and method of forwarding IPMI message packets based on logical unit number (LUN)
AU2015402888A1 (en) Computer device and method for reading/writing data by computer device
TWI403955B (zh) 用於在虛擬化環境中共享音訊子系統的裝置、方法與系統
US11467998B1 (en) Low-latency packet processing for network device
CN110955624A (zh) 一种pcie设备的热插拔方法、装置和系统
US10909270B2 (en) Information processing device, mobile object, information processing method, and computer program product
TW201523277A (zh) 伺服器系統與節點偵測方法
CN116483259A (zh) 一种数据处理方法以及相关装置
JP6965943B2 (ja) 構成管理装置、構成管理システム、構成管理方法、および、構成管理プログラム
CN110554977A (zh) 数据缓存方法、数据处理方法、计算机设备、存储介质
US20240069754A1 (en) Computing system and associated method
CN116204463A (zh) 数据处理方法及系统、电子设备、存储介质
WO2016090577A1 (zh) 计算机及设备访问方法

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: 15841487

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015841487

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015841487

Country of ref document: EP