WO2017124918A1 - Hot-processing method and device for apparatus - Google Patents

Hot-processing method and device for apparatus Download PDF

Info

Publication number
WO2017124918A1
WO2017124918A1 PCT/CN2017/000072 CN2017000072W WO2017124918A1 WO 2017124918 A1 WO2017124918 A1 WO 2017124918A1 CN 2017000072 W CN2017000072 W CN 2017000072W WO 2017124918 A1 WO2017124918 A1 WO 2017124918A1
Authority
WO
WIPO (PCT)
Prior art keywords
hot
information
chip
function
service
Prior art date
Application number
PCT/CN2017/000072
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2017124918A1 publication Critical patent/WO2017124918A1/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/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • 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

Definitions

  • the invention relates to the technical field of hot extraction and hot insertion of hardware devices, in particular to a heat treatment method and device for equipment.
  • PCIE Peripheral Component Interface Express
  • CPUs central processing units
  • PCIE controllers perform data transfer between the external device and the CPU.
  • Hot plugging is hot plugging.
  • the hot plug function allows the user to remove and replace external devices without shutting down the system and cutting off the power, thus improving the system's resilience and scalability.
  • a complete native bus interface (Native PCIE) hot-swap system requires several aspects of hardware, firmware elements, and software elements; the hardware elements refer to the electrical characteristics of the motherboard bus system.
  • Support, firmware element refers to the motherboard's basic input and output system (Basic Input Output System, BIOS for short) must support the hot plug
  • the software element refers to the operating system (Operating System, referred to as: OS) integrated PCIE The functional components that must be provided for hot plugging.
  • the software for hot plugging in the OS has a hot swap driver of the kernel and a communication mechanism between the kernel and the user space (called uevent).
  • uevent a hot swap driver of the kernel and a communication mechanism between the kernel and the user space
  • the related business that has been pulled out of the external device may still be running, causing the abnormality of the hot-swap system.
  • the present invention provides a method and a device for heat treatment of a device to solve the phenomenon that the related service that has been pulled out of the external device is still in operation during the process of performing the hot extraction operation by the prior art. , causing an abnormality in the hot swap system.
  • the present invention provides a method of heat treatment of a device, comprising:
  • the service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information.
  • the method further includes:
  • the configuration information related to the hot-pull device is cleaned according to the device function.
  • the device information further includes N bus interfaces PCIE corresponding to the first slot information, where the hot extraction device has N chips, and the device The function includes a chip function of each of the chips, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
  • the service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information, including:
  • the method After the stopping the service running on the service interface, the method includes:
  • the configuration information associated with each of the chips is cleaned according to the chip function of each of the PCIE-compatible chips.
  • the method further includes :
  • the method further includes:
  • the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
  • a business function associated with each of the chips is initiated based on the acquired second event information and chip functionality.
  • the present invention provides a device heat treatment apparatus comprising:
  • a heat treatment module configured to acquire first event information and first slot information, where the first event information is a hot pull operation performed by the device;
  • a pre-processing module configured to acquire device information according to the first event information acquired by the heat treatment module and the first slot information, where the device information includes a device function of the hot-pull device;
  • the service management module is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information obtained by the heat treatment module.
  • the service management module is further configured to: after the service running on the service interface is stopped, clear the device related to the hot-pull device according to the device function Configuration information.
  • the device information acquired by the pre-processing module further includes N bus interfaces PCIE corresponding to the first slot information, and the hot extraction device has N a chip, the device function includes a chip function of each of the chips, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
  • the service management module is configured to invoke a service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information acquired by the heat treatment module. And means: calling a service interface of each of the chips according to a chip function of each of the PCIE corresponding chips, and stopping a service running on the invoked service interface according to the first event information;
  • the service management module is further configured to: after stopping the service running on the service interface, clear configuration information related to each of the chips according to a chip function of each PCIE corresponding chip.
  • the service management module is further configured to stop the service interface Discharging the driver associated with the hot-pull device according to the first slot information acquired by the heat treatment module and the device function acquired by the service management module, and releasing the hot-plug device occupation System resources.
  • the device heat treatment device further includes:
  • the heat treatment module is further configured to acquire second event information and a second slot information, wherein the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
  • the pre-processing module is further configured to acquire a chip function of each chip in the hot-plug device and all PCIEs corresponding to the second slot information, and determine all the PCIEs and chips in the hot-plug device Corresponding relationship, wherein the PCIE has a one-to-one correspondence with the chip;
  • the heat processing module is further configured to allocate system resources and load drivers for each chip corresponding to the PCIE according to the correspondence determined by the preprocessing module;
  • the preprocessing module is further configured to update resource information and configuration information related to each of the chips according to the second event information acquired by the heat processing module;
  • the service management module is further configured to start a service function related to each of the chips according to the second event information acquired by the heat processing module and the chip function acquired by the preprocessing module.
  • the device heat treatment method and device provided by the present invention after acquiring the first event information and the first slot information by the hot extraction operation of the device, acquiring the device of the hot extraction device according to the first event information and the first slot information
  • the function so that the service interface of the hot-pull device is invoked by the device function, and the service running on the service interface is stopped according to the first event information; the device heat treatment method provided by the embodiment of the invention is hot-extracted in the execution device
  • the consistency between the extracted device and the related services in the system is realized, thereby solving the problem of passing the prior art.
  • the related business that has been pulled out of the external device may still be running, causing the abnormality of the hot swap system.
  • FIG. 1 is a flowchart of a method for heat treatment of a device according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another method for heat treatment of a device according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of still another method for heat treatment of a device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a heat treatment device for a device according to an embodiment of the present invention.
  • PCI SIG Peripheral Component Interconnect Special Interest Group
  • SHPC SPEC Standard Hot Swap Controller specification
  • the PCIE hot plug system described in the background art requires cooperation of three elements: hardware elements, firmware elements, and software elements.
  • the existing patents have been improved on hardware elements and firmware elements, including: patent application number is CN201310400629, the invention name is "resource allocation method and system”; patent application number is CN201210094722, and the invention name is "a CPLD or FPGA" Method for implementing hot plugging of PCIE devices.
  • CN201310400629 has improved the resource allocation strategy in the firmware element
  • CN201210094722 has improved the implementation method of hardware elements.
  • the hot-extracting device and the hot-plugging device in the following embodiments of the present invention can be inserted into the slot of the terminal device or pulled out from the slot of the terminal device.
  • the external device may be, for example, a network card, a hard disk or an external optical disk drive (ODD), which may be based on a certain technical field or may include a plurality of technical fields.
  • ODD external optical disk drive
  • FIG. 1 is a flowchart of a method for heat treatment of a device according to an embodiment of the present invention.
  • the device heat treatment method provided in this embodiment is applicable to the case where the external device of the heat treatment system is hot-extracted, and the method may be performed by a device heat treatment device, which is realized by a combination of hardware and software, and the device may be Integrated in the processor of the terminal device for use by the processor.
  • the method in this embodiment may include:
  • S110 Acquire first event information and first slot information, where the first event information is a hot pull operation performed by the device.
  • the hot extraction operation or the hot insertion operation of the device is performed corresponding to the slot of a certain terminal device.
  • the terminal device may be provided with a physical button.
  • the user can trigger the hot plug event by pressing or popping the button, and the terminal device can analyze the operation of the button to parse out the event type corresponding to the current button operation, and can also learn the event type corresponding to the current button operation through the preset rule, the event.
  • the type of the device is usually hot-plugged or hot-plugged.
  • the first event information obtained is that the device in the slot corresponding to the button is hot-drawn from the slot.
  • the terminal device can obtain the slot information of the current hot-out operation, and the current event type and related slot information can be known.
  • the information obtained after the user operates the button in this embodiment is: the device in the first slot performs a hot pull operation.
  • the device function of the extracted device in the first slot is further parsed according to the first slot information, and the device function generally corresponds to the device type, for example, if The device is a network card, and its device function is to provide a wireless network connection; if the device is a hard disk, the device function is to provide data interaction with the external device; if the device is an ODD, the device function is to provide a digital Versatile Disc (Digital Versatile Disc) For: DVD) data interaction.
  • the device function generally corresponds to the device type, for example, if The device is a network card, and its device function is to provide a wireless network connection; if the device is a hard disk, the device function is to provide data interaction with the external device; if the device is an ODD, the device function is to provide a digital Versatile Disc (Digital Versatile Disc) For: DVD) data interaction.
  • the slots in the embodiments of the present invention have a one-to-one correspondence with the hot insertion device or the hot extraction device, that is, only one device can be inserted into one slot; in addition, the embodiment does not limit each The device function of a device, which may be a single-function device, or a device with multiple functions, such as the device function of the device, for example, related to the number of chips in the device.
  • the service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information.
  • the purpose of the heat treatment method of the device provided in this embodiment is to solve the problem of the abnormality of the hot plug system, that is, after the hot pull operation of the device is performed, the corresponding service of the extracted device can be stopped to maintain the external device in the hot plug system.
  • the consistency of the running program in a specific implementation, the terminal device can invoke the service interface related to the function of the device according to the device function of the hot-plugging device, that is, the service interface of the device has been pulled out, and the first event information is known because To hot-plug an event, you can stop the business running on the invoked business interface.
  • the method provided in this embodiment can effectively avoid the system abnormality caused by the operation of the device being pulled out during the hot extraction operation, which is a relatively safe heat treatment mode, and the method is It can be implemented by software control, which is convenient for users to operate.
  • the device for obtaining the hot extraction device is obtained according to the first event information and the first slot information.
  • the unplugged device is consistent with the related services in the system, the process of hot-extracting operations through the existing technology is solved, and the related services that have been pulled out of the external device may still be running. , causing an abnormality in the hot swap system.
  • the device heat treatment method provided in this embodiment after stopping the service running on the service interface, that is, after S130, further includes: S140, and clearing configuration information related to the hot-pull device according to the device function.
  • the device has been pulled out, and the related service of the device has been disconnected.
  • the service that is stopped normally needs to be configured during normal operation, that is, the configuration information of the stopped service is stored in the terminal device.
  • the configuration information related to the hot-plugged device can be further cleaned, thereby releasing the storage resources of the terminal device and improving the use performance of the terminal device.
  • the terminal device can generally distribute a message to each service process related to the hot-pull device according to the device function, and complete the service processing related to the device function by the service process of receiving the message, for example, the above clear configuration.
  • the processing of information can also be handled by the main standby machine.
  • FIG. 2 is a flowchart of another method for heat treatment of a device according to an embodiment of the present invention.
  • the device information in this embodiment further includes N PCIEs corresponding to the first slot information, and the hot extraction device may have N chips.
  • the device functions include chip functions of each chip, and N chips and N
  • the PCIE is a one-to-one correspondence, where N is an integer greater than 1.
  • N is 2.
  • the specific example is N is 2.
  • S130 may be replaced by: calling a service interface of each chip according to a chip function of each PCIE corresponding chip, and stopping running on the invoked service interface according to the first event information.
  • Service accordingly, the S140 can be replaced with: cleaning the configuration information associated with each chip according to the chip function of each PCIE corresponding chip.
  • the services related to each chip may be sequentially stopped, and the configuration information related to each chip may be sequentially cleaned, or the foregoing operations may be simultaneously performed.
  • the method provided by the foregoing embodiment of the present invention after S130, further includes: S150, uninstalling a driver related to the hot-pull device according to the first slot information and the device function, and releasing the system resource occupied by the hot-pull device .
  • the system performance of the terminal device can be further improved by uninstalling the driver, and the released device can be released at the same time.
  • the system resources occupied by the device for example, release the address resource occupied by the device, that is, input/output (abbreviation: IO) MEM.
  • the driver related to all the chips in the hot-pull device needs to be unloaded, and the chip and the first slot information in the device are hot-extracted.
  • the PCIE has a one-to-one correspondence, that is, the first slot information can be converted into a PCIE corresponding to the chip in the hot-plugging device, thereby unloading the driver and releasing system resources by traversing all converted PCIEs.
  • the foregoing embodiments of the present invention can also power off the first slot and display the processing result on a graphical user interface (GUI) of the terminal device.
  • GUI graphical user interface
  • S150 in this embodiment is a further processing solution after the service is stopped, which is beneficial to improving the solution integrity of the heat treatment method.
  • S150 may be performed after S130, or may be performed after S140; When there are multiple chips in the hot-pull device, S130-S150 may be sequentially executed for each chip, or S130-S150 may be simultaneously executed for all chips, and other execution processes may be set.
  • FIG. 3 is a flowchart of still another method for heat treatment of a device according to an embodiment of the present invention. The method provided in this embodiment further includes:
  • the terminal device can also obtain the second event information by using the operation of the physical button by the user.
  • the user in the embodiment controls the button to be in the pressed state.
  • the second event information obtained is that the device is hot-inserted in the slot corresponding to the button, and the terminal device can obtain the slot information of the current hot-plug operation, and the current event type and related slot information can be known.
  • the information obtained after the user operates the button in this embodiment is: the device performs hot insertion into the second slot, and the slot can also be powered.
  • the chips in the device performing the hot insertion operation in this embodiment may be one or more.
  • the hot plug device has at least two chips as an example.
  • the slot is in one-to-one correspondence with the hot plug device, and the chip in the hot plug device has a one-to-one correspondence with the PCIE in the second slot.
  • the PCIE traverses each chip of the hot-plug device through the PCIE corresponding to the second slot information. Therefore, before performing corresponding service processing on the hot-plug device, it is necessary to determine the correspondence between the PCIE and the chip.
  • the hot plug device has two chips, namely chip A and chip B.
  • the slot inserted in the device also has two PCIE ports, PCIE port A and PCIE port B.
  • the chip and the chip can be determined.
  • the correspondence between PCIE ports is: chip A links PCIE port A, and chip B links PCIE port B.
  • each chip can be performed by traversing each PCIE port, that is, the processing in S230 to S250.
  • S230 to S250 may be sequentially performed for each chip, or S230 to S250 may be simultaneously performed for all chips, as long as the above operation can be performed for each chip in the hot insertion device.
  • the hot-plugging device in this embodiment may be a device that is hot-extracted in the embodiments shown in FIG. 1 and FIG. 2, or may be a different external device, and the method provided in this embodiment is performed.
  • the S110-S250 in the embodiment and the S110-S150 in the foregoing embodiments have no clear sequence, and the same slot can be executed in different time segments. It is also possible to perform different slots in the same time period. Therefore, only the execution steps S210 to S250 of hot insertion are shown in FIG. 3, S110 to S150 may be performed before S210, and S110 to S150 may be performed after S250. .
  • FIG. 4 is a schematic structural diagram of a heat treatment device for a device according to an embodiment of the present invention.
  • the device heat treatment device can be implemented by a combination of hardware and software, and the device can be integrated into the processor of the terminal device.
  • the tunnel flow control device provided in this embodiment specifically includes: a heat treatment module 11, a preprocessing module 12, and a service management module 13.
  • the heat treatment module 11 is configured to acquire the first event information and the first slot information, where the first event information is a hot pull operation performed by the device.
  • the hot extraction operation or the hot insertion operation of the device is an operation performed corresponding to a slot of a certain terminal device, and can also be identified by a state change of a physical button set on the terminal device.
  • the hot-extraction or hot-insertion event is the same as that in the above embodiment, and therefore will not be described here.
  • the module is also used to power on and off the slot.
  • the pre-processing module 12 is configured to acquire device information according to the first event information acquired by the heat treatment module 11 and the first slot information, where the device information includes a device function of the hot-pull device.
  • the pre-processing module 12 can receive the hot-pull-out request, and the hot-extraction request carries the first event information and the first slot information, thereby parsing the hot-pull device.
  • the type of function can be used to parsing the hot-pull device.
  • the slots in the embodiments of the present invention are in one-to-one correspondence with the hot insertion device or the hot extraction device. Relationship, that is, only one device can be inserted in one slot; in addition, this embodiment does not limit the device function of each device, and may be a single-function device or a device having multiple functions, each of which The device function of the device is for example related to the number of chips in the device.
  • the service management module 13 is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module 12, and stop the service running on the service interface according to the first event information obtained by the heat treatment module 11.
  • the device heat treatment device can invoke a service interface related to the function of the device according to the device function of the hot-pull device, that is, the service interface of the device has been pulled out, and the first event information is known as hot-plugging.
  • the business running on the invoked business interface can be stopped.
  • the service management module 13 in this embodiment is further configured to: after stopping the service running on the service interface, clear the configuration information related to the hot-pull device according to the device function. By clearing the configuration information related to the hot-plugged device, the module achieves the effect of releasing the storage resources of the terminal device and improving the performance of the terminal device.
  • the device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 1 of the present invention, and has a corresponding functional module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
  • the device information acquired by the preprocessing module 12 further includes N PCIEs corresponding to the first slot information, and the hot extraction device has N chips, and correspondingly, the device The function includes a chip function of each chip, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1.
  • the number of PCIEs corresponding to the slots is multiple, and the device has In the case of a plurality of chips, a specific example of N is 2 will be described.
  • the service management module 13 in the embodiment shown in FIG. 4 is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module 12, and obtain the service interface according to the heat treatment module 11.
  • the first event information stops the service running on the service interface, which means: calling the service interface of each chip according to the chip function of each PCIE corresponding chip, and stopping the service running on the invoked service interface according to the first event information;
  • the service management module 13 is specifically configured to clean configuration information related to each chip.
  • the service management module 13 is further configured to acquire the first slot information and the device function acquired by the pre-processing module 12 according to the heat treatment module 11 after the service running on the service interface is stopped. Uninstall the drivers associated with the hot-plugged device and release the system resources occupied by the hot-plugged device.
  • the device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 2 of the present invention, and has a corresponding function module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
  • Each of the above embodiments is an improvement on the software element for the hot pull event.
  • the present invention is based on the above embodiments.
  • a specific implementation for hot insertion events is provided.
  • the module 11 is further configured to acquire the second event information and the second slot information, the second event information is a hot plug operation performed by the device, wherein the hot plug device has at least one chip.
  • the second event information in this embodiment is that the device performs hot insertion into the second slot, and the slot can also be powered. It should be noted that, as in the above embodiment, the chips in the device performing the hot insertion operation in this embodiment may be one or more.
  • the pre-processing module 12 is further configured to obtain a chip function of each chip in the hot-plug device and all PCIEs corresponding to the second slot information, and determine a correspondence between all PCIEs and chips in the hot-plug device, wherein the PCIE and the chip are One-to-one correspondence.
  • the slots in the embodiment are in one-to-one correspondence with the hot-plug devices, and the chips in the hot-plug device have a one-to-one correspondence with the PCIEs in the second slot.
  • the heat treatment module 11 is further configured to allocate system resources and load drivers for the chips corresponding to each PCIE according to the correspondence determined by the pre-processing module 12.
  • the pre-processing module 12 can transmit each PCIE port information to the heat treatment module 11, and the heat treatment module 11 allocates system resources and load drivers for the chip.
  • the pre-processing module 12 is further configured to update resource information and configuration information related to each chip according to the second event information acquired by the heat treatment module 11.
  • the service management module 13 is further configured to start a service function related to each chip according to the second event information acquired by the heat processing module 11 and the chip function acquired by the preprocessing module 12.
  • each chip can also be performed by traversing each PCIE port, that is, performing the above-mentioned hot insertion correlation.
  • the above processing manner may be performed for each chip in turn, or the above processing manner may be simultaneously performed for all the chips, as long as the above operation can be performed for each chip in the hot insertion device.
  • the hot-plugging device may be a device that is hot-extracted in the above embodiment, or may be a different external device, and after performing the method provided in this embodiment, the device may be further Perform a hot pull.
  • the device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 3 of the present invention, and has a corresponding functional module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
  • the above-mentioned heat treatment module, pre-processing module, business management module and the like may include hardware components, software modules or a combination of hardware and software.
  • the same unit may be implemented by the same hardware/software or by a combination of different hardware/software.
  • the above modules or units may all be located in the same hardware structure; or, the above modules or units are respectively located in a plurality of different hardware structures, and may interact through a communication connection. While the embodiments of the present invention have been described above, the described embodiments are merely for the purpose of understanding the invention and are not intended to limit the invention. Any modification and variation in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention. The scope defined by the appended claims shall prevail.
  • the present invention relates to the field of hot-extraction and hot-plugging of hardware devices, which is used to implement the hot-extraction operation of the related services in the system when the device is hot-extracted.
  • the hot-swapping system is abnormal due to the fact that the related services that have been pulled out of the external device are still running.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed are a hot-processing method and device for an apparatus. The hot-processing method for an apparatus comprises: acquiring first event information and first slot information, the first event information being a hot swapping operation executed by the apparatus (S110); acquiring apparatus information according to the first event information and the first slot information, the apparatus information comprising an apparatus function of a hot-swappable apparatus (S120); calling a service interface of the hot-swappable apparatus according to the apparatus function, and stopping a service running on the service interface according to the first event information (S130). The method and device solve the problem of a hot-swapping system abnormality in the prior art caused by the running of a service related to an external apparatus that has already been unplugged that may occur during a hot-swapping operation.

