WO2025200577A1 - 互连链路的控制方法及装置、非易失性可读存储介质及电子设备 - Google Patents

互连链路的控制方法及装置、非易失性可读存储介质及电子设备

Info

Publication number
WO2025200577A1
WO2025200577A1 PCT/CN2024/137919 CN2024137919W WO2025200577A1 WO 2025200577 A1 WO2025200577 A1 WO 2025200577A1 CN 2024137919 W CN2024137919 W CN 2024137919W WO 2025200577 A1 WO2025200577 A1 WO 2025200577A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
pci
link
target
target storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/137919
Other languages
English (en)
French (fr)
Inventor
孙秀强
刘宝俊
姚藩益
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Publication of WO2025200577A1 publication Critical patent/WO2025200577A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1694Configuration of memory controller to different memory types
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4234Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a memory bus
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0024Peripheral component interconnect [PCI]

Definitions

  • the embodiments of the present application relate to the field of computers, and in particular, to a method and device for controlling an interconnection link, a non-volatile readable storage medium, and an electronic device.
  • the VMD (Virtual Machine Device) function of the interconnection link in the related art is turned off by default, and when in use, it is necessary to clarify which interconnection link of the processor is using a storage device of a specified type that matches the VMD function, and to turn on the VMD function of the corresponding interconnection link in advance, or to turn on the VMD function of the interconnection link through a tool after confirming the interconnection link where the storage device of the specified type is located.
  • the above-mentioned method for setting the VMD function of the interconnection link is relatively time-consuming.
  • the VMD function of the corresponding interconnection link needs to be reset, and it is not sufficient to automatically identify the interconnection link where the storage device of the specified type is located, and set the corresponding interconnection link to enable the VMD function. It can be seen that the control method of the interconnection link in the related art has the problem of taking a long time to set the VMD function of the interconnection link.
  • the embodiments of the present application provide a method and device for controlling an interconnection link, a non-volatile readable storage medium, and an electronic device, so as to at least solve the problem that the VMD function setting of the interconnection link in the control method of the interconnection link in the related art takes a long time.
  • a method for controlling an interconnection link is provided, which is applied to a server, wherein the server includes a server motherboard, and a processor on the server motherboard allows connection to a storage device of a specified type through a specified interconnection link, comprising: reading first device information of a target storage device from a specified configuration space of the target storage device, wherein the target storage device is a storage device connected to a target processor on the server motherboard through a specified interconnection link, and the first device information is used to indicate the device type of the target storage device; when it is determined that the target storage device is a storage device of a specified type based on the first device information, obtaining second device information of the target storage device, wherein the second device information is used to indicate the specified interconnection link used to connect the target storage device to the target processor; and setting a volume management device VMD function of the target interconnection link indicated by the second device information to an enabled state, wherein the VMD function matches the storage device of the specified type.
  • the designated interconnection link is a peripheral device interconnection PCI link
  • the designated configuration space is a PCI configuration space
  • the device connected to the processor on the server motherboard through the PCI link is a PCI device
  • reading the first device information of the target storage device from the designated configuration space of the target storage device includes: reading configuration information of a designated information type from the PCI configuration space of the target storage device to obtain the first device information, wherein the designated information type includes at least one of the following: type, subtype, and message type.
  • the designated interconnection link is a peripheral device interconnection PCI link
  • the device connected to the processor on the server motherboard through the PCI link is a PCI device
  • second device information of the target storage device is obtained, including: when the target storage device is determined to be a storage device of a specified type based on the first device information, a set of device numbers of the target storage device is obtained; and the PCI bus number of the target storage device and the PCI device number of the target storage device in the set of device numbers of the target storage device are determined as the second device information.
  • obtaining a set of device numbers for the target storage device includes: checking a set of device numbers for the target storage device in the PCI device driver of the target storage device, wherein the set of device numbers includes a segment number corresponding to the target storage device, a PCI bus number of the target storage device, a PCI device number of the target storage device, and a PCI function number of the target storage device.
  • the PCI device number is used to indicate the bandwidth type of the bandwidth of the PCI link corresponding to the server, and the PCI device numbers corresponding to different bandwidth types are at least partially different; the bandwidth of the PCI link is 16-bit bandwidth, and the 16-bit bandwidth is allowed to be split into 4 4-bit bandwidths or 2 8-bit bandwidths; when the PCI device numbers are 0, 1, 2, and 3, the bandwidth type of the bandwidth of the PCI link is 4 4-bit bandwidths; when the PCI device numbers are 0 and 2, the bandwidth type of the bandwidth of the PCI link is 2 8-bit bandwidths.
  • determining whether all designated interconnect links corresponding to storage devices of a specified type have not changed by comparing current variables with historical variables includes: when the current variables and historical variables are the same, determining that all designated interconnect links corresponding to storage devices of a specified type have not changed; and when the current variables and historical variables are different, determining that at least some of the designated interconnect links corresponding to storage devices of a specified type have changed.
  • the method before restarting the server, the method further includes: updating the historical variables to current variables, and saving the updated historical variables.
  • the control device includes: a reading unit, configured to read first device information of a target storage device from a specified configuration space of the target storage device, wherein the target storage device is a storage device connected to a target processor on the server motherboard through a specified interconnection link, and the first device information is used to indicate the device type of the target storage device; an acquisition unit, configured to acquire second device information of the target storage device when it is determined that the target storage device is a storage device of a specified type based on the first device information, wherein the second device information is used to indicate the specified interconnection link used to connect the target storage device to the target processor; and a setting unit, configured to set a volume management device VMD function of the target interconnection link indicated by the second device information to an enabled state, wherein the VMD function matches the storage device of the specified type.
  • a reading unit configured to read first device information of a target storage device from a specified configuration space of the target storage device, wherein the target storage device is a storage device connected to a target processor on the server motherboard through a specified
  • a non-volatile readable storage medium in which a computer program is stored.
  • the computer program is configured to execute the steps of any of the above method embodiments when running.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • FIG1 is a hardware structure block diagram of a server device of a method for controlling an interconnection link according to an embodiment of the present application
  • FIG2 is a schematic flow chart of a method for controlling an interconnection link according to an embodiment of the present application
  • FIG5 is a schematic flow chart of another method for controlling an interconnection link according to an embodiment of the present application.
  • FIG6 is a schematic flow chart of another method for controlling an interconnection link according to an embodiment of the present application.
  • FIG7 is a structural block diagram of a control device for an interconnection link provided in an embodiment of the present application.
  • FIG1 is a hardware structure block diagram of a server device of a control method for an interconnected link in an embodiment of the present application.
  • the server device may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the above-mentioned server device may also include a transmission device 106 and an input/output device 108 configured to have a communication function.
  • FIG1 is only for illustration and does not limit the structure of the above-mentioned server device.
  • the server device may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
  • the memory 104 can be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the control method of the interconnection link in the embodiment of the present application.
  • the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the transmission device 106 is configured to receive or transmit data via a network.
  • the aforementioned network may include a wireless network provided by a communication provider of the server device.
  • the transmission device 106 includes a NIC (Network Interface Controller) that can be connected to other network devices via a base station to communicate with the Internet.
  • the transmission device 106 may be an RF (Radio Frequency) module that is configured to communicate with the Internet wirelessly.
  • FIG2 is a flow chart of a method for controlling an interconnection link according to an embodiment of the present application. As shown in FIG2 , the flow chart includes the following steps:
  • Step S202 read first device information of the target storage device from the specified configuration space of the target storage device, wherein the target storage device is a storage device connected to the target processor on the server motherboard through a specified interconnection link, and the first device information is used to indicate the device type of the target storage device.
  • the interconnection link control method of this embodiment can be applied to a scenario where a VMD function of controlling an interconnection link is used.
  • the method can be applied to a server, where the server includes a server motherboard, and a processor on the server motherboard allows connection to a storage device of a specified type via a specified interconnection link.
  • the traditional VMD function is disabled by default and when used, it is necessary to clearly identify under which interconnection link of the CPU (Central Processing Unit) the specified type of storage device is used and enable the corresponding VMD function in advance, or to use a tool to enable the VMD function under the specified interconnection link where the specified type of storage device is located.
  • the above two methods of setting up the VMD function are both time-consuming. Once the location of the specified type of storage device on the server changes, it needs to be reset and cannot intelligently identify the specified interconnection link where the specified type of storage device is located and enable the VMD function.
  • the target storage device is a storage device connected to a target processor on a server motherboard via a designated interconnection link.
  • the designated configuration space of the target storage device stores all information required for the target storage device to operate, such as the manufacturer, device identification, device function, resource requirements, processing capacity, etc.
  • the first device information of the target storage device is read from the designated configuration space of the target storage device.
  • the first device information is used to indicate the device type of the target storage device. Based on this, the first device information of the target storage device is read from the designated configuration space of the target storage device to determine the optional type of the target storage device, for example, to determine that the target storage device is a storage device of a designated type.
  • Step S204 When the target storage device is determined to be a storage device of a specified type according to the first device information, second device information of the target storage device is obtained, wherein the second device information is used to indicate a specified interconnection link used to connect the target storage device to the target processor.
  • the target storage device is a storage device connected to the target processor on the server motherboard via a designated interconnection link. Based on this, when the target storage device is connected to the target processor via a designated interconnection link, the designated interconnection link used to connect the target storage device to the target processor can be determined based on the second device information of the target storage device.
  • Step S206 Setting the volume management device VMD function of the target interconnect link indicated by the second device information to an enabled state, wherein the VMD function matches a storage device of a specified type.
  • the target interconnect link indicated by the second device information is the specified interconnect link used to connect the target storage device (storage device of the specified type) to the target processor.
  • the VMD function matches the specified type of storage device. Enabling the VMD function on the target interconnect link can improve the efficiency of reading and writing data for the specified type of storage device and reduce latency. It can also support hot-plug functionality, reducing the reporting of error messages caused by hot-plug functionality. It can also support disk array backup functionality for the specified type of storage device and fault indicator functionality for the specified type of storage device.
  • first device information of the target storage device is read from the specified configuration space of the target storage device, wherein the target storage device is a storage device connected to the target processor on the server motherboard through a specified interconnection link, and the first device information is used to indicate the device type of the target storage device; when the target storage device is determined to be a storage device of the specified type according to the first device information, second device information of the target storage device is obtained, wherein the second device information is used to indicate the specified interconnection link used to connect the target storage device to the target processor; and the volume management device VMD function of the target interconnection link indicated by the second device information is set to an enabled state, wherein the VMD function matches the specified type of storage device, thereby solving the problem that the control method of the interconnection link in the related art has a long time consumption in setting the VMD function of the interconnection link.
  • the interconnect link is designated as a Peripheral Component Interconnect (PCI) link
  • the configuration space is designated as a PCI configuration space
  • a device connected to a processor on a server motherboard via the PCI link is designated as a PCI device.
  • PCI Peripheral Component Interconnect
  • Reading first device information of the target storage device from a specified configuration space of the target storage device includes:
  • the PCI configuration space contains information such as the PCI device's vendor ID (Identity document), device ID, subsystem vendor ID, and subsystem ID.
  • the vendor ID and device ID can determine the manufacturer and device type of the device, while the subsystem vendor ID and subsystem ID can determine the device's optional model and version, that is, determine the subtype of the PCI device.
  • the device message type indicates the type of optional interaction message of the PCI device.
  • the device message type information in the PCI configuration space can be used to check whether the current PCI device supports the communication protocol corresponding to the specified type of storage device.
  • the method further includes:
  • obtaining a set of device numbers of the target storage device includes:
  • the method further includes:
  • the target interconnection link is represented by the processor slot number corresponding to the target storage device, the PCI bus port number corresponding to the target storage device, and the bandwidth splitting information of the second PCI bridge link.
  • the target interconnection link used to connect the target storage device to the target processor includes a first PCI bridge link, a target PCI bus, and a second PCI bridge link.
  • the target processor is connected to the target PCI bus via the first PCI bridge link
  • the target storage device is connected to the target PCI bus via the second PCI bridge link.
  • the second device information includes the PCI bus number of the target storage device and the PCI device number of the target storage device.
  • the startup focuses on reading the BUS number of the NVME hard disk, and further obtains the CPU slot number, PCI bus port number and other information where the current NVME hard disk is located through the BUS number of the NVME hard disk.
  • the bandwidth splitting information of the PCI link is confirmed according to the Dev number of the NVME disk, so as to accurately locate the CPU slot number, PCI link number, and PCI link bandwidth splitting situation of the current NVME hard disk.
  • the number range of the PCI bus number of a processor on the server motherboard is set based on the total number of processors on the server motherboard;
  • the PCI device number is used to indicate the bandwidth type of the bandwidth of the PCI link corresponding to the server, and the PCI device numbers corresponding to different bandwidth types are at least partially different.
  • the default PCI link width is 16 bits, which can be split into four 4-bit bandwidths or two 8-bit bandwidths.
  • the bandwidth is 4 bits, and when the PCI device numbers are 0 and 2, the bandwidth is 8 bits.
  • control method of the interconnection link in this application can be implemented collaboratively by the server, BIOS, and OS (Operating System).
  • a first determining unit configured to, after obtaining the second device information of the target storage device, determine a processor slot number corresponding to the target storage device and a PCI bus port number corresponding to the target storage device based on a PCI bus number of the target storage device, wherein the processor slot number corresponding to the target storage device is used to indicate a target processor and a processor slot on the target processor corresponding to the first PCI bridge link, and the PCI bus port number corresponding to the target storage device is used to indicate a target PCI bus;
  • a second determining unit configured to determine bandwidth splitting information of a second PCI bridge link based on a PCI device number of the target storage device, wherein the bandwidth splitting information of the second PCI bridge link is used to indicate bandwidth split from the bandwidth of the target PCI bus to the second PCI bridge link, so as to indicate a position of the target storage device on the target PCI bus;
  • the target interconnection link is represented by the processor slot number corresponding to the target storage device, the PCI bus port number corresponding to the target storage device, and the bandwidth splitting information of the second PCI bridge link.
  • the number range of the PCI bus number of a processor on the server motherboard is set based on the total number of processors on the server motherboard;
  • the PCI device number is used to indicate the bandwidth type of the bandwidth of the PCI link corresponding to the server, and the PCI device numbers corresponding to different bandwidth types are at least partially different.
  • the apparatus further comprises:
  • the second execution unit is configured to, when the server is powered on, sequentially enumerate, through a basic input/output system, devices connected to the processor on the server motherboard through a specified interconnection link, identify a storage device of a specified type among the enumerated devices, and enable a VMD function of a specified interconnection link corresponding to the identified storage device of the specified type;
  • the third execution unit is configured to control the basic input and output system to start normally and enter the server's operating system when the VMD functions of the specified interconnection links corresponding to the identified specified type of storage devices are all set to an enabled state and the specified interconnection links corresponding to the specified type of storage devices have not changed.
  • the apparatus further comprises:
  • a fourth execution unit configured to, after sequentially enumerating, through a basic input/output system, devices connected to the processor on the server motherboard via the specified interconnection links, combine setting values of VMD functions of all specified interconnection links connected to the processor on the server motherboard into a variable of specified bits to obtain a current variable;
  • the third determination unit is configured to determine whether the specified interconnection links corresponding to the storage device of the specified type have not changed by comparing the current variable and the historical variable, wherein, when the server is not started for the first time, the historical variable is a variable of a specified number of bits composed of the setting values of the VMD functions of all specified interconnection links connected to the processor on the server motherboard when the server was last started. When the server is started for the first time, the historical variable is a default variable.
  • a given interconnect link connected to a processor on a server motherboard corresponds to a bit in a variable of a given number of bits
  • the fourth execution unit includes:
  • the execution module is configured to combine the setting values of the VMD functions of the specified interconnection links connected to the processor on the server motherboard into a current variable according to the order of the bits corresponding to the specified interconnection links in the variable with a specified number of bits.
  • the third determining unit includes:
  • the second determining module is configured to determine that none of the designated interconnection links corresponding to the storage devices of the designated type have changed when the current variable and the historical variable are the same;
  • the third determining module is configured to determine that, when the current variable and the historical variable are different, a designated interconnection link corresponding to a storage device of a designated type is at least partially changed.
  • the apparatus further comprises:
  • the restart unit is configured to, after sequentially enumerating, through a basic input/output system, devices connected to a processor on a server mainboard through designated interconnection links, restart the server if VMD functions of designated interconnection links corresponding to identified storage devices of designated types are all set to an enabled state and if the designated interconnection links corresponding to the storage devices of designated types are changed.
  • the apparatus further comprises:
  • the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
  • An embodiment of the present application further provides a non-volatile readable storage medium, in which a computer program is stored.
  • the computer program is configured to execute the steps of any of the above method embodiments when running.
  • the above-mentioned non-volatile readable storage medium may include but is not limited to: USB flash drive, ROM (Read-Only Memory), RAM (Random Access Memory), mobile hard disk, magnetic disk or optical disk and other non-volatile readable storage media that can store computer programs.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
  • An embodiment of the present application further provides a computer program product, which includes a computer program.
  • a computer program product which includes a computer program.