Description

一种设备热处理方法和装置Device heat treatment method and device 技术领域Technical field
本发明涉及硬件设备的热拔出和热插入技术领域,尤指一种设备热处理方法和装置。The invention relates to the technical field of hot extraction and hot insertion of hardware devices, in particular to a heat treatment method and device for equipment.
背景技术Background technique
总线接口(Peripheral Component Interface Express,简称为:PCIE)作为一种局部总线,目前绝大部分中央处理器(Central Processing Unit,简称为:CPU)都通过PCIE控制器连接外部设备,该PCIE控制器用于进行外部设备和CPU之间的数据传输。The Peripheral Component Interface Express (PCIE) is a local bus. At present, most central processing units (CPUs) are connected to external devices through PCIE controllers. Perform data transfer between the external device and the CPU.
热插拔即带电插拔,热插拔功能就是允许用户在不关闭系统、不切断电源的情况下拔出和更换外部设备,从而提高系统的恢复能力和扩展性。通常地,一套完整的本地总线接口(Native PCIE)热插拔系统需要几方面的相互配合,分别为硬件元素、固件元素和软件元素;其中,硬件元素是指主板总线系统的电气特性方面的支持,固件元素是指主板的基本输入输出系统(Basic Input Output System,简称为:BIOS)必须对热插拔提供的支持,软件元素是指操作系统(Operating System,简称为:OS)综合使用PCIE热插拔所必须提供的功能组件。目前OS中针对热插拔的软件操作有内核的热插拔驱动和内核与用户空间的通信机制(称为uevent),在产生热插拔事件时,通过uevent将事件上报给用户,然而,在通过uevent上报事件的过程中,有可能出现已拔出外部设备的相关驱动已经被删除,而该外部设备的相关业务实际上依然在运行的现象。Hot plugging is hot plugging. The hot plug function allows the user to remove and replace external devices without shutting down the system and cutting off the power, thus improving the system's resilience and scalability. Generally, a complete native bus interface (Native PCIE) hot-swap system requires several aspects of hardware, firmware elements, and software elements; the hardware elements refer to the electrical characteristics of the motherboard bus system. Support, firmware element refers to the motherboard's basic input and output system (Basic Input Output System, BIOS for short) must support the hot plug, the software element refers to the operating system (Operating System, referred to as: OS) integrated PCIE The functional components that must be provided for hot plugging. Currently, the software for hot plugging in the OS has a hot swap driver of the kernel and a communication mechanism between the kernel and the user space (called uevent). When a hot plug event is generated, the event is reported to the user through uevent, however, During the process of reporting an event through uevent, it may happen that the related driver that has been pulled out of the external device has been deleted, and the related service of the external device is still running.
综上所述,通过现有技术进行热拔出操作的处理过程中,由于可能出现已拔出外部设备的相关业务依然在运行的现象,而引起热插拔系统异常的问题。In summary, during the process of performing the hot-pull operation by the prior art, the related business that has been pulled out of the external device may still be running, causing the abnormality of the hot-swap system.
发明内容Summary of the invention
为了解决上述技术问题,本发明提供了一种设备热处理方法和装置,以解决通过现有技术进行热拔出操作的处理过程中,由于可能出现已拔出外部设备的相关业务依然在运行的现象,而引起热插拔系统异常的问题。In order to solve the above technical problem, the present invention provides a method and a device for heat treatment of a device to solve the phenomenon that the related service that has been pulled out of the external device is still in operation during the process of performing the hot extraction operation by the prior art. , causing an abnormality in the hot swap system.
第一方面,本发明提供一种设备热处理方法,包括:In a first aspect, the present invention provides a method of heat treatment of a device, comprising:
获取第一事件信息和第一槽位信息,所述第一事件信息为设备执行热拔出操作;Acquiring the first event information and the first slot information, where the first event information is a hot pull operation performed by the device;
根据所述第一事件信息和所述第一槽位信息获取设备信息,所述设备信息包括热拔出设备的设备功能;Obtaining device information according to the first event information and the first slot information, where the device information includes a device function of the hot extraction device;
根据所述设备功能调用所述热拔出设备的业务接口,并根据所述第一事件信息停止所述业务接口上运行的业务。 The service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information.
在第一方面的第一种可能的实现方式中,所述停止所述业务接口上运行的业务之后,还包括:In a first possible implementation manner of the first aspect, after the stopping the service running on the service interface, the method further includes:
根据所述设备功能清理与所述热拔出设备相关的配置信息。The configuration information related to the hot-pull device is cleaned according to the device function.
在第一方面的第二种可能的实现方式中,所述设备信息还包括所述第一槽位信息对应的N个总线接口PCIE,所述热拔出设备中具有N个芯片,所述设备功能包括每个所述芯片的芯片功能,所述N个芯片与所述N个PCIE为一一对应的关系,其中,N为大于1的整数;In a second possible implementation manner of the first aspect, the device information further includes N bus interfaces PCIE corresponding to the first slot information, where the hot extraction device has N chips, and the device The function includes a chip function of each of the chips, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
所述根据所述设备功能调用所述热拔出设备的业务接口,并根据所述第一事件信息停止所述业务接口上运行的业务,包括:The service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information, including:
根据每个所述PCIE对应芯片的芯片功能调用每个所述芯片的业务接口,并根据所述第一事件信息停止所调用业务接口上运行的业务;Calling a service interface of each of the chips according to a chip function of each of the PCIE corresponding chips, and stopping a service running on the invoked service interface according to the first event information;
所述停止所述业务接口上运行的业务之后,包括:After the stopping the service running on the service interface, the method includes:
根据每个所述PCIE对应芯片的芯片功能,清理与每个所述芯片相关的配置信息。The configuration information associated with each of the chips is cleaned according to the chip function of each of the PCIE-compatible chips.
根据第一方面、第一方面的第一种和第二种可能的实现方式中任意一种,在第三种可能的实现方式中,所述停止所述业务接口上运行的业务之后,还包括:According to the first aspect, the first and second possible implementation manners of the first aspect, in a third possible implementation, after the stopping the service running on the service interface, the method further includes :
根据所述第一槽位信息和所述设备功能卸载与所述热拔出设备相关的驱动程序,并释放所述热拔出设备占用的系统资源。And uninstalling, according to the first slot information and the device function, a driver related to the hot-pull device, and releasing system resources occupied by the hot-pull device.
根据第一方面、第一方面的第一种和第二种可能的实现方式中任意一种,在第四种可能的实现方式中,还包括:According to the first aspect, the first and the second possible implementation manners of the first aspect, in a fourth possible implementation, the method further includes:
获取第二事件信息和第二槽位信息,所述第二事件信息为设备执行热插入操作,其中,热插入设备中具有至少一个芯片;Acquiring the second event information and the second slot information, where the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
获取所述热插入设备中每个芯片的芯片功能和所述第二槽位信息对应的全部PCIE,并确定所述全部PCIE与所述热插入设备中芯片的对应关系,其中,所述PCIE与所述芯片为一一对应的关系;Obtaining a chip function of each chip in the hot plug device and all PCIEs corresponding to the second slot information, and determining a correspondence between the entire PCIE and a chip in the hot plug device, where the PCIE and the PCIE The chips have a one-to-one correspondence;
根据所确定的对应关系为每个所述PCIE对应的芯片分配系统资源和加载驱动;Allocating system resources and loading drivers for each chip corresponding to the PCIE according to the determined correspondence relationship;
根据所述第二事件信息更新与每个所述芯片相关的资源信息和配置信息;Updating resource information and configuration information related to each of the chips according to the second event information;
根据所获取的第二事件信息和芯片功能启动与每个所述芯片相关的业务功能。A business function associated with each of the chips is initiated based on the acquired second event information and chip functionality.
第二方面,本发明提供一种设备热处理装置,包括:In a second aspect, the present invention provides a device heat treatment apparatus comprising:
热处理模块,设置为获取第一事件信息和第一槽位信息,所述第一事件信息为设备执行热拔出操作;a heat treatment module, configured to acquire first event information and first slot information, where the first event information is a hot pull operation performed by the device;
预处理模块,设置为根据所述热处理模块获取的第一事件信息和第一槽位信息获取设备信息,所述设备信息包括热拔出设备的设备功能;a pre-processing module, configured to acquire device information according to the first event information acquired by the heat treatment module and the first slot information, where the device information includes a device function of the hot-pull device;
业务管理模块,设置为根据所述预处理模块获取的设备功能调用所述热拔出设备的业务接口,并根据所述热处理模块获取的第一事件信息停止所述业务接口上运行的业务。 The service management module is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information obtained by the heat treatment module.
在第二方面的第一种可能的实现方式中,所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据所述设备功能清理与所述热拔出设备相关的配置信息。In a first possible implementation manner of the second aspect, the service management module is further configured to: after the service running on the service interface is stopped, clear the device related to the hot-pull device according to the device function Configuration information.
在第二方面的第二种可能的实现方式中,所述预处理模块获取的设备信息还包括所述第一槽位信息对应的N个总线接口PCIE,所述热拔出设备中具有N个芯片,所述设备功能包括每个所述芯片的芯片功能,所述N个芯片与所述N个PCIE为一一对应的关系,其中,N为大于1的整数;In a second possible implementation manner of the second aspect, the device information acquired by the pre-processing module further includes N bus interfaces PCIE corresponding to the first slot information, and the hot extraction device has N a chip, the device function includes a chip function of each of the chips, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
所述业务管理模块,设置为根据所述预处理模块获取的设备功能调用所述热拔出设备的业务接口,并根据所述热处理模块获取的第一事件信息停止所述业务接口上运行的业务,是指:根据每个所述PCIE对应芯片的芯片功能调用每个所述芯片的业务接口,并根据所述第一事件信息停止所调用业务接口上运行的业务;The service management module is configured to invoke a service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information acquired by the heat treatment module. And means: calling a service interface of each of the chips according to a chip function of each of the PCIE corresponding chips, and stopping a service running on the invoked service interface according to the first event information;
所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据每个所述PCIE对应芯片的芯片功能,清理与每个所述芯片相关的配置信息。The service management module is further configured to: after stopping the service running on the service interface, clear configuration information related to each of the chips according to a chip function of each PCIE corresponding chip.
根据第二方面、第二方面的第一种和第二种可能的实现方式中任意一种,在第三种可能的实现方式中,所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据所述热处理模块获取的第一槽位信息和所述业务管理模块获取的设备功能卸载与所述热拔出设备相关的驱动程序,并释放所述热拔出设备占用的系统资源。According to the second aspect, the first and second possible implementation manners of the second aspect, in a third possible implementation, the service management module is further configured to stop the service interface Discharging the driver associated with the hot-pull device according to the first slot information acquired by the heat treatment module and the device function acquired by the service management module, and releasing the hot-plug device occupation System resources.
根据第二方面、第二方面的第一种和第二种可能的实现方式中任意一种,在第四种可能的实现方式中,所述设备热处理装置还包括:According to the second aspect, the first and second possible implementation manners of the second aspect, in the fourth possible implementation, the device heat treatment device further includes:
所述热处理模块,还设置为获取第二事件信息和第二槽位信息,所述第二事件信息为设备执行热插入操作,其中,热插入设备中具有至少一个芯片;The heat treatment module is further configured to acquire second event information and a second slot information, wherein the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
所述预处理模块,还设置为获取所述热插入设备中每个芯片的芯片功能和所述第二槽位信息对应的全部PCIE,并确定所述全部PCIE与所述热插入设备中芯片的对应关系,其中,所述PCIE与所述芯片为一一对应的关系;The pre-processing module is further configured to acquire a chip function of each chip in the hot-plug device and all PCIEs corresponding to the second slot information, and determine all the PCIEs and chips in the hot-plug device Corresponding relationship, wherein the PCIE has a one-to-one correspondence with the chip;
所述热处理模块,还设置为根据所述预处理模块确定的对应关系为每个所述PCIE对应的芯片分配系统资源和加载驱动;The heat processing module is further configured to allocate system resources and load drivers for each chip corresponding to the PCIE according to the correspondence determined by the preprocessing module;
所述预处理模块,还设置为根据所述热处理模块获取的第二事件信息更新与每个所述芯片相关的资源信息和配置信息;The preprocessing module is further configured to update resource information and configuration information related to each of the chips according to the second event information acquired by the heat processing module;
所述业务管理模块,还设置为根据所述热处理模块获取的第二事件信息和所述预处理模块获取的芯片功能启动与每个所述芯片相关的业务功能。The service management module is further configured to start a service function related to each of the chips according to the second event information acquired by the heat processing module and the chip function acquired by the preprocessing module.
本发明提供的设备热处理方法和装置,通过对设备的热拔出操作获取第一事件信息和第一槽位信息后,根据该第一事件信息和第一槽位信息获取热拔出设备的设备功能,从而通过该设备功能调用所述热拔出设备的业务接口,并根据第一事件信息停止已调用业务接口上运行的业务;本发明实施例提供的设备热处理方法,在执行设备热拔出操作时,实现了已拔出设备与系统中相关业务的一致性,从而解决了通过现有技 术进行热拔出操作的处理过程中,由于可能出现已拔出外部设备的相关业务依然在运行的现象,而引起热插拔系统异常的问题。The device heat treatment method and device provided by the present invention, after acquiring the first event information and the first slot information by the hot extraction operation of the device, acquiring the device of the hot extraction device according to the first event information and the first slot information The function, so that the service interface of the hot-pull device is invoked by the device function, and the service running on the service interface is stopped according to the first event information; the device heat treatment method provided by the embodiment of the invention is hot-extracted in the execution device In operation, the consistency between the extracted device and the related services in the system is realized, thereby solving the problem of passing the prior art. During the process of performing the hot extraction operation, the related business that has been pulled out of the external device may still be running, causing the abnormality of the hot swap system.
附图说明DRAWINGS
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification, which together with the embodiments of the present application are used to explain the technical solutions of the present invention, and do not constitute a limitation of the technical solutions of the present invention.
图1为本发明实施例提供的一种设备热处理方法的流程图;1 is a flowchart of a method for heat treatment of a device according to an embodiment of the present invention;
图2为本发明实施例提供的另一种设备热处理方法的流程图;2 is a flowchart of another method for heat treatment of a device according to an embodiment of the present invention;
图3为本发明实施例提供的又一种设备热处理方法的流程图;3 is a flowchart of still another method for heat treatment of a device according to an embodiment of the present invention;
图4为本发明实施例提供的一种设备热处理装置的结构示意图。FIG. 4 is a schematic structural diagram of a heat treatment device for a device according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
首先简要介绍PCIE规范的发展过程。1997年,外围部件互连专业组(Peripheral Component Interconnect Special Interest Group,简称为:PCI SIG)制定了第一个PCI热插拔规范,其中,定义了支持热插拔所必需的平台、板卡和软件元素。PCI SIG推出了标准热插拔控制器规范(Standard Hot Swap Controller specification,简称为:SHPC SPEC),其中,明确了热插拔的标准使用模式和严格的寄存器组要求,并且允许操作系统提供商在平台特定的软件之外提供热插拔支持,逐步完成了热插拔标准制定工作,进入技术的全面推广阶段。2002年以后,英特尔(Intel)把热插拔作为一种天然属性赋予新推出的PCIE规范。First, a brief introduction to the development process of the PCIE specification. In 1997, the Peripheral Component Interconnect Special Interest Group (PCI SIG) developed the first PCI hot plug specification, which defines the platforms, boards, and boards necessary to support hot plugging. Software element. The PCI SIG introduces the Standard Hot Swap Controller specification (SHPC SPEC), which clarifies the standard use mode of hot swap and strict register set requirements, and allows operating system providers to Hot-plug support is provided in addition to platform-specific software, and the hot-swap standard-setting work is gradually completed, entering the comprehensive promotion phase of technology. Since 2002, Intel has given hot plugging as a natural attribute to the new PCIE specification.
针对背景技术中所述的PCIE热插拔系统需要硬件元素、固件元素和软件元素三方面的相互配合。现有的专利在硬件元素和固件元素上进行了改进,包括:专利申请号为CN201310400629,发明名称为《资源分配方法及系统》;专利申请号为CN201210094722,发明名称为《一种通过CPLD或FPGA实现PCIE设备热插拔的方法》。其中,CN201310400629针对固件元素中的资源分配策略进行了改进,CN201210094722针对硬件元素的实现方法进行了改进。然而,对于背景技术中提到的由于软件元素带来的问题,即在热拔出的处理过程中,由于可能出现已拔出外部设备的相关业务依然在运行的现象,而引起热插拔系统异常的问题,因此,如何避免热插拔系统出现异常成为目前亟需解决的技术问题。 The PCIE hot plug system described in the background art requires cooperation of three elements: hardware elements, firmware elements, and software elements. The existing patents have been improved on hardware elements and firmware elements, including: patent application number is CN201310400629, the invention name is "resource allocation method and system"; patent application number is CN201210094722, and the invention name is "a CPLD or FPGA" Method for implementing hot plugging of PCIE devices. Among them, CN201310400629 has improved the resource allocation strategy in the firmware element, and CN201210094722 has improved the implementation method of hardware elements. However, the problems caused by the software elements mentioned in the background art, that is, during the hot-pull processing, the hot-swapping system is caused by the phenomenon that the related services that have been pulled out of the external device are still running. Abnormal problems, therefore, how to avoid the abnormality of the hot-swap system has become an urgent technical problem.
下面通过具体的实施例对本发明的技术方案进行详细说明,本发明以下各实施例中的热拔出设备和热插入设备均为可以插入终端设备的槽位或从终端设备的槽位中拔出的外部设备,例如可以是网卡,硬盘或外置光驱(Optical Disk Driver,简称为:ODD)等,其可以是基于某一项技术领域,也可以是包含多项技术领域的内容。本发明提供以下几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present invention are described in detail in the following embodiments. The hot-extracting device and the hot-plugging device in the following embodiments of the present invention can be inserted into the slot of the terminal device or pulled out from the slot of the terminal device. The external device may be, for example, a network card, a hard disk or an external optical disk drive (ODD), which may be based on a certain technical field or may include a plurality of technical fields. The following specific embodiments of the present invention may be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.
图1为本发明实施例提供的一种设备热处理方法的流程图。本实施例提供的设备热处理方法适用于对热处理系统的外部设备进行热拔出的情况中,该方法可以由设备热处理装置执行,该设备热处理装置通过硬件和软件结合的方式来实现,该装置可以集成在终端设备的处理器中,供处理器调用使用。如图1所示,本实施例的方法可以包括:FIG. 1 is a flowchart of a method for heat treatment of a device according to an embodiment of the present invention. The device heat treatment method provided in this embodiment is applicable to the case where the external device of the heat treatment system is hot-extracted, and the method may be performed by a device heat treatment device, which is realized by a combination of hardware and software, and the device may be Integrated in the processor of the terminal device for use by the processor. As shown in FIG. 1, the method in this embodiment may include:
S110,获取第一事件信息和第一槽位信息,该第一事件信息为设备执行热拔出操作。S110: Acquire first event information and first slot information, where the first event information is a hot pull operation performed by the device.
本发明各实施例提供的设备热处理方法中,设备的热拔出操作或热插入操作是对应于某一终端设备的槽位执行的操作,在具体实现中,终端设备上可以设置有实体按钮,用户通过按压或弹出该按钮触发热插拔事件,终端设备可以对按钮的操作进行分析解析出当前按钮操作对应的事件类型,还可以通过预置的规则获知当前按钮操作对应的事件类型,该事件类型通常包括设备热插入或设备热拔出;例如,当用户控制该按钮为弹出状态时,获取到的第一事件信息为与该按钮对应槽位中的设备从该槽位中热拔出,同时,终端设备可以获取到当前热拔出操作的槽位信息,即可知当前的事件类型和相关的槽位信息。本实施例中用户对按钮进行操作后获取到的信息为:第一槽位中的设备执行热拔出操作。In the device heat treatment method provided by the embodiments of the present invention, the hot extraction operation or the hot insertion operation of the device is performed corresponding to the slot of a certain terminal device. In a specific implementation, the terminal device may be provided with a physical button. The user can trigger the hot plug event by pressing or popping the button, and the terminal device can analyze the operation of the button to parse out the event type corresponding to the current button operation, and can also learn the event type corresponding to the current button operation through the preset rule, the event. The type of the device is usually hot-plugged or hot-plugged. For example, when the user controls the button to be in the pop-up state, the first event information obtained is that the device in the slot corresponding to the button is hot-drawn from the slot. At the same time, the terminal device can obtain the slot information of the current hot-out operation, and the current event type and related slot information can be known. The information obtained after the user operates the button in this embodiment is: the device in the first slot performs a hot pull operation.
S120,根据第一事件信息和第一槽位信息获取设备信息,该设备信息包括热拔出设备的设备功能。S120. Acquire device information according to the first event information and the first slot information, where the device information includes a device function of the hot-pull device.
在实施例中,对于已获取的热拔出事件信息,可以进一步根据第一槽位信息解析出第一槽位中已拔出设备的设备功能,该设备功能通常与设备类型对应,例如,若设备为网卡,其设备功能为提供无线网络连接;若设备为硬盘,其设备功能为提供与外部设备的数据交互;若设备为ODD,其设备功能为提供与数字通用光盘(Digital Versatile Disc,简称为:DVD)的数据交互。In an embodiment, the device function of the extracted device in the first slot is further parsed according to the first slot information, and the device function generally corresponds to the device type, for example, if The device is a network card, and its device function is to provide a wireless network connection; if the device is a hard disk, the device function is to provide data interaction with the external device; if the device is an ODD, the device function is to provide a digital Versatile Disc (Digital Versatile Disc) For: DVD) data interaction.
需要说明的是,本发明各实施例中的槽位与热插入设备或热拔出设备为一一对应的关系,即一个槽位中仅能插入一个设备;另外,本实施例并不限制每个设备的设备功能,其可以是单一功能的设备,也可以是具有多个功能的设备,该每个设备的设备功能例如与设备中具有的芯片数量相关。It should be noted that the slots in the embodiments of the present invention have a one-to-one correspondence with the hot insertion device or the hot extraction device, that is, only one device can be inserted into one slot; in addition, the embodiment does not limit each The device function of a device, which may be a single-function device, or a device with multiple functions, such as the device function of the device, for example, related to the number of chips in the device.
S130,根据设备功能调用热拔出设备的业务接口,并根据所述第一事件信息停止该业务接口上运行的业务。 S130. The service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information.
本实施例提供的设备热处理方法的目的在于解决热插拔系统异常的问题,即在执行设备热拔出操作后,可以停止已拔出设备的相应业务,以保持热插拔系统中外部设备和运行程序的一致性;在具体实现中,终端设备可以根据热拔出设备的设备功能,调用与该设备功能相关的业务接口,即已拔出设备的业务接口,并且由于已知第一事件信息为热拔出事件,则可以停止所调用业务接口上运行的业务。显然地,本实施例提供的方法,可以有效的避免热拔出操作过程中,由于已拔出设备的相关业务依然在运行而引起的系统异常,是一种较为安全的热处理方式,并且该方法可以由软件控制实现,便于用户进行操作。The purpose of the heat treatment method of the device provided in this embodiment is to solve the problem of the abnormality of the hot plug system, that is, after the hot pull operation of the device is performed, the corresponding service of the extracted device can be stopped to maintain the external device in the hot plug system. The consistency of the running program; in a specific implementation, the terminal device can invoke the service interface related to the function of the device according to the device function of the hot-plugging device, that is, the service interface of the device has been pulled out, and the first event information is known because To hot-plug an event, you can stop the business running on the invoked business interface. Obviously, the method provided in this embodiment can effectively avoid the system abnormality caused by the operation of the device being pulled out during the hot extraction operation, which is a relatively safe heat treatment mode, and the method is It can be implemented by software control, which is convenient for users to operate.
本实施例所提供的设备热处理方法,通过对设备的热拔出操作获取第一事件信息和第一槽位信息后,根据该第一事件信息和第一槽位信息获取热拔出设备的设备功能,从而通过该设备功能调用所述热拔出设备的业务接口,并根据第一事件信息停止已调用业务接口上运行的业务;本实施例提供的设备热处理方法,在执行设备热拔出操作时,实现了已拔出设备与系统中相关业务的一致性,从而解决了通过现有技术进行热拔出操作的处理过程中,由于可能出现已拔出外部设备的相关业务依然在运行的现象,而引起热插拔系统异常的问题。After the first event information and the first slot information are obtained by the hot extraction operation of the device, the device for obtaining the hot extraction device is obtained according to the first event information and the first slot information. The function, so that the service interface of the hot-pull device is invoked by the device function, and the service running on the service interface is stopped according to the first event information; the device heat treatment method provided in this embodiment performs the device hot extraction operation When the unplugged device is consistent with the related services in the system, the process of hot-extracting operations through the existing technology is solved, and the related services that have been pulled out of the external device may still be running. , causing an abnormality in the hot swap system.
进一步地,本实施例提供的设备热处理方法,在停止业务接口上运行的业务之后,即在S130之后,还包括:S140,根据设备功能清理与热拔出设备相关的配置信息。在本实施例中,设备已拔出,并且停止了已拔出设备的相关业务,然而,上述停止的业务在正常运行时通常需要进行业务配置,即终端设备中存储有已停止业务的配置信息,此时,可以进一步清理与热拔出设备相关的配置信息,从而释放终端设备的存储资源,同时提高终端设备的使用性能。Further, the device heat treatment method provided in this embodiment, after stopping the service running on the service interface, that is, after S130, further includes: S140, and clearing configuration information related to the hot-pull device according to the device function. In this embodiment, the device has been pulled out, and the related service of the device has been disconnected. However, the service that is stopped normally needs to be configured during normal operation, that is, the configuration information of the stopped service is stored in the terminal device. At this time, the configuration information related to the hot-plugged device can be further cleaned, thereby releasing the storage resources of the terminal device and improving the use performance of the terminal device.
本实施例在具体实现中,终端设备通常可以根据设备功能向每个与热拔出设备相关的业务进程分发消息,由收到消息的业务进程完成对于设备功能相关的业务处理,例如上述清楚配置信息的处理,还可以为主备机切换等业务处理。In a specific implementation, the terminal device can generally distribute a message to each service process related to the hot-pull device according to the device function, and complete the service processing related to the device function by the service process of receiving the message, for example, the above clear configuration. The processing of information can also be handled by the main standby machine.
可选地,图2为本发明实施例提供的另一种设备热处理方法的流程图。本实施例中的设备信息还包括第一槽位信息对应的N个PCIE,并且热拔出设备中可以具有N个芯片,相应地,设备功能包括每个芯片的芯片功能,N个芯片与N个PCIE为一一对应的关系,其中,N为大于1的整数,本发明各实施例在槽位对应的PCIE为多个,以及设备具有多个芯片的情况下,具体以N为2为例予以说明。Optionally, FIG. 2 is a flowchart of another method for heat treatment of a device according to an embodiment of the present invention. The device information in this embodiment further includes N PCIEs corresponding to the first slot information, and the hot extraction device may have N chips. Correspondingly, the device functions include chip functions of each chip, and N chips and N The PCIE is a one-to-one correspondence, where N is an integer greater than 1. In the embodiment of the present invention, when the number of PCIEs corresponding to the slot is multiple, and the device has multiple chips, the specific example is N is 2. Explain.
本实施例在上述图1所示方法的基础上,S130可以替换为:根据每个PCIE对应芯片的芯片功能调用每个芯片的业务接口,并根据第一事件信息停止所调用业务接口上运行的业务;相应地,S140可以替换为:根据每个PCIE对应芯片的芯片功能,清理与每个芯片相关的配置信息。需要说明的是,本实施例在具体实现中,可以依次停止与每个芯片相关的业务,并依次清理与每个芯片相关的配置信息,也可以同时执行上述操作。 In this embodiment, based on the method shown in FIG. 1 , S130 may be replaced by: calling a service interface of each chip according to a chip function of each PCIE corresponding chip, and stopping running on the invoked service interface according to the first event information. Service; accordingly, the S140 can be replaced with: cleaning the configuration information associated with each chip according to the chip function of each PCIE corresponding chip. It should be noted that, in the specific implementation, the services related to each chip may be sequentially stopped, and the configuration information related to each chip may be sequentially cleaned, or the foregoing operations may be simultaneously performed.
进一步地,本发明上述实施例提供的方法在S130之后,还包括:S150,根据第一槽位信息和设备功能卸载与热拔出设备相关的驱动程序,并释放热拔出设备占用的系统资源。在本实施例中,由于设备已拔出,即与已拔出设备对应的驱动程序为系统中的空闲驱动程序,则可以通过卸载驱动程序来进一步提高终端设备的系统性能,同时可以释放已拔出设备所占用的系统资源,例如释放该设备占用CPU的地址资源,即输入输出(Input/Output,简称为:IO)MEM。Further, the method provided by the foregoing embodiment of the present invention, after S130, further includes: S150, uninstalling a driver related to the hot-pull device according to the first slot information and the device function, and releasing the system resource occupied by the hot-pull device . In this embodiment, since the device is unplugged, that is, the driver corresponding to the extracted device is an idle driver in the system, the system performance of the terminal device can be further improved by uninstalling the driver, and the released device can be released at the same time. The system resources occupied by the device, for example, release the address resource occupied by the device, that is, input/output (abbreviation: IO) MEM.
本实施例在具体实现中,无论热拔出设备中具有几个芯片,由于需要卸载与热拔出设备中所有芯片相关的驱动程序,并且由于热拔出设备中的芯片与第一槽位信息中的PCIE为一一对应的关系,即可以将第一槽位信息转换为与热拔出设备中芯片一一对应的PCIE,从而通过遍历所有转换得到的PCIE来卸载驱动程序和释放系统资源。另外,本发明上述各实施例在执行上述各操作步骤后,还可以对第一槽位下电,并且在终端设备的图形用户界面(Graphical User Interface,简称为:GUI)上显示处理结果。In this implementation, in the specific implementation, regardless of the number of chips in the hot-pull device, the driver related to all the chips in the hot-pull device needs to be unloaded, and the chip and the first slot information in the device are hot-extracted. The PCIE has a one-to-one correspondence, that is, the first slot information can be converted into a PCIE corresponding to the chip in the hot-plugging device, thereby unloading the driver and releasing system resources by traversing all converted PCIEs. In addition, after performing the foregoing various operation steps, the foregoing embodiments of the present invention can also power off the first slot and display the processing result on a graphical user interface (GUI) of the terminal device.
需要说明的是,本实施例中的S150为停止业务后的进一步处理方案,有利于提高热处理方法的方案完整性,S150可以是在S130之后执行的,也可以是在S140之后执行的;另外,当热拔出设备中具有多个芯片时,可以针对每个芯片依次执行S130~S150,也可以对所有芯片同时执行S130~S150,还可以设置为其它的执行过程。It should be noted that S150 in this embodiment is a further processing solution after the service is stopped, which is beneficial to improving the solution integrity of the heat treatment method. S150 may be performed after S130, or may be performed after S140; When there are multiple chips in the hot-pull device, S130-S150 may be sequentially executed for each chip, or S130-S150 may be simultaneously executed for all chips, and other execution processes may be set.
上述各实施例均为针对热拔出事件进行软件元素上的改进,为了保证热处理方案的完整性,并完善对热插入设备中具有一个以上芯片的处理方式,本发明在上述各实施例的基础中,提供针对热插入事件的具体实现方式。具体地,图3为本发明实施例提供的又一种设备热处理方法的流程图,本实施例提供的方法还包括:Each of the above embodiments is an improvement on the software element for the hot pull event. In order to ensure the integrity of the heat treatment scheme and to improve the processing manner of having more than one chip in the hot plug device, the present invention is based on the above embodiments. A specific implementation for hot insertion events is provided. Specifically, FIG. 3 is a flowchart of still another method for heat treatment of a device according to an embodiment of the present invention. The method provided in this embodiment further includes:
S210,获取第二事件信息和第二槽位信息,该第二事件信息为设备执行热插入操作,其中,热插入设备中具有至少一个芯片。S210. Acquire second event information and second slot information, where the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip.
本实施例中的S210的具体实现方式可以参照上述实施例中的S110,并且终端设备同样可以通过用户对实体按钮的操作获取第二事件信息,例如本实施例中的用户控制该按钮为按压状态时,获取到的第二事件信息为设备热插入与该按钮对应槽位,同时,终端设备可以获取到当前热插入操作的槽位信息,即可知当前的事件类型和相关的槽位信息。本实施例中用户对按钮进行操作后获取到的信息为:设备执行热插入第二槽位中的操作,此时还可以对槽位加电。需要说明的是,与上述实施例相同,本实施例中的执行热插入操作的设备中的芯片可以是一个或多个。For the specific implementation of the S210 in this embodiment, refer to the S110 in the foregoing embodiment, and the terminal device can also obtain the second event information by using the operation of the physical button by the user. For example, the user in the embodiment controls the button to be in the pressed state. The second event information obtained is that the device is hot-inserted in the slot corresponding to the button, and the terminal device can obtain the slot information of the current hot-plug operation, and the current event type and related slot information can be known. The information obtained after the user operates the button in this embodiment is: the device performs hot insertion into the second slot, and the slot can also be powered. It should be noted that, as in the above embodiment, the chips in the device performing the hot insertion operation in this embodiment may be one or more.
S220,获取热插入设备中每个芯片的芯片功能和第二槽位信息对应的全部PCIE,并确定全部PCIE与热插入设备中芯片的对应关系,其中,PCIE与芯片为一一对应的关系。S220, obtaining the chip function of each chip in the hot plugging device and all the PCIEs corresponding to the second slot information, and determining the correspondence between all the PCIEs and the chips in the hot plugging device, wherein the PCIE and the chip have a one-to-one correspondence.
本实施例以热插入设备具有至少两个芯片为例予以说明,槽位与热插入设备为一一对应的,热插入设备中的芯片与第二槽位中的PCIE为一一对应的,本实施例同样 通过与第二槽位信息对应的PCIE遍历热插入设备的每个芯片,因此,在对热插入设备进行相应的业务处理之前,需要确定PCIE与芯片的对应关系。In this embodiment, the hot plug device has at least two chips as an example. The slot is in one-to-one correspondence with the hot plug device, and the chip in the hot plug device has a one-to-one correspondence with the PCIE in the second slot. The same is true for the embodiment The PCIE traverses each chip of the hot-plug device through the PCIE corresponding to the second slot information. Therefore, before performing corresponding service processing on the hot-plug device, it is necessary to determine the correspondence between the PCIE and the chip.
举例来说,热插入设备中具有两个芯片,分别为芯片A和芯片B,该设备插入的槽位中也有两个PCIE端口,PCIE端口A和PCIE端口B,此时,可以确定出芯片与PCIE端口的对应关系为:芯片A链接PCIE端口A,芯片B链接PCIE端口B。For example, the hot plug device has two chips, namely chip A and chip B. The slot inserted in the device also has two PCIE ports, PCIE port A and PCIE port B. At this time, the chip and the chip can be determined. The correspondence between PCIE ports is: chip A links PCIE port A, and chip B links PCIE port B.
S230,根据所确定的对应关系为每个PCIE对应的芯片分配系统资源和加载驱动。S230. Allocate system resources and load drivers for each chip corresponding to the PCIE according to the determined correspondence.
S240,根据第二事件信息更新与每个芯片相关的资源信息和配置信息。S240. Update resource information and configuration information related to each chip according to the second event information.
S250,根据所获取的第二事件信息和芯片功能启动与每个芯片相关的业务功能。S250. Start a service function related to each chip according to the acquired second event information and the chip function.
需要说明的是,本实施例在确定了热插入设备中芯片与插入槽位汇总PCIE的对应关系后,同样可以通过遍历每个PCIE端口执行对每个芯片的处理,即S230~S250中的处理内容;例如可以依次对每个芯片执行S230~S250,也可以对全部芯片同时执行S230~S250,只要是可以实现对热插入设备中每个芯片都执行上述操作间即可。It should be noted that, after determining the correspondence between the chip and the inserted slot aggregation PCIE in the hot insertion device, the processing of each chip can be performed by traversing each PCIE port, that is, the processing in S230 to S250. For example, S230 to S250 may be sequentially performed for each chip, or S230 to S250 may be simultaneously performed for all chips, as long as the above operation can be performed for each chip in the hot insertion device.
还需要说明的是,本实施例中热插入设备可以是上述图1和图2所示各实施例中热拔出的设备,也可以是不同的外接设备,并且在执行本实施例提供的方法后,还可以进一步对该设备执行热拔出;并且本实施例中的S210~S250与上述各实施例中的S110~S150没有明确的先后顺序,可以是对同一槽位在不同时间段执行的,也可以是对不同槽位在同一时间段执行的,因此,图3中仅示出热插入的执行步骤S210~S250,在S210之前可能执行S110~S150,在S250之后也可能执行S110~S150。It should be noted that the hot-plugging device in this embodiment may be a device that is hot-extracted in the embodiments shown in FIG. 1 and FIG. 2, or may be a different external device, and the method provided in this embodiment is performed. After the hot swapping is performed on the device, the S110-S250 in the embodiment and the S110-S150 in the foregoing embodiments have no clear sequence, and the same slot can be executed in different time segments. It is also possible to perform different slots in the same time period. Therefore, only the execution steps S210 to S250 of hot insertion are shown in FIG. 3, S110 to S150 may be performed before S210, and S110 to S150 may be performed after S250. .
图4为本发明实施例提供的一种设备热处理装置的结构示意图。本实施例提供的设备热处理装置适用于对热处理系统的外部设备进行热拔出的情况中,该设备热处理装置可以通过硬件和软件结合的方式来实现,该装置可以集成在终端设备的处理器中,供处理器调用使用。如图4所示,本实施例提供的隧道流量控制装置具体包括:热处理模块11、预处理模块12和业务管理模块13。FIG. 4 is a schematic structural diagram of a heat treatment device for a device according to an embodiment of the present invention. In the case where the device heat treatment device provided in this embodiment is suitable for hot extraction of the external device of the heat treatment system, the device heat treatment device can be implemented by a combination of hardware and software, and the device can be integrated into the processor of the terminal device. For use by the processor. As shown in FIG. 4, the tunnel flow control device provided in this embodiment specifically includes: a heat treatment module 11, a preprocessing module 12, and a service management module 13.
其中,热处理模块11,设置为获取第一事件信息和第一槽位信息,该第一事件信息为设备执行热拔出操作。The heat treatment module 11 is configured to acquire the first event information and the first slot information, where the first event information is a hot pull operation performed by the device.
本发明实施例提供的设备热处理装置中,设备的热拔出操作或热插入操作是对应于某一终端设备的槽位执行的操作,同样可以通过终端设备上设置的实体按钮的状态改变来识别热拔出或热插入事件,具体实现方式与上述实施例中相同,故在此不再赘述。该模块还用于完成对槽位的上下电。In the device heat treatment apparatus provided by the embodiment of the present invention, the hot extraction operation or the hot insertion operation of the device is an operation performed corresponding to a slot of a certain terminal device, and can also be identified by a state change of a physical button set on the terminal device. The hot-extraction or hot-insertion event is the same as that in the above embodiment, and therefore will not be described here. The module is also used to power on and off the slot.
预处理模块12,设置为根据热处理模块11获取的第一事件信息和第一槽位信息获取设备信息,该设备信息包括热拔出设备的设备功能。The pre-processing module 12 is configured to acquire device information according to the first event information acquired by the heat treatment module 11 and the first slot information, where the device information includes a device function of the hot-pull device.
本实施例在具体实现中,预处理模块12可以接收热处理模块11发送热拔出请求,该热拔出请求中携带有上述第一事件信息和第一槽位信息,从而解析出热拔出设备的功能类型。In a specific implementation, the pre-processing module 12 can receive the hot-pull-out request, and the hot-extraction request carries the first event information and the first slot information, thereby parsing the hot-pull device. The type of function.
需要说明的是,本发明各实施例中的槽位与热插入设备或热拔出设备为一一对应 的关系,即一个槽位中仅能插入一个设备;另外,本实施例并不限制每个设备的设备功能,其可以是单一功能的设备,也可以是具有多个功能的设备,该每个设备的设备功能例如与设备中具有的芯片数量相关。It should be noted that the slots in the embodiments of the present invention are in one-to-one correspondence with the hot insertion device or the hot extraction device. Relationship, that is, only one device can be inserted in one slot; in addition, this embodiment does not limit the device function of each device, and may be a single-function device or a device having multiple functions, each of which The device function of the device is for example related to the number of chips in the device.
业务管理模块13,设置为根据预处理模块12获取的设备功能调用热拔出设备的业务接口,并根据热处理模块11获取的第一事件信息停止业务接口上运行的业务。The service management module 13 is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module 12, and stop the service running on the service interface according to the first event information obtained by the heat treatment module 11.
本发明实施例提供的设备热处理装置,可以根据热拔出设备的设备功能,调用与该设备功能相关的业务接口,即已拔出设备的业务接口,并且由于已知第一事件信息为热拔出事件,则可以停止所调用业务接口上运行的业务。The device heat treatment device according to the embodiment of the present invention can invoke a service interface related to the function of the device according to the device function of the hot-pull device, that is, the service interface of the device has been pulled out, and the first event information is known as hot-plugging. When an event occurs, the business running on the invoked business interface can be stopped.
进一步地,本实施例中的业务管理模块13,还设置为在停止业务接口上运行的业务之后,根据设备功能清理与热拔出设备相关的配置信息。该模块通过清理与热拔出设备相关的配置信息,实现了释放终端设备的存储资源的效果,同时提高终端设备的使用性能。Further, the service management module 13 in this embodiment is further configured to: after stopping the service running on the service interface, clear the configuration information related to the hot-pull device according to the device function. By clearing the configuration information related to the hot-plugged device, the module achieves the effect of releasing the storage resources of the terminal device and improving the performance of the terminal device.
本发明实施例提供的设备热处理装置用于执行本发明图1所示实施例提供的设备热处理方法,具备相应的功能模块,其实现原理和技术效果类似,此处不再赘述。The device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 1 of the present invention, and has a corresponding functional module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
可选地,本实施例提供的设备热处理装置中,预处理模块12获取的设备信息还包括第一槽位信息对应的N个PCIE,并且热拔出设备中具有N个芯片,相应地,设备功能包括每个芯片的芯片功能,N个芯片与N个PCIE为一一对应的关系,其中,N为大于1的整数,本发明各实施例在槽位对应的PCIE为多个,以及设备具有多个芯片的情况下,具体以N为2为例予以说明。Optionally, in the device heat treatment device provided by the embodiment, the device information acquired by the preprocessing module 12 further includes N PCIEs corresponding to the first slot information, and the hot extraction device has N chips, and correspondingly, the device The function includes a chip function of each chip, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1. In each embodiment of the present invention, the number of PCIEs corresponding to the slots is multiple, and the device has In the case of a plurality of chips, a specific example of N is 2 will be described.
本实施例的具体实现方式为:上述图4所示实施例中的业务管理模块13,设置为根据预处理模块12获取的设备功能调用热拔出设备的业务接口,并根据热处理模块11获取的第一事件信息停止业务接口上运行的业务,是指:根据每个PCIE对应芯片的芯片功能调用每个芯片的业务接口,并根据第一事件信息停止所调用业务接口上运行的业务;相应地,在停止业务接口上运行的业务之后,业务管理模块13,具体设置为清理与每个芯片相关的配置信息。The specific implementation of the embodiment is as follows: the service management module 13 in the embodiment shown in FIG. 4 is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module 12, and obtain the service interface according to the heat treatment module 11. The first event information stops the service running on the service interface, which means: calling the service interface of each chip according to the chip function of each PCIE corresponding chip, and stopping the service running on the invoked service interface according to the first event information; After the service running on the service interface is stopped, the service management module 13 is specifically configured to clean configuration information related to each chip.
进一步地,本发明上述实施例提供的装置中,业务管理模块13,还设置为在停止业务接口上运行的业务之后,根据热处理模块11获取第一槽位信息和预处理模块12获取的设备功能卸载与热拔出设备相关的驱动程序,并释放热拔出设备占用的系统资源。Further, in the device provided by the foregoing embodiment of the present invention, the service management module 13 is further configured to acquire the first slot information and the device function acquired by the pre-processing module 12 according to the heat treatment module 11 after the service running on the service interface is stopped. Uninstall the drivers associated with the hot-plugged device and release the system resources occupied by the hot-plugged device.
本发明实施例提供的设备热处理装置用于执行本发明图2所示实施例提供的设备热处理方法,具备相应的功能模块,其实现原理和技术效果类似,此处不再赘述。The device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 2 of the present invention, and has a corresponding function module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
上述各实施例均为针对热拔出事件进行软件元素上的改进,为了保证热处理方案的完整性,并完善对热插入设备中具有一个以上芯片的处理方式,本发明在上述各实施例的基础中,提供针对热插入事件的具体实现方式。Each of the above embodiments is an improvement on the software element for the hot pull event. In order to ensure the integrity of the heat treatment scheme and to improve the processing manner of having more than one chip in the hot plug device, the present invention is based on the above embodiments. A specific implementation for hot insertion events is provided.
同样可以通过上述图4所示设备热处理装置的各功能模块实现,具体地,热处理 模块11,还设置为获取第二事件信息和第二槽位信息,该第二事件信息为设备执行热插操作,其中,热插入设备中具有至少一个芯片。本实施例中的第二事件信息为:设备执行热插入第二槽位中的操作,此时还可以对槽位加电。需要说明的是,与上述实施例相同,本实施例中的执行热插入操作的设备中的芯片可以是一个或多个。The same can be achieved by the various functional modules of the device heat treatment device shown in FIG. 4 above, specifically, heat treatment. The module 11 is further configured to acquire the second event information and the second slot information, the second event information is a hot plug operation performed by the device, wherein the hot plug device has at least one chip. The second event information in this embodiment is that the device performs hot insertion into the second slot, and the slot can also be powered. It should be noted that, as in the above embodiment, the chips in the device performing the hot insertion operation in this embodiment may be one or more.
预处理模块12,还设置为获取热插入设备中每个芯片的芯片功能和第二槽位信息对应的全部PCIE,并确定全部PCIE与热插入设备中芯片的对应关系,其中,PCIE与芯片为一一对应的关系。The pre-processing module 12 is further configured to obtain a chip function of each chip in the hot-plug device and all PCIEs corresponding to the second slot information, and determine a correspondence between all PCIEs and chips in the hot-plug device, wherein the PCIE and the chip are One-to-one correspondence.
与上述各实施例相同的,本实施例中的槽位与热插入设备为一一对应的,热插入设备中的芯片与第二槽位中的PCIE为一一对应的。In the same manner as the above embodiments, the slots in the embodiment are in one-to-one correspondence with the hot-plug devices, and the chips in the hot-plug device have a one-to-one correspondence with the PCIEs in the second slot.
热处理模块11,还设置为根据预处理模块12确定的对应关系为每个PCIE对应的芯片分配系统资源和加载驱动。The heat treatment module 11 is further configured to allocate system resources and load drivers for the chips corresponding to each PCIE according to the correspondence determined by the pre-processing module 12.
在本实施例中,预处理模块12在确定了对应关系后,可以将每个PCIE端口信息传递给热处理模块11,由热处理模块11为芯片分配系统资源和加载驱动。In this embodiment, after determining the correspondence, the pre-processing module 12 can transmit each PCIE port information to the heat treatment module 11, and the heat treatment module 11 allocates system resources and load drivers for the chip.
预处理模块12,还设置为根据热处理模块11获取的第二事件信息更新与每个芯片相关的资源信息和配置信息。The pre-processing module 12 is further configured to update resource information and configuration information related to each chip according to the second event information acquired by the heat treatment module 11.
业务管理模块13,还设置为根据热处理模块11获取的第二事件信息和预处理模块12获取的芯片功能启动与每个芯片相关的业务功能。The service management module 13 is further configured to start a service function related to each chip according to the second event information acquired by the heat processing module 11 and the chip function acquired by the preprocessing module 12.
需要说明的是,本实施例在确定了热插入设备中芯片与插入槽位汇总PCIE的对应关系后,同样可以通过遍历每个PCIE端口执行对每个芯片的处理,即执行上述与热插入相关的处理内容;例如可以依次对每个芯片执行上述处理方式,也可以对全部芯片同时执行上述处理方式,只要是可以实现对热插入设备中每个芯片都执行上述操作间即可。It should be noted that, after determining the correspondence between the chip and the inserted slot aggregation PCIE in the hot insertion device, the processing of each chip can also be performed by traversing each PCIE port, that is, performing the above-mentioned hot insertion correlation. For example, the above processing manner may be performed for each chip in turn, or the above processing manner may be simultaneously performed for all the chips, as long as the above operation can be performed for each chip in the hot insertion device.
还需要说明的是,本实施例中热插入设备可以是上述实施例中热拔出的设备,也可以是不同的外接设备,并且在执行本实施例提供的方法后,还可以进一步对该设备执行热拔出。It should be noted that, in this embodiment, the hot-plugging device may be a device that is hot-extracted in the above embodiment, or may be a different external device, and after performing the method provided in this embodiment, the device may be further Perform a hot pull.
本发明实施例提供的设备热处理装置用于执行本发明图3所示实施例提供的设备热处理方法,具备相应的功能模块,其实现原理和技术效果类似,此处不再赘述。The device heat treatment device provided by the embodiment of the present invention is used to perform the heat treatment method of the device provided by the embodiment shown in FIG. 3 of the present invention, and has a corresponding functional module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
上述热处理模块、预处理模块、业务管理模块等模块可包括硬件组件、软件模块或硬件与软件的结合。同一单元可能由同一硬件/软件实现,也可能由不同硬件/软件结合实现。上述模块或单元可均位于同一硬件结构;或者,上述模块或单元分别位于多个不同的硬件结构中,可通过通信连接进行交互。虽然本发明所揭露的实施方式如上,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。 The above-mentioned heat treatment module, pre-processing module, business management module and the like may include hardware components, software modules or a combination of hardware and software. The same unit may be implemented by the same hardware/software or by a combination of different hardware/software. The above modules or units may all be located in the same hardware structure; or, the above modules or units are respectively located in a plurality of different hardware structures, and may interact through a communication connection. While the embodiments of the present invention have been described above, the described embodiments are merely for the purpose of understanding the invention and are not intended to limit the invention. Any modification and variation in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention. The scope defined by the appended claims shall prevail.
工业实用性Industrial applicability
本发明涉及硬件设备的热拔出和热插入技术领域,用以实现在执行设备热拔出操作时已拔出设备与系统中相关业务的一致性,从而解决通过现有技术进行热拔出操作的处理过程中由于可能出现已拔出外部设备的相关业务依然在运行而引起热插拔系统异常的问题。 The present invention relates to the field of hot-extraction and hot-plugging of hardware devices, which is used to implement the hot-extraction operation of the related services in the system when the device is hot-extracted. In the process of processing, the hot-swapping system is abnormal due to the fact that the related services that have been pulled out of the external device are still running.