Landscapes

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

Abstract

本申请实施例提供了一种互连链路的控制方法及装置、非易失性可读存储介质及电子设备,其中,该方法包括:从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配。

Description

互连链路的控制方法及装置、非易失性可读存储介质及电子设备
相关申请的交叉引用
本申请要求于2024年3月29日提交中国专利局,申请号为202410376240.5,申请名称为“互连链路的控制方法及装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机领域,特别的,涉及一种互连链路的控制方法及装置、非易失性可读存储介质及电子设备。
背景技术
目前,相关技术中的互连链路的VMD(Virtual Machine Device,虚拟机设备)功能是默认关闭的,且使用时需要明确处理器的哪个互连链路下使用的是与VMD功能匹配的指定类型的存储设备,并且提前将对应互连链路的VMD功能开启,或者是通过工具在确认指定类型的存储设备所在的互连链路下将互连链路的VMD功能开启,然而,采用上述方法设置互连链路的VMD功能的开启方式均较为耗时,一旦服务器的指定类型的存储设备位置改变则需要重新设置对应的互连链路的VMD功能,且不够自动识别指定类型的存储设备所在的互连链路,并设置对应的互连链路使能VMD功能。由此可见,相关技术中的互连链路的控制方法存在互连链路的VMD功能设置耗时长的问题。
发明内容
本申请实施例提供了一种互连链路的控制方法及装置、非易失性可读存储介质及电子设备,以至少解决相关技术中的互连链路的控制方法存在互连链路的VMD功能设置耗时长的问题。
根据本申请的一个实施例,提供了一种互连链路的控制方法,应用于服务器,服务器包括服务器主板,服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连,包括:从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配。
在一些实施例中,指定互连链路为外围设备互连PCI链路,指定配置空间为PCI配置空间,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,包括:从目标存储设备的PCI配置空间读取出指定信息类型的配置信息,得到第一设备信息,其中,指定信息类型包括以下至少之一:类型,子类型,消息类型。
在一些实施例中,指定类型的存储设备为非易失性内存主机控制器接口规范NVME硬盘;在从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息之后,方法还包括:按照指定信息类型将第一设备信息与NVME硬盘的硬盘信息进行匹配,以判定目标存储设备是否为NVME硬盘。
在一些实施例中,指定互连链路为外围设备互连PCI链路,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,包括:在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的一组设备号;将目标存储设备的一组设备号中的目标存储设备的PCI总线编号以及目标存储设备的PCI设备编号,确定为第二设备信息。
在一些实施例中,在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的一组设备号,包括:查看目标存储设备的PCI设备驱动程序中目标存储设备的一组设备号,其中,一组设备号包括与目标存储设备对应的段号、目标存储设备的PCI总线编号、目标存储设备的PCI设备编号以及目标存储设备的PCI功能编号。
在一些实施例中,指定互连链路包括外围设备互连PCI链路,目标互连链路包含第一PCI桥链路、目标PCI总线以及第二PCI桥链路,目标处理器通过第一PCI桥链路与目标PCI总线相连,目标存储设备通过第二PCI桥链路与目标PCI总线相连,第二设备信息包括目标存储设备的PCI总线编号和目标存储设备的PCI设备编号;在获取目标存储设备的第二设备信息之后,方法还包括:基于目标存储设备的PCI总线编号确定与目标存储设备对应的处理器槽位号和与目标存储设备对应的PCI总线端口号,其中,与目标存储设备对应的处理器槽位号用于指示目标处理器以及目标处理器上与第一PCI桥链路对应的处理器槽位,与目标存储设备对应的PCI总线端口号用于指示目标PCI总线;基于目标存储设备的PCI设备编号,确定第二PCI桥链路的带宽拆分信息,其中,第二PCI桥链路的带宽拆分信息用于指示从目标PCI总线的带宽中拆分给第二PCI桥链路的带宽,以指示目标PCI总线上目标存储设备的位置;其中,目标互连链路通过与目标存储设备对应的处理器槽位号、与目标存储设备对应的PCI总线端口号和第二PCI桥链路的带宽拆分信息进行表示。
在一些实施例中,服务器主板上的一个处理器的PCI总线编号的编号范围是基于服务器主板上的处理器的总数量设置的;PCI设备编号用于指示服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的PCI设备编号至少部分不同。
在一些实施例中,在PCI总线编号的总数为256,并且服务器主板上的处理器的总数量为2的情况下,一个处理器的PCI总线编号的编号范围为大于或者等于0H且小于80H,另一个处理器的PCI总线编号的编号范围为大于或者等于80H且小于或者等于100H,其中,编号范围是十六进制。
在一些实施例中,PCI设备编号用于指示服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的PCI设备编号至少部分不同;PCI链路的带宽是16位带宽,16位带宽允许拆分为4个4位带宽或者2个8位带宽;在PCI设备编号是0、1、2、3的情况下,PCI链路的带宽的带宽类型为4个4位带宽;在PCI设备编号是0、2的情况下,PCI链路的带宽的带宽类型为2个8位带宽。
在一些实施例中,方法还包括:在服务器上电启动的情况下,通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备,以识别枚举到的设备中的指定类型的存储设备,并将识别到的指定类型的存储设备对应的指定互连链路的VMD功能设置为使能状态;在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路均未发生改变的情况下,控制基本输入输出系统正常启动,并进入服务器的操作系统。
在一些实施例中,在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,方法还包括:将与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为指定位数的变量,得到当前变量;通过比较当前变量和历史变量,确定指定类型的存储设备对应的指定互连链路是否均未发生改变,其中,在服务器不是首次启动的情况下,历史变量为服务器上一次启动时,与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为的指定位数的变量,在服务器首次启动的情况下,历史变量为默认变量。
在一些实施例中,与服务器主板上的处理器相连的一个指定互连链路对应于指定位数的变量中的一个比特位;将与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为指定位数的变量,得到当前变量,包括:按照指定互连链路在指定位数的变量中对应的比特位的顺序,将与服务器主板上的处理器相连的指定互连链路的VMD功能的设置值组合成当前变量。
在一些实施例中,通过比较当前变量和历史变量,确定指定类型的存储设备对应的指定互连链路是否均未发生改变,包括:在当前变量和历史变量相同的情况下,确定指定类型的存储设备对应的指定互连链路均未发生改变;在当前变量和历史变量不相同的情况下,确定指定类型的存储设备对应的指定互连链路至少部分发生改变。
在一些实施例中,在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,方法还包括:在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路发生改变的情况下,重启服务器。
在一些实施例中,在重启服务器之前,方法还包括:将历史变量更新为当前变量,并保存更新的历史变量。
在一些实施例中,在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路发生改变的情况下,重启服务器,包括:在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路存在新增的情况下,重启服务器;或者在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路存在移除的情况下,重启服务器。
根据本申请的另一个实施例,提供了一种互连链路的控制装置,应用于服务器,服务器包括服务器主板,服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连,包括:读取单元,被设置为从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;获取单元,被设置为在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;设置单元,被设置为将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配。
根据本申请的又一个实施例,还提供了一种非易失性可读存储介质,非易失性可读存储介质中存储有计算机程序,其中,计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
根据本申请的又一个实施例,还提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。
通过本申请,服务器主板上的处理器通过互连链路与目标存储设备相连,基本输入输出系统BIOS(Basic Input Output System,基本输入输出系统)基于从目标存储设备的指定配置空间内读取出的目标存储设备的第一设备信息确定目标存储设备是否为指定类型的存储设备,在确定目标存储设备为指定类型的存储设备的情况下,获取用于指示目标存储设备与目标处理器相连所使用的指定互连链路的第二设备信息,并使能第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,通过动态的识别指定类型的存储设备并将指定类型的存储设备所在的目标互连链路的VMD功能开启,无需人为或者确认指定类型的存储设备配置后进行设置指定类型的存储设备所在的互连链路的VMD功能,满足动态设置VMD功能的需求,进而解决相关技术中的互连链路的控制方法存在互连链路的VMD功能设置耗时长的问题。
附图说明
图1是本申请实施例的一种互连链路的控制方法的服务器设备的硬件结构框图;
图2是根据本申请实施例的一种互连链路的控制方法的流程示意图;
图3是根据本申请实施例的一种互连链路的控制方法的示意图;
图4是根据本申请实施例的一种服务器主板的示意图;
图5是根据本申请实施例的另一种互连链路的控制方法的流程示意图;
图6是根据本申请实施例的又一种互连链路的控制方法的流程示意图;
图7是本申请实施例提供的一种互连链路的控制装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本申请的实施例。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
本申请实施例中所提供的方法实施例可以在服务器设备或者类似的运算装置中执行。以运行在服务器设备上为例,图1是本申请实施例的一种互连链路的控制方法的服务器设备的硬件结构框图。如图1所示,服务器设备可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和被设置为存储数据的存储器104,其中,上述服务器设备还可以包括被设置为通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述服务器设备的结构造成限定。例如,服务器设备还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可被设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的互连链路的控制方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至服务器设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输设备106被设置为经由一个网络接收或者发送数据。上述的网络可选实例可包括服务器设备的通信供应方提供的无线网络。在一个实例中,传输设备106包括一个NIC(Network Interface Controller,网络适配器),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为RF(Radio Frequency,射频)模块,其被设置为通过无线方式与互联网进行通讯。
在本实施例中提供了一种互连链路的控制方法,图2是根据本申请实施例的一种互连链路的控制方法的流程示意图,如图2所示,该流程包括如下步骤:
步骤S202,从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型。
本实施例中的互连链路的控制方法可以应用到控制互连链路的VMD功能的场景中。应用于服务器,服务器包括服务器主板,服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连。
传统的VMD功能是默认关闭的且使用时需要明确CPU(Central Processing Unit,处理器)的哪个互连链路下使用的是指定类型的存储设备并且提前将对应的VMD功能开启,或者是通过工具在确认指定类型的存储设备所在的指定互连链路下将VMD功能开启,上述两种方法设置VMD功能的开启方式均较为耗时,一旦服务器的指定类型的存储设备位置改变则需要重新设置且不能智能识别指定类型的存储设备所在的指定互连链路并设置使能VMD功能。
为了至少部分解决上述问题,在本实施例中,通过动态的识别指定类型的存储设备并将指定类型的存储设备所在的指定互连链路的VMD功能开启,无需人为或者确认指定类型的存储设备配置后进行设置VMD功能,满足动态设置指定互连链路的VMD功能的需求。
在本实施例中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,目标存储设备的指定配置空间保存着目标存储设备工作时所需的所有信息,例如,厂家、设备标识、设备功能、资源要求、处理能力等等,从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,第一设备信息用于指示目标存储设备的设备类型,基于此,从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息可以确定目标存储设备的可选类型,例如,确定目标存储设备为指定类型的存储设备。
步骤S204,在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路。
与前述实施例类似的,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,基于此,在目标存储设备通过一条指定互连链路连接到目标处理器上的情况下,基于目标存储设备的第二设备信息,可以确定目标存储设备与目标处理器相连所使用的指定互连链路。
步骤S206,将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配。
这里,第二设备信息所指示的目标互连链路即为目标存储设备(指定类型的存储设备)与目标处理器相连所使用的指定互连链路。VMD功能与指定类型的存储设备匹配,使能目标互连链路的VMD功能可以提高指定类型的存储设备的读写数据的效率,降低延时时间;可以支持热插拔功能,降低因热插拔功能导致的错误信息的上报;可以支持指定类型的存储设备的磁盘阵列备份功能;可以支持指定类型的存储设备的故障点灯功能。
通过上述步骤,从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配,解决了相关技术中的互连链路的控制方法存在互连链路的VMD功能设置耗时长的问题。
在一个示例性实施例中,指定互连链路为外围设备互连PCI(Peripheral Component Interconnect,外围设备互连)链路,指定配置空间为PCI配置空间,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;
从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,包括:
S11,从目标存储设备的PCI配置空间读取出指定信息类型的配置信息,得到第一设备信息,其中,指定信息类型包括以下至少之一:类型,子类型,消息类型。
通过对每个PCI设备进行读取当前设备的PCI配置空间,对读取当前PCI设备的PCI配置空间的类型、子类型、设备消息类型三种信息同时进行判断。
PCI配置空间包含了PCI设备的供应商ID(Identity document,标识)、设备ID、子系统供应商ID、子系统ID等信息,供应商ID和设备ID可以确定设备的厂商和设备类型,而子系统供应商ID和子系统ID可以确定设备的可选型号和版本,即,确定PCI设备的子类型,设备消息类型指示了PCI设备的可选交互消息的类型,例如,通过PCI配置空间中的设备消息类型信息来检查当前PCI设备是否支持指定类型的存储设备对应的通信协议。
通过本实施例,通过对当前PCI设备的PCI配置空间的类型、子类型、设备消息类型三种信息同时进行判断,可以确定当前PCI设备是否为指定类型的存储设备,可以提高PCI设备的判断的准确性。
在一个示例性实施例中,指定类型的存储设备为非易失性内存主机控制器接口规范NVME(Non Volatile Memory Host Controller Interface Specification Express,非易失性内存主机控制器接口规范)硬盘;
在从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息之后,上述方法还包括:
S21,按照指定信息类型将第一设备信息与NVME硬盘的硬盘信息进行匹配,以判定目标存储设备是否为NVME硬盘。
与前述实施例类似的,通过BIOS读取PCI设备的PCI配置空间并判断类型、子类型、设备类型,确认当前PCI设备是否为NVME硬盘设备。
对读取当前PCI设备的PCI配置空间的类型、子类型、设备消息类型三种信息同时进行判断,当上述信息与NVME硬盘核对一致时,确定此时的PCI设备为NVME硬盘。
在一个示例性实施例中,指定互连链路为外围设备互连PCI链路,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;
在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,包括:
S31,在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的一组设备号;
S32,将目标存储设备的一组设备号中的目标存储设备的PCI总线编号以及目标存储设备的PCI设备编号,确定为第二设备信息。
在确定当前PCI设备为指定类型的存储设备的情况下,可以通过PCI协议获取当前PCI设备的一组设备号,基于PCI设备的一组设备号中的PCI总线编号(即,BUS号)以及目标存储设备的PCI设备编号(即,DEV号,DEVICE的前三个字母)可以确定当前PCI设备与目标处理器相连所使用的指定互连链路,即,目标互连链路。
在一个示例性实施例中,在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的一组设备号,包括:
S41,查看目标存储设备的PCI设备驱动程序中目标存储设备的一组设备号,其中,一组设备号包括与目标存储设备对应的段号、目标存储设备的PCI总线编号、目标存储设备的PCI设备编号以及目标存储设备的PCI功能编号。
目标存储设备的一组设备号可以对应PCI设备的唯一标识“Seg:bus:dev:fun”号,在开机启动时,查看PCI设备驱动程序中PCI设备的唯一标识符“Seg:bus:dev:fun”,确定与PCI设备对应的段号(即Segment号)、与PCI设备对应的PCI总线编号(即bus号)、PCI设备编号(即device号)以及PCI功能编号(即,function号)。根据需要运行PCI设备驱动程序,得到当前连接的所有指定类型的存储设备对应的一组设备号。
在一个示例性实施例中,指定互连链路包括外围设备互连PCI链路,目标互连链路包含第一PCI桥链路、目标PCI总线以及第二PCI桥链路,目标处理器通过第一PCI桥链路与目标PCI总线相连,目标存储设备通过第二PCI桥链路与目标PCI总线相连,第二设备信息包括目标存储设备的PCI总线编号和目标存储设备的PCI总线编号;
在获取目标存储设备的第二设备信息之后,上述方法还包括:
S51,基于目标存储设备的PCI总线编号确定与目标存储设备对应的处理器槽位号和与目标存储设备对应的PCI总线端口号,其中,与目标存储设备对应的处理器槽位号用于指示目标处理器以及目标处理器上与第一PCI桥链路对应的处理器槽位,与目标存储设备对应的PCI总线端口号用于指示目标PCI总线;
S52,基于目标存储设备的PCI设备编号,确定第二PCI桥链路的带宽拆分信息,其中,第二PCI桥链路的带宽拆分信息用于指示从目标PCI总线的带宽中拆分给第二PCI桥链路的带宽,以指示目标PCI总线上目标存储设备的位置;
其中,目标互连链路通过与目标存储设备对应的处理器槽位号、与目标存储设备对应的PCI总线端口号和第二PCI桥链路的带宽拆分信息进行表示。
结合图3,目标存储设备与目标处理器相连所使用的目标互连链路包含第一PCI桥链路、目标PCI总线以及第二PCI桥链路,目标处理器通过第一PCI桥链路与目标PCI总线相连,目标存储设备通过第二PCI桥链路与目标PCI总线相连,第二设备信息包括目标存储设备的PCI总线编号和目标存储设备的PCI设备编号。
例如,在本实施例中,启动重点读取NVME硬盘的BUS号,通过NVME硬盘的BUS号在进一步获取当前NVME硬盘所在的CPU槽位号、PCI总线端口号等信息,同时,根据NVME盘的Dev号确认PCI链路的带宽拆分信息,从而精准定位到当前NVME硬盘所在的CPU槽位号、PCI链路号、PCI链路带宽拆分情况的准确信息。
在一个示例性实施例中,服务器主板上的一个处理器的PCI总线编号的编号范围是基于服务器主板上的处理器的总数量设置的;
PCI设备编号用于指示服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的PCI设备编号至少部分不同。
例如,在本实施例中,服务器系统的BUS总数为256,在服务器主板上处理器为两个的情况下,一个处理器的PCI总线编号的编号范围为0~80H(十六进制),另一个处理器的PCI总线编号的编号范围为80~100H(十六进制),即,BUS号大于80H为CPU1,小于80H为CPU0。
PCI链路默认是16位带宽,可以进行拆分为4个4位带宽或者2个8位带宽,当PCI设备编号为0、1、2、3则为4位带宽,当PCI设备编号为0、2则为8位带宽。
在一个示例性实施例中,上述方法还包括:
S61,在服务器上电启动的情况下,通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备,以识别枚举到的设备中的指定类型的存储设备,并将识别到的指定类型的存储设备对应的指定互连链路的VMD功能设置为使能状态;
S62,在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路均未发生改变的情况下,控制基本输入输出系统正常启动,并进入服务器的操作系统。
例如,在本实施例中,当服务器上电启动时,BIOS会在PCI枚举的时候获取到所有的PCI设备信息并对PCI设备进行识别判断,采用读取每个设备的PCI配置空间的类型、子类型、设备消息类型三种条件确认启动过程中识别的NVME硬盘,当确认为NVME硬盘后再通过PCI协议获取当前NVME盘的设备号,将当前NVME盘的当前PCI链路的VMD功能设置使能,对当前服务器中的所有的NVME硬盘的PCI链路的VMD功能设置使能,在NVME硬盘对应的PCI链路未发生改变的情况下,BIOS正常启动并进入OS或者shell或者操作系统。
在一个示例性实施例中,在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,上述方法还包括:
S71,将与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为指定位数的变量,得到当前变量;
S72,通过比较当前变量和历史变量,确定指定类型的存储设备对应的指定互连链路是否均未发生改变,其中,在服务器不是首次启动的情况下,历史变量为服务器上一次启动时,与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为的指定位数的变量,在服务器首次启动的情况下,历史变量为默认变量。
与前述实施例类似的,指定位数与服务器主板上的所有处理器上挂载的PCI链路的总数一致。
例如,在本实施例中,将设置VMD使能的值按照规则组合成一个32位的当前变量B,判断历史变量A与当前变量B是否一致,即,确定NVME硬盘对应的PCI链路是否均未发生改变。若变量B和变量A一致,则说明当前服务器非首次启动且NVME硬盘所在的PCI链路位置信息未发生改变;若变量B和变量A不一致则说明,当前的NVME硬盘位置信息与上一次启动相比已发生改变(新增/移除/改变Port)。
在服务器上电启动时,BIOS默认将所有的PCI链路的VMD功能都进行了关闭,在服务器不是首次启动的情况下,历史变量为服务器上一次启动时,与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为的指定位数的变量,在服务器首次启动的情况下,历史变量为默认变量,即,默认变量与所有的PCI链路的VMD功能都关闭对应。
在一个示例性实施例中,与服务器主板上的处理器相连的一个指定互连链路对应于指定位数的变量中的一个比特位;
将与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为指定位数的变量,得到当前变量,包括:
S81,按照指定互连链路在指定位数的变量中对应的比特位的顺序,将与服务器主板上的处理器相连的指定互连链路的VMD功能的设置值组合成当前变量。
例如,在本实施例中,以拆分出的PCI链路均为4位带宽,PCI链路的总数为32为例,对应的,32个4位带宽,则PCI链路总带宽为128,以每个PCI总线默认是16位带宽为例,则共8(128除以16)个PCI总线。通过读取每个CPU的PCI链路的VMD设置值,将设置值按照固定规则组合成一个32位的当前变量。
这里,按照PCI链路在指定位数的变量中对应的比特位的顺序,将与服务器主板上的CPU相连的PCI链路的VMD功能的设置值组合成当前变量。
在一个示例性实施例中,通过比较当前变量和历史变量,确定指定类型的存储设备对应的指定互连链路是否均未发生改变,包括:
S91,在当前变量和历史变量相同的情况下,确定指定类型的存储设备对应的指定互连链路均未发生改变;
S92,在当前变量和历史变量不相同的情况下,确定指定类型的存储设备对应的指定互连链路至少部分发生改变。
例如,在本实施例中,若当前变量B和历史变量A一致,则说明当前非第一次启动且NVME硬盘所在的PCI链路位置信息未发生改变;若当前变量B和历史变量A不一致则说明,当前的NVME硬盘位置信息与上一次启动相比已至少部分发生改变,即,存在新增、移除、改变的端口Port,这里,Port可以是对应NVME硬盘。
在一个示例性实施例中,在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,上述方法还包括:
S101,在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路发生改变的情况下,重启服务器。
例如,在本实施例中,在识别到的NVME硬盘对应的PCI链路的VMD功能均已设置为使能状态、且NVME硬盘对应的PCI链路发生改变的情况下,例如,存在新增,或者移除,或者改变的NVME硬盘的情况下,重启服务器。
在一个示例性实施例中,在重启服务器之前,上述方法还包括:
S111,将历史变量更新为当前变量,并保存更新的历史变量。
例如,在本实施例中,在历史变量为A、当前变量为B的情况下,在重启服务器之前,将历史变量A更新为当前变量B,并保存更新的历史变量B。
作为本申请的一种示例性实施例,以指定类型的存储设备为NVME硬盘为例,对本申请实施例的互连链路的控制方法进行解释说明。
无论何种架构的服务器,运行的任何任务都需要存储在硬盘中,而NVME硬盘则是目前主流的非易失性可读存储介质。为了提高NVME硬盘的性能,处理器厂商提供了VMD技术,开启该VMD功能后,NVME硬盘的性能将提升28%以上。VMD技术是针对下一代存储推出的部署方案,可从PCIe总线直接控制和管理NVMe SSD(Solid State Drive,固态硬盘),而无需额外的硬件适配器,支持从PCIe总线对NVMe固态盘进行热升级和更换,而无需关闭系统,支持可启动RAID,同时标准化LED管理可帮助更快速地识别固态盘状态。这种通用性使NVMe固态盘具有企业可靠性、可用性和可服务性(RAS)功能,同时,NVMe固态盘响应速度更快的原因之一是因为这种类型的盘更接近处理器上的PCIe总线。在线运维这些固态盘需要系统内核的中断服务处理。借助VMD,就可以在不用内核中断服务的情况下,在线完成运维任务。VMD是在至强可扩展处理器的根端口上采用的技术,它将NVMe固态盘插入和移除PCIe总线事件重定向至存储感知的驱动程序。这些事件先前必须由系统BIOS和操作系统结合起来进行处理。VMD确保从PCIe总线顺利添加和移除NVMe驱动器,从而确保正常运行时间和可服务性。
而传统的VMD功能是默认关闭的且使用时是需要明确CPU的哪个PCI链路下使用的是NVME硬盘并且提前将对应的VMD功能开启,或者是通过工具在确认NVME硬盘所在的PCI链路下将VMD功能开启,上述2种方法设置VMD功能的开启方式均较为耗时,一旦服务器的NVME硬盘位置改变则需要重新设置且不够智能识别NVME硬盘所在的PCI链路并设置使能VMD功能,而本篇发明专利将重点讲述如何动态的识别NVME硬盘并将NVME硬盘所在的PCI链路的VMD功能开启,无需人为或者确认NVME配置后进行设置VMD功能,满足动态设置VMD功能的需求。
本申请实施例提出一种互连链路的控制方法,动态控制互连链路的VMD功能的设置,通过服务器启动时,BIOS读取VMD的设置并组合成一个变量A并存储,在BIOS启动时的PCI枚举部分,通过读取PCI设备的PCI配置空间并判断类型、子类型、设备类型确认是否为NVME硬盘设备,在通过NVME硬盘设备的Seg号、BUS号、Dev号、Fun号信息,通过确认当前NVME硬盘的BUS号归属的CPU槽位及PCI桥链路的位置,再通过NVME硬盘的Dev号、Fun号确认当前PCI桥链路的带宽拆分情况确认NVME设备的准确位置,对NVME所确认的PCI链路的VMD设置使能,同时,与BIOS启动或者上一次存储的VMD设置情况进行检验,若一致则代表当前无新增/移除/改变Port的情况出现,并继续启动进入OS;若不一致则代表当前存在新增/移除/改变Port的情况,同时,将当前的VMD设置变量B更新至变量A并重启服务器,重复执行上述步骤即可。利用启动时获取PCI链路的VMD的设置值并组合成一个变量A,在PCI部分BIOS通过精准定位NVME的位置信息确认VMD的开启情况并组合成一个变量B,变量B与变量A进行检验并确认是否一致以确认VMD的开启情况,若不一致则进行重启,若一致则继续启动。
在本实施例中,NVME硬盘是挂载在CPU的PCI链路上,服务器上电启动时,BIOS默认将所有的PCI链路的VMD功能进行了关闭。可选地,服务器主板物理设计整体示意图可以如图4所示。服务器主板上包括两个处理器(CPU0、CPU1)、一个BIOS、I2C(Inter-Integrated Circuit,两线式串行总线)、一个BMC(Baseboard Management Controller,板级管理控制器,服务器带外管理的核心部件)、6个NVME硬盘,每个NVME设备的一组设备号包括Seg:BUS:DEV:FUN号,其中,BUS号大于80为CPU1,小于80为CPU0,PCI桥链路的BUS号为固定值,DEV为0、1、2、3则为4位带宽;DEV为0、2,则为8位带宽。CPU0和CPU1之间通过UPI(Ultra Path Interconnect,超路径互连)/CCIX(Cache Coherent Interconnect for Accelerators,加速器缓存一致性互连)/GMIX(Gen-Z Memory Interconnect,Gen-Z内存互连)互连,CPU0和BIOS之间通过SPI(Serial Peripheral Interface,串行外设接口)/QSPI(Quad Serial Peripheral Interface,四线串行外设接口)/ESPI(Enhanced Serial Peripheral Interface,增强型串行外设接口)互连,CPU0和BMC之间通过LPC(Low Pin Count,低引脚计数)/SPI/ESPI互连。
结合图5,可选实现过程如下:
步骤1,服务器首次启动前,即BIOS会对PCI链路的VMD设置一个默认值即默认为关闭状态或者为上一次的启动时设置的状态;
步骤2,服务器启动时,BIOS通过读取每个CPU的PCI链路的VMD设置值,将设置值按照固定规则组合成一个32位的变量A并将变量A进行存储;
步骤3,BIOS启动过程中,在PCI枚举部分通过对每个PCI设备进行读取当前设备的PCI配置空间,对读取当前PCI设备的PCI配置空间的类型、子类型、设备消息类型三种信息同时进行判断,当上述信息经与NVME设备核对一致时,此时的PCI设备为NVME设备,若非NVME设备则继续读取下一个PCI设备的PCI配置空间;
步骤4,当确认当前的PCI设备为NVME设备后,再通过PCI协议获取当前NVME盘的设备号,包括Seg:BUS:DEV:FUN号,重点读取NVME硬盘的BUS号即可,通过NVME硬盘的BUS号在进一步获取当前NVME硬盘所在的CPU槽位号、PCI链路端口号等核心关键信息;
步骤5,根据NVME盘的Dev号、FUN号确认PCI链路的带宽拆分信息,可以精准定位到当前NVME硬盘所在的PCI链路带宽拆分情况的准确信息;
步骤6,重复步骤4-5,将所有的PCI设备中的NVME硬盘设备识别完毕;
步骤7,根据步骤4-6,确认NVME硬盘所在的PCI链路及PCI链路带宽拆分的VMD设置为使能,将所有识别的NVME硬盘所在的PCI链路设置为1个32位的变量B;
步骤8,将步骤7存储的变量B与步骤1原始的变量A进行比较,若不一致则将变量B的数值更新至变量A并重启服务器以实现VMD使能的设置;
步骤9,若变量B和变量A一致,则说明当前非第一次启动且NVME硬盘所在的PCI链路位置信息未发生改变(新增/移除/改变Port);
步骤10,若变量B和变量A不一致则说明,当前的NVME硬盘位置信息与上一次启动相比已发生改变(新增/移除/改变Port)需将当前的变量B更新至变量A中并重启服务器保证VMD功能设置生效。
结合图6,图5所示步骤对应的执行主体可以如图6所示,本申请中的互连链路的控制方法可以由服务器、BIOS、OS(Operating System,操作系统)协同实现。
通过本申请实施例,通过服务器启动时读取VMD的设置值并组合成1个32位的变量A,在BIOS的PCI枚举部分通过读取PCI配置空间的类型、子类型、设备类型确认当前PCI设备是否为NVME硬盘,再通过NVME硬盘的SEG号、BUS号、DEV号、FUN号确认当前NVME硬盘所在的CPU槽位及PCI链路信息精准定位并设置PCI链路的VMD使能功能,将所有的PCI设备枚举完毕后并将使能的VMD的PCI链路组合成1个32位的变量B,变量A与B进行比较检验,根据检验结果确认VMD的实际设置情况并确认是否需要重启服务器,适用于数据中心的X86架构intel服务器产品,适用于国内数据中心及互联网行业,可以动态识别NVME硬盘并将NVME硬盘所在的PCI链路的VMD功能开启,无需人为或者确认NVME配置后进行设置VMD功能,满足动态设置VMD功能的需求。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。
根据本申请实施例的另一方面,还提供了一种互连链路的控制装置,该装置被设置为实现上述实施例中所提供的互连链路的控制方法,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图7是本申请实施例提供的一种互连链路的控制装置的结构框图,应用于服务器,服务器包括服务器主板,服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连;
如图7所示,该装置包括:
读取单元702,被设置为从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;
获取单元704,被设置为在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;
设置单元706,被设置为将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配。
需要说明的是,该实施例中的读取单元702可以被设置为执行上述步骤S202,该实施例中的获取单元704可以被设置为执行上述步骤S204,该实施例中的设置单元706可以被设置为执行上述步骤S206。
通过本申请实施例,从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息,其中,目标存储设备为通过一条指定互连链路连接到服务器主板上的目标处理器的存储设备,第一设备信息用于指示目标存储设备的设备类型;在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的第二设备信息,其中,第二设备信息用于指示目标存储设备与目标处理器相连所使用的指定互连链路;将第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,VMD功能与指定类型的存储设备匹配,解决了相关技术中的互连链路的控制方法存在互连链路的VMD功能设置耗时长的问题。
在一个示例性实施例中,指定互连链路为外围设备互连PCI链路,指定配置空间为PCI配置空间,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;
读取单元包括:
读取模块,被设置为从目标存储设备的PCI配置空间读取出指定信息类型的配置信息,得到第一设备信息,其中,指定信息类型包括以下至少之一:类型,子类型,消息类型。
在一个示例性实施例中,指定类型的存储设备为非易失性内存主机控制器接口规范NVME硬盘;
上述装置还包括:
第一执行单元,被设置为在从目标存储设备的指定配置空间内读取出目标存储设备的第一设备信息之后,按照指定信息类型将第一设备信息与NVME硬盘的硬盘信息进行匹配,以判定目标存储设备是否为NVME硬盘。
在一个示例性实施例中,指定互连链路为外围设备互连PCI链路,通过PCI链路与服务器主板上的处理器相连的设备为PCI设备;
获取单元包括:
获取模块,被设置为在根据第一设备信息确定目标存储设备为指定类型的存储设备的情况下,获取目标存储设备的一组设备号;
第一确定模块,被设置为将目标存储设备的一组设备号中的目标存储设备的PCI总线编号以及目标存储设备的PCI设备编号,确定为第二设备信息。
在一个示例性实施例中,获取模块包括:
查看子模块,被设置为查看目标存储设备的PCI设备驱动程序中目标存储设备的一组设备号,其中,一组设备号包括与目标存储设备对应的段号、目标存储设备的PCI总线编号、目标存储设备的PCI设备编号以及目标存储设备的PCI功能编号。
在一个示例性实施例中,指定互连链路包括外围设备互连PCI链路,目标互连链路包含第一PCI桥链路、目标PCI总线以及第二PCI桥链路,目标处理器通过第一PCI桥链路与目标PCI总线相连,目标存储设备通过第二PCI桥链路与目标PCI总线相连,第二设备信息包括目标存储设备的PCI总线编号和目标存储设备的PCI设备编号;
上述装置还包括:
第一确定单元,被设置为在获取目标存储设备的第二设备信息之后,基于目标存储设备的PCI总线编号确定与目标存储设备对应的处理器槽位号和与目标存储设备对应的PCI总线端口号,其中,与目标存储设备对应的处理器槽位号用于指示目标处理器以及目标处理器上与第一PCI桥链路对应的处理器槽位,与目标存储设备对应的PCI总线端口号用于指示目标PCI总线;
第二确定单元,基于目标存储设备的PCI设备编号,确定第二PCI桥链路的带宽拆分信息,其中,第二PCI桥链路的带宽拆分信息用于指示从目标PCI总线的带宽中拆分给第二PCI桥链路的带宽,以指示目标PCI总线上目标存储设备的位置;
其中,目标互连链路通过与目标存储设备对应的处理器槽位号、与目标存储设备对应的PCI总线端口号和第二PCI桥链路的带宽拆分信息进行表示。
在一个示例性实施例中,服务器主板上的一个处理器的PCI总线编号的编号范围是基于服务器主板上的处理器的总数量设置的;
PCI设备编号用于指示服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的PCI设备编号至少部分不同。
在一个示例性实施例中,上述装置还包括:
第二执行单元,被设置为在服务器上电启动的情况下,通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备,以识别枚举到的设备中的指定类型的存储设备,并将识别到的指定类型的存储设备对应的指定互连链路的VMD功能设置为使能状态;
第三执行单元,被设置为在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路均未发生改变的情况下,控制基本输入输出系统正常启动,并进入服务器的操作系统。
在一个示例性实施例中,上述装置还包括:
第四执行单元,被设置为在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,将与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为指定位数的变量,得到当前变量;
第三确定单元,被设置为通过比较当前变量和历史变量,确定指定类型的存储设备对应的指定互连链路是否均未发生改变,其中,在服务器不是首次启动的情况下,历史变量为服务器上一次启动时,与服务器主板上的处理器相连的所有指定互连链路的VMD功能的设置值组合为的指定位数的变量,在服务器首次启动的情况下,历史变量为默认变量。
在一个示例性实施例中,与服务器主板上的处理器相连的一个指定互连链路对应于指定位数的变量中的一个比特位;
第四执行单元包括:
执行模块,被设置为按照指定互连链路在指定位数的变量中对应的比特位的顺序,将与服务器主板上的处理器相连的指定互连链路的VMD功能的设置值组合成当前变量。
在一个示例性实施例中,第三确定单元包括:
第二确定模块,被设置为在当前变量和历史变量相同的情况下,确定指定类型的存储设备对应的指定互连链路均未发生改变;
第三确定模块,被设置为在当前变量和历史变量不相同的情况下,确定指定类型的存储设备对应的指定互连链路至少部分发生改变。
在一个示例性实施例中,上述装置还包括:
重启单元,被设置为在通过基本输入输出系统依次枚举通过指定互连链路与服务器主板上的处理器连接的设备之后,在识别到的指定类型的存储设备对应的指定互连链路的VMD功能均已设置为使能状态、且指定类型的存储设备对应的指定互连链路发生改变的情况下,重启服务器。
在一个示例性实施例中,上述装置还包括:
第五执行单元,被设置为在重启服务器之前,将历史变量更新为当前变量,并保存更新的历史变量。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本申请的实施例还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述非易失性可读存储介质可以包括但不限于:U盘、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的非易失性可读存储介质。
本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本实施例中的可选示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
本申请的实施例还提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。
本申请的实施例还提供了另一种计算机程序产品,包括非易失性可读存储介质,非易失性可读存储介质存储计算机程序,计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。
本中请的实施例还提供了一种计算机程序,该计算机程序包括计算机指令,该计算机指令存储在非易失性可读存储介质中;计算机设备的处理器从非易失性可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述任一项方法实施例中的步骤。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上仅为本申请的可选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种互连链路的控制方法,其特征在于,
    应用于服务器,所述服务器包括服务器主板,所述服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连;
    所述方法包括:
    从目标存储设备的指定配置空间内读取出所述目标存储设备的第一设备信息,其中,所述目标存储设备为通过一条所述指定互连链路连接到所述服务器主板上的目标处理器的存储设备,所述第一设备信息用于指示所述目标存储设备的设备类型;
    在根据所述第一设备信息确定所述目标存储设备为所述指定类型的存储设备的情况下,获取所述目标存储设备的第二设备信息,其中,所述第二设备信息用于指示所述目标存储设备与所述目标处理器相连所使用的所述指定互连链路;
    将所述第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,所述VMD功能与所述指定类型的存储设备匹配。
  2. 根据权利要求1所述的方法,其特征在于,
    所述指定互连链路为外围设备互连PCI链路,所述指定配置空间为PCI配置空间,通过所述PCI链路与所述服务器主板上的处理器相连的设备为PCI设备;
    所述从目标存储设备的指定配置空间内读取出所述目标存储设备的第一设备信息,包括:
    从所述目标存储设备的所述PCI配置空间读取出指定信息类型的配置信息,得到所述第一设备信息,其中,所述指定信息类型包括以下至少之一:类型,子类型,消息类型。
  3. 根据权利要求2所述的方法,其特征在于,
    所述指定类型的存储设备为非易失性内存主机控制器接口规范NVME硬盘;
    在所述从目标存储设备的指定配置空间内读取出所述目标存储设备的第一设备信息之后,所述方法还包括:
    按照所述指定信息类型将所述第一设备信息与所述NVME硬盘的硬盘信息进行匹配,以判定所述目标存储设备是否为所述NVME硬盘。
  4. 根据权利要求1所述的方法,其特征在于,
    所述指定互连链路为外围设备互连PCI链路,通过所述PCI链路与所述服务器主板上的处理器相连的设备为PCI设备;
    所述在根据所述第一设备信息确定所述目标存储设备为所述指定类型的存储设备的情况下,获取所述目标存储设备的第二设备信息,包括:
    在根据所述第一设备信息确定所述目标存储设备为所述指定类型的存储设备的情况下,获取所述目标存储设备的一组设备号;
    将所述目标存储设备的一组设备号中的所述目标存储设备的PCI总线编号以及所述目标存储设备的PCI设备编号,确定为所述第二设备信息。
  5. 根据权利要求4所述的方法,其特征在于,
    所述在根据所述第一设备信息确定所述目标存储设备为所述指定类型的存储设备的情况下,获取所述目标存储设备的一组设备号,包括:
    查看所述目标存储设备的PCI设备驱动程序中所述目标存储设备的所述一组设备号,其中,所述一组设备号包括与所述目标存储设备对应的段号、所述目标存储设备的PCI总线编号、所述目标存储设备的PCI设备编号以及所述目标存储设备的PCI功能编号。
  6. 根据权利要求1所述的方法,其特征在于,
    所述指定互连链路包括外围设备互连PCI链路,所述目标互连链路包含第一PCI桥链路、目标PCI总线以及第二PCI桥链路,所述目标处理器通过所述第一PCI桥链路与所述目标PCI总线相连,所述目标存储设备通过所述第二PCI桥链路与所述目标PCI总线相连,所述第二设备信息包括所述目标存储设备的PCI总线编号和所述目标存储设备的PCI设备编号;
    在所述获取所述目标存储设备的第二设备信息之后,所述方法还包括:
    基于所述目标存储设备的所述PCI总线编号确定与所述目标存储设备对应的处理器槽位号和与所述目标存储设备对应的PCI总线端口号,其中,与所述目标存储设备对应的处理器槽位号用于指示所述目标处理器以及所述目标处理器上与所述第一PCI桥链路对应的处理器槽位,与所述目标存储设备对应的PCI总线端口号用于指示所述目标PCI总线;
    基于所述目标存储设备的所述PCI设备编号,确定所述第二PCI桥链路的带宽拆分信息,其中,所述第二PCI桥链路的带宽拆分信息用于指示从所述目标PCI总线的带宽中拆分给所述第二PCI桥链路的带宽,以指示所述目标PCI总线上所述目标存储设备的位置;
    其中,所述目标互连链路通过与所述目标存储设备对应的处理器槽位号、与所述目标存储设备对应的PCI总线端口号和所述第二PCI桥链路的带宽拆分信息进行表示。
  7. 根据权利要求6所述的方法,其特征在于,
    所述服务器主板上的一个处理器的所述PCI总线编号的编号范围是基于所述服务器主板上的处理器的总数量设置的;
    所述PCI设备编号用于指示所述服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的所述PCI设备编号至少部分不同。
  8. 根据权利要求7所述的方法,其特征在于,
    在所述PCI总线编号的总数为256,并且所述服务器主板上的所述处理器的总数量为2的情况下,一个所述处理器的所述PCI总线编号的编号范围为大于或者等于0H且小于80H,另一个处理器的PCI总线编号的编号范围为大于或者等于80H且小于或者等于100H,其中,所述编号范围是十六进制。
  9. 根据权利要求7所述的方法,其特征在于,
    所述PCI设备编号用于指示所述服务器对应的PCI链路的带宽的带宽类型,不同带宽类型对应的所述PCI设备编号至少部分不同;
    所述PCI链路的带宽是16位带宽,所述16位带宽允许拆分为4个4位带宽或者2个8位带宽;
    在所述PCI设备编号是0、1、2、3的情况下,所述PCI链路的带宽的带宽类型为所述4个4位带宽;
    在所述PCI设备编号是0、2的情况下,所述PCI链路的带宽的带宽类型为所述2个8位带宽。
  10. 根据权利要求1至7中任一项所述的方法,其特征在于,
    所述方法还包括:
    在所述服务器上电启动的情况下,通过基本输入输出系统依次枚举通过所述指定互连链路与所述服务器主板上的处理器连接的设备,以识别枚举到的设备中的所述指定类型的存储设备,并将识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能设置为使能状态;
    在识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能均已设置为使能状态、且所述指定类型的存储设备对应的所述指定互连链路均未发生改变的情况下,控制所述基本输入输出系统正常启动,并进入所述服务器的操作系统。
  11. 根据权利要求10所述的方法,其特征在于,
    在所述通过基本输入输出系统依次枚举通过所述指定互连链路与所述服务器主板上的处理器连接的设备之后,所述方法还包括:
    将与所述服务器主板上的处理器相连的所有所述指定互连链路的所述VMD功能的设置值组合为指定位数的变量,得到当前变量;
    通过比较所述当前变量和历史变量,确定所述指定类型的存储设备对应的所述指定互连链路是否均未发生改变,其中,在所述服务器不是首次启动的情况下,所述历史变量为所述服务器上一次启动时,与所述服务器主板上的处理器相连的所有所述指定互连链路的所述VMD功能的设置值组合为的指定位数的变量,在所述服务器首次启动的情况下,所述历史变量为默认变量。
  12. 根据权利要求11所述的方法,其特征在于,
    与所述服务器主板上的处理器相连的一个所述指定互连链路对应于所述指定位数的变量中的一个比特位;
    所述将与所述服务器主板上的处理器相连的所有所述指定互连链路的所述VMD功能的设置值组合为指定位数的变量,得到当前变量,包括:
    按照所述指定互连链路在所述指定位数的变量中对应的比特位的顺序,将与所述服务器主板上的处理器相连的所述指定互连链路的所述VMD功能的设置值组合成所述当前变量。
  13. 根据权利要求11所述的方法,其特征在于,
    所述通过比较所述当前变量和历史变量,确定所述指定类型的存储设备对应的所述指定互连链路是否均未发生改变,包括:
    在所述当前变量和历史变量相同的情况下,确定所述指定类型的存储设备对应的所述指定互连链路均未发生改变;
    在所述当前变量和历史变量不相同的情况下,确定所述指定类型的存储设备对应的所述指定互连链路至少部分发生改变。
  14. 根据权利要求11所述的方法,其特征在于,
    在所述通过基本输入输出系统依次枚举通过所述指定互连链路与所述服务器主板上的处理器连接的设备之后,所述方法还包括:
    在识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能均已设置为使能状态、且所述指定类型的存储设备对应的所述指定互连链路发生改变的情况下,重启所述服务器。
  15. 根据权利要求14所述的方法,其特征在于,
    在所述重启所述服务器之前,所述方法还包括:
    将所述历史变量更新为所述当前变量,并保存更新的所述历史变量。
  16. 根据权利要求14所述的方法,其特征在于,
    所述在识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能均已设置为使能状态、且所述指定类型的存储设备对应的所述指定互连链路发生改变的情况下,重启所述服务器,包括:
    在识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能均已设置为使能状态、且所述指定类型的存储设备对应的所述指定互连链路存在新增的情况下,重启所述服务器;或者
    在识别到的所述指定类型的存储设备对应的所述指定互连链路的所述VMD功能均已设置为使能状态、且所述指定类型的存储设备对应的所述指定互连链路存在移除的情况下,重启所述服务器。
  17. 一种互连链路的控制装置,其特征在于,
    应用于服务器,所述服务器包括服务器主板,所述服务器主板上的处理器允许通过指定互连链路与指定类型的存储设备相连;
    所述装置包括:
    读取单元,被设置为从目标存储设备的指定配置空间内读取出所述目标存储设备的第一设备信息,其中,所述目标存储设备为通过一条所述指定互连链路连接到所述服务器主板上的目标处理器的存储设备,所述第一设备信息用于指示所述目标存储设备的设备类型;
    获取单元,被设置为在根据所述第一设备信息确定所述目标存储设备为所述指定类型的存储设备的情况下,获取所述目标存储设备的第二设备信息,其中,所述第二设备信息用于指示所述目标存储设备与所述目标处理器相连所使用的所述指定互连链路;
    设置单元,被设置为将所述第二设备信息所指示的目标互连链路的卷管理设备VMD功能设置为使能状态,其中,所述VMD功能与所述指定类型的存储设备匹配。
  18. 一种非易失性可读存储介质,其特征在于,
    所述非易失性可读存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至16中任一项所述方法的步骤。
  19. 一种电子设备,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,
    所述处理器执行所述计算机程序时实现权利要求1至16中任一项所述方法的步骤。
  20. 一种计算机程序产品,包括计算机程序,其特征在于,
    所述计算机程序被处理器执行时实现权利要求1至16中任一项所述方法的步骤。
PCT/CN2024/137919 2024-03-29 2024-12-09 互连链路的控制方法及装置、非易失性可读存储介质及电子设备 Pending WO2025200577A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410376240.5 2024-03-29
CN202410376240.5A CN117971741B (zh) 2024-03-29 2024-03-29 互连链路的控制方法及装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2025200577A1 true WO2025200577A1 (zh) 2025-10-02

Family

ID=90864886

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/137919 Pending WO2025200577A1 (zh) 2024-03-29 2024-12-09 互连链路的控制方法及装置、非易失性可读存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN117971741B (zh)
WO (1) WO2025200577A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121455857A (zh) * 2026-01-05 2026-02-03 苏州元脑智能科技有限公司 一种输入输出集线器串口硬盘的区分方法及电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971741B (zh) * 2024-03-29 2024-05-28 苏州元脑智能科技有限公司 互连链路的控制方法及装置、存储介质及电子设备
CN118245292B (zh) * 2024-05-28 2024-08-09 苏州元脑智能科技有限公司 服务器的重启方法、装置、存储介质及服务器

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377231A (zh) * 2019-07-12 2019-10-25 苏州浪潮智能科技有限公司 一种vmd控制方法、装置、电子设备和可读存储介质
CN114138351A (zh) * 2021-11-18 2022-03-04 苏州浪潮智能科技有限公司 一种vmd功能自启动方法、系统及装置
CN115407941A (zh) * 2022-08-26 2022-11-29 苏州浪潮智能科技有限公司 一种vmd功能启动方法及其相关组件
US20230315668A1 (en) * 2022-03-29 2023-10-05 Fulian Precision Electronics (Tianjin) Co., Ltd. Method, system, and server for monitoring status of solid state drive
CN117971741A (zh) * 2024-03-29 2024-05-03 苏州元脑智能科技有限公司 互连链路的控制方法及装置、存储介质及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562163B2 (en) * 2006-08-18 2009-07-14 International Business Machines Corporation Apparatus and method to locate a storage device disposed in a data storage system
WO2013126053A1 (en) * 2012-02-22 2013-08-29 Hewlett-Packard Development Company, L.P. Multiplexer for signals according to different protocols
EP3367289A1 (en) * 2017-02-27 2018-08-29 Nokia Solutions and Networks Oy Internet connection setup between computing devices using blockchains
CN109992530A (zh) * 2019-03-01 2019-07-09 晶天电子(深圳)有限公司 一种固态驱动器设备及基于该固态驱动器的数据读写方法
CN115562588B (zh) * 2022-10-19 2024-10-08 中科可控信息产业有限公司 虚拟磁盘阵列配置方法、装置、计算机设备及存储介质
CN116909494B (zh) * 2023-09-12 2024-01-26 苏州浪潮智能科技有限公司 服务器的存储切换方法和装置,以及服务器系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377231A (zh) * 2019-07-12 2019-10-25 苏州浪潮智能科技有限公司 一种vmd控制方法、装置、电子设备和可读存储介质
CN114138351A (zh) * 2021-11-18 2022-03-04 苏州浪潮智能科技有限公司 一种vmd功能自启动方法、系统及装置
US20230315668A1 (en) * 2022-03-29 2023-10-05 Fulian Precision Electronics (Tianjin) Co., Ltd. Method, system, and server for monitoring status of solid state drive
CN115407941A (zh) * 2022-08-26 2022-11-29 苏州浪潮智能科技有限公司 一种vmd功能启动方法及其相关组件
CN117971741A (zh) * 2024-03-29 2024-05-03 苏州元脑智能科技有限公司 互连链路的控制方法及装置、存储介质及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121455857A (zh) * 2026-01-05 2026-02-03 苏州元脑智能科技有限公司 一种输入输出集线器串口硬盘的区分方法及电子设备
CN121455857B (zh) * 2026-01-05 2026-04-21 苏州元脑智能科技有限公司 一种输入输出集线器串口硬盘的区分方法及电子设备