Claims (10)

  1. 一种设备热处理方法,包括:A method of heat treatment of a device, comprising:
    获取第一事件信息和第一槽位信息,所述第一事件信息为设备执行热拔出操作;Acquiring the first event information and the first slot information, where the first event information is a hot pull operation performed by the device;
    根据所述第一事件信息和所述第一槽位信息获取设备信息,所述设备信息包括热拔出设备的设备功能;Obtaining device information according to the first event information and the first slot information, where the device information includes a device function of the hot extraction device;
    根据所述设备功能调用所述热拔出设备的业务接口,并根据所述第一事件信息停止所述业务接口上运行的业务。The service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information.
  2. 根据权利要求1所述的设备热处理方法,其中,所述停止所述业务接口上运行的业务之后,还包括:The device heat treatment method according to claim 1, wherein after the stopping the service running on the service interface, the method further comprises:
    根据所述设备功能清理与所述热拔出设备相关的配置信息。The configuration information related to the hot-pull device is cleaned according to the device function.
  3. 根据权利要求1所述的设备热处理方法,其中,所述设备信息还包括所述第一槽位信息对应的N个总线接口PCIE,所述热拔出设备中具有N个芯片,所述设备功能包括每个所述芯片的芯片功能,所述N个芯片与所述N个PCIE为一一对应的关系,其中,N为大于1的整数;The device heat treatment method according to claim 1, wherein the device information further comprises N bus interfaces PCIE corresponding to the first slot information, and the hot extraction device has N chips, the device function Including a chip function of each of the chips, the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
    所述根据所述设备功能调用所述热拔出设备的业务接口,并根据所述第一事件信息停止所述业务接口上运行的业务,包括:The service interface of the hot-pull device is invoked according to the device function, and the service running on the service interface is stopped according to the first event information, including:
    根据每个所述PCIE对应芯片的芯片功能调用每个所述芯片的业务接口,并根据所述第一事件信息停止所调用业务接口上运行的业务;Calling a service interface of each of the chips according to a chip function of each of the PCIE corresponding chips, and stopping a service running on the invoked service interface according to the first event information;
    所述停止所述业务接口上运行的业务之后,包括:After the stopping the service running on the service interface, the method includes:
    根据每个所述PCIE对应芯片的芯片功能,清理与每个所述芯片相关的配置信息。The configuration information associated with each of the chips is cleaned according to the chip function of each of the PCIE-compatible chips.
  4. 根据权利要求1~3中任一项所述的设备热处理方法,其中,所述停止所述业务接口上运行的业务之后,还包括:The device heat treatment method according to any one of claims 1 to 3, wherein after the stopping the service running on the service interface, the method further comprises:
    根据所述第一槽位信息和所述设备功能卸载与所述热拔出设备相关的驱动程序,并释放所述热拔出设备占用的系统资源。And uninstalling, according to the first slot information and the device function, a driver related to the hot-pull device, and releasing system resources occupied by the hot-pull device.
  5. 根据权利要求1~3中任一项所述的设备热处理方法,其中,还包括:The heat treatment method for a device according to any one of claims 1 to 3, further comprising:
    获取第二事件信息和第二槽位信息,所述第二事件信息为设备执行热插入操作,其中,热插入设备中具有至少一个芯片;Acquiring the second event information and the second slot information, where the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
    获取所述热插入设备中每个芯片的芯片功能和所述第二槽位信息对应的全部PCIE,并确定所述全部PCIE与所述热插入设备中芯片的对应关系,其中,所述PCIE与所述芯片为一一对应的关系;Obtaining a chip function of each chip in the hot plug device and all PCIEs corresponding to the second slot information, and determining a correspondence between the entire PCIE and a chip in the hot plug device, where the PCIE and the PCIE The chips have a one-to-one correspondence;
    根据所确定的对应关系为每个所述PCIE对应的芯片分配系统资源和加载驱动;Allocating system resources and loading drivers for each chip corresponding to the PCIE according to the determined correspondence relationship;
    根据所述第二事件信息更新与每个所述芯片相关的资源信息和配置信息;Updating resource information and configuration information related to each of the chips according to the second event information;
    根据所获取的第二事件信息和芯片功能启动与每个所述芯片相关的业务功能。A business function associated with each of the chips is initiated based on the acquired second event information and chip functionality.
  6. 一种设备热处理装置,包括: A device heat treatment device comprising:
    热处理模块,设置为获取第一事件信息和第一槽位信息,所述第一事件信息为设备执行热拔出操作;a heat treatment module, configured to acquire first event information and first slot information, where the first event information is a hot pull operation performed by the device;
    预处理模块,设置为根据所述热处理模块获取的第一事件信息和第一槽位信息获取设备信息,所述设备信息包括热拔出设备的设备功能;a pre-processing module, configured to acquire device information according to the first event information acquired by the heat treatment module and the first slot information, where the device information includes a device function of the hot-pull device;
    业务管理模块,设置为根据所述预处理模块获取的设备功能调用所述热拔出设备的业务接口,并根据所述热处理模块获取的第一事件信息停止所述业务接口上运行的业务。The service management module is configured to invoke the service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information obtained by the heat treatment module.
  7. 根据权利要求6所述的设备热处理装置,其中,所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据所述设备功能清理与所述热拔出设备相关的配置信息。The device heat treatment apparatus according to claim 6, wherein the service management module is further configured to: after stopping the service running on the service interface, clear the configuration related to the hot-pull device according to the device function information.
  8. 根据权利要求6所述的设备热处理装置,其中,所述预处理模块获取的设备信息还包括所述第一槽位信息对应的N个总线接口PCIE,所述热拔出设备中具有N个芯片,所述设备功能包括每个所述芯片的芯片功能,所述N个芯片与所述N个PCIE为一一对应的关系,其中,N为大于1的整数;The device heat treatment apparatus according to claim 6, wherein the device information acquired by the preprocessing module further comprises N bus interfaces PCIE corresponding to the first slot information, and the hot extraction device has N chips. The device function includes a chip function of each of the chips, and the N chips have a one-to-one correspondence with the N PCIEs, where N is an integer greater than 1;
    所述业务管理模块,设置为根据所述预处理模块获取的设备功能调用所述热拔出设备的业务接口,并根据所述热处理模块获取的第一事件信息停止所述业务接口上运行的业务,是指:根据每个所述PCIE对应芯片的芯片功能调用每个所述芯片的业务接口,并根据所述第一事件信息停止所调用业务接口上运行的业务;The service management module is configured to invoke a service interface of the hot-pull device according to the device function acquired by the pre-processing module, and stop the service running on the service interface according to the first event information acquired by the heat treatment module. And means: calling a service interface of each of the chips according to a chip function of each of the PCIE corresponding chips, and stopping a service running on the invoked service interface according to the first event information;
    所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据每个所述PCIE对应芯片的芯片功能,清理与每个所述芯片相关的配置信息。The service management module is further configured to: after stopping the service running on the service interface, clear configuration information related to each of the chips according to a chip function of each PCIE corresponding chip.
  9. 根据权利要求6~8中任一项所述的设备热处理装置,其中,所述业务管理模块,还设置为在停止所述业务接口上运行的业务之后,根据所述热处理模块获取的第一槽位信息和所述业务管理模块获取的设备功能卸载与所述热拔出设备相关的驱动程序,并释放所述热拔出设备占用的系统资源。The device heat treatment apparatus according to any one of claims 6 to 8, wherein the service management module is further configured to: after stopping the service running on the service interface, the first slot acquired according to the heat treatment module The bit information and the device function acquired by the service management module uninstall the driver related to the hot-plug device, and release the system resources occupied by the hot-plug device.
  10. 根据权利要求6~8中任一项所述的设备热处理装置,其中,还包括:The apparatus heat treatment apparatus according to any one of claims 6 to 8, further comprising:
    所述热处理模块,还设置为获取第二事件信息和第二槽位信息,所述第二事件信息为设备执行热插入操作,其中,热插入设备中具有至少一个芯片;The heat treatment module is further configured to acquire second event information and a second slot information, wherein the second event information is a device performing a hot plug operation, wherein the hot plug device has at least one chip;
    所述预处理模块,还设置为获取所述热插入设备中每个芯片的芯片功能和所述第二槽位信息对应的全部PCIE,并确定所述全部PCIE与所述热插入设备中芯片的对应关系,其中,所述PCIE与所述芯片为一一对应的关系;The pre-processing module is further configured to acquire a chip function of each chip in the hot-plug device and all PCIEs corresponding to the second slot information, and determine all the PCIEs and chips in the hot-plug device Corresponding relationship, wherein the PCIE has a one-to-one correspondence with the chip;
    所述热处理模块,还设置为根据所述预处理模块确定的对应关系为每个所述PCIE对应的芯片分配系统资源和加载驱动;The heat processing module is further configured to allocate system resources and load drivers for each chip corresponding to the PCIE according to the correspondence determined by the preprocessing module;
    所述预处理模块,还设置为根据所述热处理模块获取的第二事件信息更新与每个所述芯片相关的资源信息和配置信息;The preprocessing module is further configured to update resource information and configuration information related to each of the chips according to the second event information acquired by the heat processing module;
    所述业务管理模块,还设置为根据所述热处理模块获取的第二事件信息和所述 预处理模块获取的芯片功能启动与每个所述芯片相关的业务功能。 The service management module is further configured to: according to the second event information acquired by the heat processing module, The chip function acquired by the pre-processing module initiates the business functions associated with each of the chips.
PCT/CN2017/000072 2016-01-18 2017-01-03 Hot-processing method and device for apparatus WO2017124918A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610031629.1A CN106980588A (en) 2016-01-18 2016-01-18 A kind of equipment heat treatment method and device
CN201610031629.1 2016-01-18

Publications (1)

Publication Number Publication Date
WO2017124918A1 true WO2017124918A1 (en) 2017-07-27

Family

ID=59340581

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/000072 WO2017124918A1 (en) 2016-01-18 2017-01-03 Hot-processing method and device for apparatus

Country Status (2)

Country Link
CN (1) CN106980588A (en)
WO (1) WO2017124918A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124970B (en) * 2018-10-31 2021-11-23 杭州海康威视数字技术股份有限公司 Daughter board hot plug method and device
CN111984556B (en) * 2020-08-17 2022-04-26 紫光恒越技术有限公司 Mainboard and mainboard resource sharing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034380A (en) * 2007-04-19 2007-09-12 杭州华为三康技术有限公司 Method and device for implementing peripheral element interface accelerate bus inserted card hot-plug
CN101826068A (en) * 2009-03-03 2010-09-08 英业达股份有限公司 Method for hot-plugging PCI-E device and application thereof
EP1472608B1 (en) * 2001-12-19 2013-01-02 Intel Corporation Hot plug interface control method and apparatus
CN104615572A (en) * 2015-02-27 2015-05-13 苏州科达科技股份有限公司 Hot-plug processing system and method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100470523C (en) * 2006-05-31 2009-03-18 华为技术有限公司 Thermal-plug controller and controlling method
JP4810349B2 (en) * 2006-08-11 2011-11-09 日本電気株式会社 I / O apparatus and method
CN102023940B (en) * 2009-09-16 2013-07-10 研祥智能科技股份有限公司 CPCI (compact peripheral component interconnection) hot swapping system
CN103365700B (en) * 2013-06-28 2016-01-06 福建师范大学 A kind of facing cloud calculates monitoring resource and the adjustment System of virtualized environment
CN104423489A (en) * 2013-09-02 2015-03-18 鸿富锦精密电子(天津)有限公司 Memory hot-plugging type mainboard
CN103455379A (en) * 2013-09-05 2013-12-18 华为技术有限公司 Resource allocation method and system
CN103631736B (en) * 2013-11-27 2016-08-17 华为技术有限公司 device resource control method and device
CN104731741B (en) * 2013-12-23 2019-03-19 研祥智能科技股份有限公司 The method and system of hot plug

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1472608B1 (en) * 2001-12-19 2013-01-02 Intel Corporation Hot plug interface control method and apparatus
CN101034380A (en) * 2007-04-19 2007-09-12 杭州华为三康技术有限公司 Method and device for implementing peripheral element interface accelerate bus inserted card hot-plug
CN101826068A (en) * 2009-03-03 2010-09-08 英业达股份有限公司 Method for hot-plugging PCI-E device and application thereof
CN104615572A (en) * 2015-02-27 2015-05-13 苏州科达科技股份有限公司 Hot-plug processing system and method