Also Published As

Publication number Publication date
CN117971741A (zh) 2024-05-03
CN117971741B (zh) 2024-05-28

Similar Documents

Publication Publication Date Title
WO2025200577A1 (zh) 互连链路的控制方法及装置、非易失性可读存储介质及电子设备
US10031736B2 (en) Automatic system software installation on boot
US8943302B2 (en) Method of flashing bios using service processor and computer system using the same
US9298470B2 (en) Method and apparatus for selecting bios program for a processor
US9542201B2 (en) Network bios management
US9710284B1 (en) System for programmably configuring a motherboard
US11106457B1 (en) Updating firmware runtime components
CN103412769A (zh) 外接卡参数配置方法、设备以及系统
WO2018076792A1 (zh) 一种arm设备中磁盘管理的方法、装置和arm设备
CN110297726B (zh) 具有串行存在检测数据的计算机系统及内存模块控制方法
CN103733180A (zh) 服务器的控制方法和服务器的控制设备
CN101593120A (zh) 带外升级方法和系统
CN106325903A (zh) 启动处理方法及装置
CN119861985B (zh) 服务器的启动方法、设备、存储介质及程序产品
CN119336682A (zh) 执行热移除操作的方法、热插拔系统、设备、介质及产品
CN118132458A (zh) Mmio地址资源分配方法、装置、计算设备和存储介质
CN115291957B (zh) 多处理器主板的初始化方法和装置
US11586536B1 (en) Remote configuration of multi-mode DIMMs through a baseboard management controller
US11204704B1 (en) Updating multi-mode DIMM inventory data maintained by a baseboard management controller
US10628309B1 (en) Loading a serial presence detect table according to jumper settings
US11169740B1 (en) Simultaneous initiation of multiple commands for configuring multi-mode DIMMS using a BMC
CN118626123A (zh) 一种基板管理控制器固件升级方法和装置
CN112445534A (zh) 一种软件兼容方法、装置和设备
US11354109B1 (en) Firmware updates using updated firmware files in a dedicated firmware volume
WO2022199622A1 (zh) 一种电子设备的启动程序的运行方法和电子设备

Legal Events

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

Ref document number: 24931480

Country of ref document: EP

Kind code of ref document: A1