Also Published As

Publication number Publication date
CN106980588A (en) 2017-07-25

Similar Documents

Publication Publication Date Title
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
US7535433B2 (en) Dynamic multiple display configuration
KR100612715B1 (en) Autonomic recovery from hardware errors in an input/output fabric
US11507421B2 (en) Information handling system and method to allocate peripheral component interconnect express (PCIe) bus resources
CN110083494B (en) Method and apparatus for managing hardware errors in a multi-core environment
US20140068317A1 (en) Peripheral device sharing in multi host computing systems
CN112148422A (en) IO processing method and device
US10303487B2 (en) System and method for booting an information handling system
US9372702B2 (en) Non-disruptive code update of a single processor in a multi-processor computing system
TWI598740B (en) Apparatus allocating controller and apparatus allocating method
US20180246840A1 (en) Intelligent Certificate Discovery in Physical and Virtualized Networks
CN111008162A (en) Method and system for realizing single PCIE slot supporting multiple PCIE ports
WO2017124918A1 (en) Hot-processing method and device for apparatus
US20140115193A1 (en) Method and device for enumerating input/output devices
US11144326B2 (en) System and method of initiating multiple adaptors in parallel
WO2020001150A1 (en) Method, system and medium for instantly prompting in-position change of sata and nvme devices
CN117648133A (en) Hot plug management method, device, equipment and machine-readable storage medium
CN108153553A (en) A kind of high-end server starts method, system, device and computer storage media
WO2023016379A1 (en) Computer system, control method based on pcie device, and related device
CN110401939A (en) A kind of low-power consumption bluetooth controller link layer device
CN115794456A (en) PCIe link repair method and device and computing equipment
US20190034215A1 (en) Generating host groups in an information handling system
CN101387966A (en) Computer equipment with BIOS selection function
US20200301742A1 (en) Bus allocation system
CN111339014A (en) USB equipment sharing device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17740949

Country of ref document: EP

Kind code of ref document: A1