CN113448903A - PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card - Google Patents

PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card Download PDF

Info

Publication number
CN113448903A
CN113448903A CN202110559406.3A CN202110559406A CN113448903A CN 113448903 A CN113448903 A CN 113448903A CN 202110559406 A CN202110559406 A CN 202110559406A CN 113448903 A CN113448903 A CN 113448903A
Authority
CN
China
Prior art keywords
pcie
nvme
bandwidth
expansion card
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.)
Granted
Application number
CN202110559406.3A
Other languages
Chinese (zh)
Other versions
CN113448903B (en
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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110559406.3A priority Critical patent/CN113448903B/en
Publication of CN113448903A publication Critical patent/CN113448903A/en
Application granted granted Critical
Publication of CN113448903B publication Critical patent/CN113448903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/4004Coupling between buses
    • G06F13/4009Coupling between buses with data restructuring
    • G06F13/4018Coupling between buses with data restructuring with data-width conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0026PCI express

Abstract

The invention discloses a PCIe bandwidth adjusting method, a device, equipment and a storage medium for an NVMe expansion card. The method comprises the following steps: detecting whether a PCIe device exists when the bootstrap program enters a PCIe check stage; in response to detecting the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device; and in response to the fact that the type of the PCIe device belongs to the storage device, modifying PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card. The scheme of the invention solves the problem that some servers can switch the bandwidth only by burning the BIOS, and manual setting is not needed in the BIOS, so that the bandwidth adaptation is automatically carried out according to the number of the memory cards on the NVMe expansion card, the flexibility is better, and the production and debugging cost is obviously reduced.

Description

PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card
Technical Field
The invention relates to the technical field of storage device expansion, in particular to a PCIe bandwidth adjusting method, a device, equipment and a storage medium for an NVMe expansion card.
Background
The NVMe expansion cards are storage function expansion cards or adapter cards inserted into PCIe interfaces, and many NVMe expansion cards are currently on the market to expand the number of NVMe storage card devices, for example, Riser cards, and two NVMe memory cards or four NVMe memory cards may be arranged on one card; usually, NVMe expansion cards are connected by PCIe (Peripheral Component Interconnect express), but in order to access all NVMe memory cards on the NVMe expansion cards, it is necessary to match appropriate PCIe bandwidth for the NVMe expansion cards.
At present, the conventional configuration method of the PCIe bandwidth of the NVMe expansion card is to enter the BIOS to manually set and update the BIOS, and in addition, the function that the BIOS does not provide the modification option requires to burn the BIOS program in a certain default bandwidth manner, for example, the default BIOS uses any one of the bandwidths PCIe x16, PCIe x8, or PCIe x 4. However, the above two methods have the following disadvantages: (1) for the situation of providing PCIe bandwidth modification options, manual modification needs to be carried out in the BIOS, and operators are required to be familiar with the setting of the BIOS; (2) the flexibility is poor in a default bandwidth mode, when the specification of the NVMe expansion card needs to be changed, the BIOS program needs to be burnt again, the process is complicated, the flexibility is poor, and therefore improvement is needed urgently.
Disclosure of Invention
In view of the foregoing, there is a need to provide a method, an apparatus, a device and a storage medium for adjusting PCIe bandwidth of an NVMe expansion card, which are more flexible and convenient and can automatically switch PCIe bandwidth.
According to a first aspect of the present invention, there is provided a PCIe bandwidth adjustment method for an NVMe expansion card, the method including:
detecting whether a PCIe device exists when the bootstrap program enters a PCIe check stage;
in response to detecting the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device;
and in response to the fact that the type of the PCIe device belongs to the storage device, modifying PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
and in response to the number of the NVMe storage cards read with the use bandwidth of four PCIe x4 being 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is two.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
in response to the number of the NVMe memory cards read with the use bandwidth of four PCIe x4 being 4, the NVMe expansion card PCIe bandwidth configuration is ended.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
In one embodiment, the method further comprises:
and in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
In one embodiment, the method further comprises:
in response to not detecting the PCIe device or the type of the PCIe device does not belong to the storage device, continuing to execute the bootstrap program.
According to a second aspect of the present invention, there is provided an NVMe expansion card PCIe bandwidth adjustment apparatus, including:
the first detection module is used for detecting whether PCIe equipment exists or not when the bootstrap program enters a PCIe check stage;
the second detection module is used for detecting the type of the PCIe equipment and judging whether the PCIe equipment belongs to the storage equipment or not when the PCIe equipment is detected;
and the PCIe bandwidth modification module is used for modifying the PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card when the type of the PCIe device belongs to the storage device.
According to a third aspect of the present invention, there is also provided a computer apparatus comprising:
at least one processor; and
the memory stores a computer program which can run on the processor, and the processor executes the NVMe expansion card PCIe bandwidth adjusting method when executing the program.
According to the fourth aspect of the present invention, a computer-readable storage medium is further provided, where a computer program is stored, and when executed by a processor, the computer program executes the aforementioned PCIe bandwidth adjustment method for the NVMe expansion card.
According to the method for adjusting the PCIe bandwidth of the NVMe expansion card, whether PCIe equipment exists or not is detected when a bootstrap program enters a PCIe check stage, the type of the PCIe equipment is detected when the PCIe equipment is detected, whether the PCIe equipment belongs to storage equipment is judged, if the type of the PCIe equipment belongs to the storage equipment, the PCIe bandwidth of the PCIe equipment in a BIOS program is modified to adapt to the number of NVMe storage cards on the NVMe expansion card, the problem that some servers need to burn the BIOS to achieve bandwidth switching is solved, manual setting does not need to enter the BIOS, automatic bandwidth adaptation according to the number of the storage cards on the NVMe expansion card is achieved, better flexibility is achieved, and production and debugging cost is remarkably reduced.
In addition, the invention also provides a PCIe bandwidth adjusting device, a computer device, and a computer readable storage medium for the NVMe expansion card, which can also achieve the above technical effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for adjusting PCIe bandwidth of an NVMe expansion card according to an embodiment of the present invention;
fig. 2 is a complete PCIe bandwidth configuration flow of a NVMe expansion card according to another embodiment of the present invention;
fig. 3 is a schematic mechanism diagram of a PCIe bandwidth adjustment apparatus for an NVMe expansion card according to another embodiment of the present invention;
fig. 4 is an internal structural view of a computer device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In an embodiment, please refer to fig. 1, where the present invention provides a PCIe bandwidth adjustment method for NVMe expansion cards, the method includes the following steps:
s100, detecting whether PCIe equipment exists or not when the bootstrap program enters a PCIe inspection stage;
s200, in response to the detection of the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device;
s300, responding to the fact that the type of the PCIe device belongs to the storage device, and adapting the number of the NVMe storage cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program.
According to the method for adjusting the PCIe bandwidth of the NVMe expansion card, whether PCIe equipment exists or not is detected when a bootstrap program enters a PCIe check stage, the type of the PCIe equipment is detected when the PCIe equipment is detected, whether the PCIe equipment belongs to storage equipment is judged, if the type of the PCIe equipment belongs to the storage equipment, the PCIe bandwidth of the PCIe equipment in a BIOS program is modified to adapt to the number of NVMe storage cards on the NVMe expansion card, the problem that some servers need to burn the BIOS to achieve bandwidth switching is solved, manual setting does not need to enter the BIOS, automatic bandwidth adaptation according to the number of the storage cards on the NVMe expansion card is achieved, better flexibility is achieved, and production and debugging cost is remarkably reduced.
The hardware environment of the present invention is briefly described below, in which PCI-express (peripheral component interconnect express) is a high-speed serial computer expansion bus standard, originally named "3 GIO", proposed by intel in 2001, intended to replace the old PCI, PCI-X and AGP bus standards. PCIe belongs to high-speed serial point-to-point double-channel high-bandwidth transmission, connected devices distribute independent channel bandwidth and do not share bus bandwidth, and the PCIe mainly supports functions of active power management, error reporting, end-to-end reliable transmission, hot plug, quality of service (QOS) and the like. PCIe is renamed to PCI-Express, which is called PCI-e for short, after being authenticated and issued by PCI-SIG (PCI Special interest group). Its main advantages are high data transmission rate and high development potential. PCI Express also has a variety of specifications, from PCI Express x1 to PCI Express x32, that meet the demands of low-speed devices and high-speed devices that will emerge in the future for a certain time. The PCI-Express interface is a PCIe 3.0 interface, has a bit rate of 8Gbps, which is about twice the bandwidth of the previous generation products, and includes a series of important new functions, such as transmitter and receiver equalization, PLL improvement, and clock data recovery, to improve data transmission and data protection performance. PCIe has many improvements over previous standards, including higher maximum system bus throughput, lower I/O pin count and smaller physical size, better scaling of bus device performance, more detailed error detection and reporting mechanisms (advanced error reporting, AER) and native hot plug functionality. Newer versions of the PCIe standard provide hardware support for I/O virtualization.
The PCI Express electrical interface is also used in various other standards, most notably ExpressCard as a notebook expansion card interface and SATA Express as a computer storage interface. The PCI Express 2.0 specification has made significant upgrades in data transmission speed, from a previous doubling of 2.5GT/s bus frequency to 5GT/s, which means that the PCI Express 2.0x16 interface was able to double to a surprising 8GB/s bus bandwidth (1GB/s to 8 Gbps). PCI-E3.0 is the latest standard for expansion cards that are available in mainstream personal computers in production. There is also PCI-E (i.e., version 1.0) that has not yet been released from the market. Whereas the AMD RD890 chipset released in the second quarter of 2009 will first support PCI-E version 3.0. The 2.0 is improved by one time compared with the 1.0 bandwidth, and the 3.0 is improved by one time compared with the 2.0 version bandwidth, which is 5GHz x 4.
NVM Express is an open collection of standards and information to fully demonstrate the advantages of non-volatile memory in all types of computing environments from mobile devices to data centers. NVMe is designed from scratch to provide high bandwidth and low latency memory access for current and future NVM technologies. NVM Express is a register interface and command set for PCI Express attached storage, as well as industry standard software applicable to a variety of operating systems. NVMe is widely recognized as a de facto industry standard for pci esds. NVMe management interface-command set and architecture for out-of-band management of NVM Express storage (e.g., using BMC discovery, monitoring and updating NVMe devices). The extension of NVMe-NVM Express in the architecture can tunnel the NVM Express command set by other transmission modes except PCIe. NVMe over Fabric extends the advantages of large scale efficient storage architectures in the largest data centers worldwide by allowing the same protocol to be extended over a variety of network interfaces.
In some embodiments, when the method further comprises: when it is determined that the number of NVMe memory cards on the NVMe expansion card is two, the foregoing step S300 specifically includes the following substeps:
S310A, configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
S320A, in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
S330A, in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe equipment in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
S340A, in response to the fact that the number of the NVMe storage cards read by using the bandwidth of four PCIe x4 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
In some embodiments, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is two.
In some embodiments, when the number of NVMe memory cards on the NVMe extension card is four, the foregoing step S300 specifically includes the following sub-steps:
S310B, configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
S320B, in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
S330B, in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe equipment in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
S340B, in response to that the number of NVMe memory cards read with the use bandwidth of four PCIe x4 is 4, ending the NVMe expansion card PCIe bandwidth configuration.
In some embodiments, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
In some embodiments, the method further comprises:
and S400, in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
In some embodiments, the method further comprises:
s500, in response to the fact that the PCIe device is not detected or the type of the PCIe device does not belong to the storage device, the bootstrap program is continuously executed.
In another embodiment, please refer to fig. 2, in order to facilitate understanding of the technical solution of the present invention, a Riser card on a server is described below, where two NVMe memory cards, denoted as memory card 1 and memory card 2, are inserted into the Riser card, and the bandwidth adjusting method for the Riser card includes the following steps:
step one, a server system where the Riser card is located enters a boot program;
step two, when the boot program boot is executed to a PCIe check stage (namely a tracing stage), whether PCIE equipment exists is detected, if so, step three is executed, and if not, step six is executed
Step three, at this time, obtaining the class code of each PCIe device to determine the device type and continuously executing the step four;
step four, judging whether the type of the Riser card belongs to the storage device, if so, executing the step four, otherwise, executing the step six
Step four, if the type of the Riser card belongs to the storage device, firstly adopting the BISO default bandwidth PCIe x16, when one of the storage cards is read, for example, the storage card 1 is read now, modifying the bandwidth of the Riser card in the BIOS program into two PCIe x8, then reading the number of the storage cards again, if the number of the storage cards is increased, reading the storage card 1 and the storage card 2, modifying the bandwidth of the Riser card in the BIOS program into four PCIe x4 at the moment, then reading the number of the storage cards again, because only two storage cards are arranged on the Riser card, a new storage card can not be detected any more, at the moment, the bandwidth setting can be completed by modifying the bandwidth of the Riser card in the BIOS program into two PCIe x8, and then continuing to execute the step six.
And step six, continuing to execute other phases of the boot program boot.
It should be noted that, in the case that the NVMe expansion card is inserted into four memory cards, different from the case that two memory cards are expanded, in the step four, when the bandwidth of the expansion card in the BIOS program is modified to be four PCIe x4, the four memory cards can be found, and at this time, it is not necessary to continue to modify the bandwidth setting and directly end the bandwidth setting to execute the step six.
The method of the invention, in the stage that BIOS starts up each time and executes the check aiming at the PCIe equipment, at this stage we judge whether the PCIe equipment is the storage equipment aiming at the obtained PCIe type, if it is the bandwidth switching of PCIe, and after switching BIOS each time, judge whether there is the additional NVME memory card again, when the last stage of executing x4x4x4x4, the program is left, thus realizing that NVME expansion cards with different specifications can adapt to the proper PCIe bandwidth without entering the BIOS for modification, the whole process completely realizes the automatic bandwidth switching without human intervention, and the universality of expansion cards with different specifications is enabled.
According to another aspect of the present invention, please refer to fig. 3, the present invention further provides a PCIe bandwidth adjusting apparatus 60 for NVMe expansion cards, specifically, the apparatus includes:
the first detection module 61 is used for detecting whether the PCIe equipment exists when the bootstrap program enters a PCIe check stage;
the second detection module 62 is configured to, when detecting a PCIe device, detect the type of the PCIe device and determine whether the PCIe device belongs to a storage device;
a PCIe bandwidth modifying module 63, configured to modify, if the type of the PCIe device belongs to the storage device, the PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of NVMe memory cards on the NVMe expansion card.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
and in response to the number of the NVMe storage cards read with the use bandwidth of four PCIe x4 being 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is two.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
in response to the number of the NVMe memory cards read with the use bandwidth of four PCIe x4 being 4, the NVMe expansion card PCIe bandwidth configuration is ended.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
In one embodiment, the apparatus further comprises a subsequent boot module configured to:
and in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
In one embodiment, the subsequent boot module is further configured to:
in response to not detecting the PCIe device or the type of the PCIe device does not belong to the storage device, continuing to execute the bootstrap program.
According to the PCIe bandwidth adjusting device for the NVMe expansion card, whether PCIe equipment exists or not is detected when a bootstrap program enters a PCIe check stage, the type of the PCIe equipment is detected when the PCIe equipment is detected, whether the PCIe equipment belongs to storage equipment is judged, if the type of the PCIe equipment belongs to the storage equipment, the PCIe bandwidth of the PCIe equipment in a BIOS program is modified to adapt to the number of NVMe storage cards on the NVMe expansion card, the problem that some servers need to burn the BIOS to achieve bandwidth switching is solved, manual setting does not need to enter the BIOS, automatic bandwidth adaptation according to the number of the storage cards on the NVMe expansion card is achieved, better flexibility is achieved, and production debugging cost is remarkably reduced.
It should be noted that, for specific limitations of the NVMe expansion card PCIe bandwidth adjustment apparatus, refer to the above limitations of the NVMe expansion card PCIe bandwidth adjustment method, and details are not described here again. The modules in the NVMe expansion card PCIe bandwidth adjustment apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
According to another aspect of the present invention, a computer device is provided, and the computer device may be a server, and its internal structure is shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. When being executed by a processor, the computer program realizes the PCIe bandwidth adjustment method of the NVMe expansion card, and specifically comprises the following steps:
detecting whether a PCIe device exists when the bootstrap program enters a PCIe check stage;
in response to detecting the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device;
and in response to the fact that the type of the PCIe device belongs to the storage device, modifying PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
and in response to the number of the NVMe storage cards read with the use bandwidth of four PCIe x4 being 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is two.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
in response to the number of the NVMe memory cards read with the use bandwidth of four PCIe x4 being 4, the NVMe expansion card PCIe bandwidth configuration is ended.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
In one embodiment, the steps further comprise:
and in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
In one embodiment, the method further comprises:
in response to not detecting the PCIe device or the type of the PCIe device does not belong to the storage device, continuing to execute the bootstrap program.
According to another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, executes the aforementioned PCIe bandwidth adjustment method for the NVMe expansion card. Specifically, the method comprises the following steps:
detecting whether a PCIe device exists when the bootstrap program enters a PCIe check stage;
in response to detecting the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device;
and in response to the fact that the type of the PCIe device belongs to the storage device, modifying PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is two.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
and in response to the number of the NVMe storage cards read with the use bandwidth of four PCIe x4 being 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
In one embodiment, the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
In one embodiment, in response to the type of the PCIe device belonging to the storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program includes:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
in response to the number of the NVMe memory cards read with the use bandwidth of four PCIe x4 being 4, the NVMe expansion card PCIe bandwidth configuration is ended.
In one embodiment, the steps further comprise:
and in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
In one embodiment, the method further comprises:
in response to not detecting the PCIe device or the type of the PCIe device does not belong to the storage device, continuing to execute the bootstrap program.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A PCIe bandwidth adjustment method of an NVMe expansion card is characterized by comprising the following steps:
detecting whether a PCIe device exists when the bootstrap program enters a PCIe check stage;
in response to detecting the PCIe device, detecting the type of the PCIe device and judging whether the PCIe device belongs to the storage device;
and in response to the fact that the type of the PCIe device belongs to the storage device, modifying PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card.
2. The method for adjusting the PCIe bandwidth of the NVMe expansion card of claim 1, wherein in response to the type of the PCIe device belonging to a storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program comprises:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
and in response to the number of the NVMe storage cards read with the use bandwidth of four PCIe x4 being 2, modifying the bandwidth of the PCIe devices in the BIOS program into two PCIe x8, and ending the configuration of the PCIe bandwidth of the NVMe expansion card.
3. The NVMe expansion card PCIe bandwidth adjustment method of claim 2, further comprising:
confirming that the number of the storage devices on the NVMe expansion card is two.
4. The method for adjusting the PCIe bandwidth of the NVMe expansion card of claim 1, wherein in response to the type of the PCIe device belonging to a storage device, the step of adapting the number of NVMe memory cards on the NVMe expansion card by modifying the PCIe bandwidth of the PCIe device in the BIOS program comprises:
configuring the PCIe device to use a BIOS default bandwidth PCIe x16, and detecting the number of read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by the use bandwidth of PCIe x16 is 1, modifying the bandwidth of the PCIe equipment in the BIOS program into two PCIe x8 and detecting the number of the read NVMe storage cards;
in response to the fact that the number of the NVMe storage cards read by using the bandwidth of two PCIe x8 is 2, modifying the bandwidth of the PCIe devices in the BIOS program into four PCIe x4 and detecting the number of the read NVMe storage cards;
in response to the number of the NVMe memory cards read with the use bandwidth of four PCIe x4 being 4, the NVMe expansion card PCIe bandwidth configuration is ended.
5. The NVMe expansion card PCIe bandwidth adjustment method of claim 4, further comprising:
confirming that the method further comprises: confirming that the number of the NVMe storage cards on the NVMe expansion card is four.
6. The NVMe expansion card PCIe bandwidth adjustment method according to claim 2 or 4, further comprising:
and in response to ending the PCIe bandwidth configuration of the NVMe expansion card, continuing to execute the bootstrap program.
7. The NVMe expansion card PCIe bandwidth adjustment method according to any one of claims 1-5, further comprising:
in response to not detecting the PCIe device or the type of the PCIe device does not belong to the storage device, continuing to execute the bootstrap program.
8. An apparatus for adjusting PCIe bandwidth of NVMe expansion card, the apparatus comprising:
the first detection module is used for detecting whether PCIe equipment exists or not when the bootstrap program enters a PCIe check stage;
the second detection module is used for detecting the type of the PCIe equipment and judging whether the PCIe equipment belongs to the storage equipment or not when the PCIe equipment is detected;
and the PCIe bandwidth modification module is used for modifying the PCIe bandwidth of the PCIe device in the BIOS program to adapt to the number of the NVMe storage cards on the NVMe expansion card when the type of the PCIe device belongs to the storage device.
9. A computer device, comprising:
at least one processor; and
a memory storing a computer program executable in the processor, the processor executing the program to perform the NVMe expansion card PCIe bandwidth adjustment method according to any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to perform the method for adjusting the PCIe bandwidth of the NVMe expansion card according to any one of claims 1 to 7.
CN202110559406.3A 2021-05-21 2021-05-21 PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card Active CN113448903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110559406.3A CN113448903B (en) 2021-05-21 2021-05-21 PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110559406.3A CN113448903B (en) 2021-05-21 2021-05-21 PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card

Publications (2)

Publication Number Publication Date
CN113448903A true CN113448903A (en) 2021-09-28
CN113448903B CN113448903B (en) 2023-02-28

Family

ID=77810017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110559406.3A Active CN113448903B (en) 2021-05-21 2021-05-21 PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card

Country Status (1)

Country Link
CN (1) CN113448903B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185720A (en) * 2022-02-17 2022-03-15 浪潮(山东)计算机科技有限公司 Method, device, equipment and storage medium for server dynamic hot backup

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110040916A1 (en) * 2009-08-12 2011-02-17 International Business Machines Corporation System reconfiguration of expansion cards
CN103098039A (en) * 2012-10-17 2013-05-08 华为技术有限公司 High-speed peripheral-device interconnected-bus port configuration method and apparatus
US20150347345A1 (en) * 2014-04-30 2015-12-03 Cirrascale Corporation Gen3 pci-express riser
CN105302755A (en) * 2014-06-27 2016-02-03 曙光信息产业(北京)有限公司 PCIE board card with monitoring function and monitoring method therefor
CN105930161A (en) * 2016-04-22 2016-09-07 浪潮电子信息产业股份有限公司 Method for automatically adjusting option values of BIOS
CN106951383A (en) * 2017-04-19 2017-07-14 深圳市同泰怡信息技术有限公司 The mainboard and method of a kind of raising PCIE data channel utilization rates
US20180165244A1 (en) * 2016-12-14 2018-06-14 Dell Products, L.P. CONFIGURABLE PCIe BANDWIDTH UTILIZATION BETWEEN PCI RISER AND OTHER INTERNAL FUNCTIONS
US10198205B1 (en) * 2016-12-19 2019-02-05 Pure Storage, Inc. Dynamically adjusting a number of storage devices utilized to simultaneously service write operations
CN109856473A (en) * 2018-12-14 2019-06-07 中国人民解放军战略支援部队航天工程大学 String signal self-identifying test method when a kind of changeable channel
CN109933554A (en) * 2019-03-20 2019-06-25 浪潮商用机器有限公司 A kind of NVMe hard disk expansion apparatus based on GPU server
CN111159085A (en) * 2019-12-30 2020-05-15 苏州浪潮智能科技有限公司 Automatic configuration method of PCIE (peripheral component interface express) bandwidth, server mainboard and server
CN111723037A (en) * 2020-06-19 2020-09-29 浪潮电子信息产业股份有限公司 PCIE interface extension system and server
CN111752871A (en) * 2020-05-29 2020-10-09 苏州浪潮智能科技有限公司 PCIE equipment, device and method for realizing compatibility of same PCIE slot position with different PCIE bandwidths
CN111984489A (en) * 2020-09-27 2020-11-24 苏州浪潮智能科技有限公司 Cable transmission negotiation method, device and related components
CN111988196A (en) * 2020-07-21 2020-11-24 中国长城科技集团股份有限公司 Bandwidth detection method and device, electronic equipment and storage medium
CN112015687A (en) * 2020-08-14 2020-12-01 苏州浪潮智能科技有限公司 Mainboard structure for automatically distributing PCIE (peripheral component interface express) bandwidth and method thereof
CN112181505A (en) * 2020-09-27 2021-01-05 苏州浪潮智能科技有限公司 PCIe bandwidth allocation method, device and medium supporting multi-host server
CN112631664A (en) * 2020-12-25 2021-04-09 曙光信息产业股份有限公司 Signal distribution method and device, computer equipment and readable storage medium
CN112685347A (en) * 2020-12-31 2021-04-20 西安易朴通讯技术有限公司 Compatible method and device for PCIE (peripheral component interface express) equipment with different bandwidths and server
CN112737836A (en) * 2020-12-26 2021-04-30 苏州浪潮智能科技有限公司 Bandwidth allocation method, device and equipment for PCIe external plug-in card and storage medium
CN112783571A (en) * 2021-01-22 2021-05-11 苏州浪潮智能科技有限公司 PCIE resource distribution system and method

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110040916A1 (en) * 2009-08-12 2011-02-17 International Business Machines Corporation System reconfiguration of expansion cards
CN103098039A (en) * 2012-10-17 2013-05-08 华为技术有限公司 High-speed peripheral-device interconnected-bus port configuration method and apparatus
US20150347345A1 (en) * 2014-04-30 2015-12-03 Cirrascale Corporation Gen3 pci-express riser
CN105302755A (en) * 2014-06-27 2016-02-03 曙光信息产业(北京)有限公司 PCIE board card with monitoring function and monitoring method therefor
CN105930161A (en) * 2016-04-22 2016-09-07 浪潮电子信息产业股份有限公司 Method for automatically adjusting option values of BIOS
US20180165244A1 (en) * 2016-12-14 2018-06-14 Dell Products, L.P. CONFIGURABLE PCIe BANDWIDTH UTILIZATION BETWEEN PCI RISER AND OTHER INTERNAL FUNCTIONS
US10198205B1 (en) * 2016-12-19 2019-02-05 Pure Storage, Inc. Dynamically adjusting a number of storage devices utilized to simultaneously service write operations
CN106951383A (en) * 2017-04-19 2017-07-14 深圳市同泰怡信息技术有限公司 The mainboard and method of a kind of raising PCIE data channel utilization rates
CN109856473A (en) * 2018-12-14 2019-06-07 中国人民解放军战略支援部队航天工程大学 String signal self-identifying test method when a kind of changeable channel
CN109933554A (en) * 2019-03-20 2019-06-25 浪潮商用机器有限公司 A kind of NVMe hard disk expansion apparatus based on GPU server
CN111159085A (en) * 2019-12-30 2020-05-15 苏州浪潮智能科技有限公司 Automatic configuration method of PCIE (peripheral component interface express) bandwidth, server mainboard and server
CN111752871A (en) * 2020-05-29 2020-10-09 苏州浪潮智能科技有限公司 PCIE equipment, device and method for realizing compatibility of same PCIE slot position with different PCIE bandwidths
CN111723037A (en) * 2020-06-19 2020-09-29 浪潮电子信息产业股份有限公司 PCIE interface extension system and server
CN111988196A (en) * 2020-07-21 2020-11-24 中国长城科技集团股份有限公司 Bandwidth detection method and device, electronic equipment and storage medium
CN112015687A (en) * 2020-08-14 2020-12-01 苏州浪潮智能科技有限公司 Mainboard structure for automatically distributing PCIE (peripheral component interface express) bandwidth and method thereof
CN111984489A (en) * 2020-09-27 2020-11-24 苏州浪潮智能科技有限公司 Cable transmission negotiation method, device and related components
CN112181505A (en) * 2020-09-27 2021-01-05 苏州浪潮智能科技有限公司 PCIe bandwidth allocation method, device and medium supporting multi-host server
CN112631664A (en) * 2020-12-25 2021-04-09 曙光信息产业股份有限公司 Signal distribution method and device, computer equipment and readable storage medium
CN112737836A (en) * 2020-12-26 2021-04-30 苏州浪潮智能科技有限公司 Bandwidth allocation method, device and equipment for PCIe external plug-in card and storage medium
CN112685347A (en) * 2020-12-31 2021-04-20 西安易朴通讯技术有限公司 Compatible method and device for PCIE (peripheral component interface express) equipment with different bandwidths and server
CN112783571A (en) * 2021-01-22 2021-05-11 苏州浪潮智能科技有限公司 PCIE resource distribution system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185720A (en) * 2022-02-17 2022-03-15 浪潮(山东)计算机科技有限公司 Method, device, equipment and storage medium for server dynamic hot backup
CN114185720B (en) * 2022-02-17 2022-05-10 浪潮(山东)计算机科技有限公司 Method, device, equipment and storage medium for dynamic hot backup of server

Also Published As

Publication number Publication date
CN113448903B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN105354070B (en) A method of passing through I2C updating apparatus firmware
CN113688087B (en) PCIE (peripheral component interface express) device enumeration method, system, storage medium and device
US9846625B2 (en) Method and device for debugging a MIPS-structure CPU with southbridge and northbridge chipsets
CN107168829B (en) Method and system for ensuring safe and reliable operation of double BIOS of server system
CN105814541A (en) Computer device and memory starting method for computer device
WO2011029385A1 (en) Method, system and processor for loading logic devices online
CN113448903B (en) PCIe bandwidth adjustment method, device, equipment and storage medium for NVMe expansion card
CN112015477B (en) PCIE link splitting method, system and expansion device
CN104077166A (en) EPCS and EPCQ storer online upgrading method based on IP core in FPGA
CN114116378A (en) Method, system, terminal and storage medium for acquiring PCIe device temperature
CN111159090B (en) Information processing method and device and electronic equipment
CN110209605B (en) Register read-write method of PCIE bus network card and computing equipment
CN111026421A (en) Upgrading device
US6904484B1 (en) Low pin count (LPC) firmware hub recovery
CN114201360A (en) AER function management method, device, server and storage medium
US11836501B1 (en) System and methods for hardware-based PCIe link up based on post silicon characterization
CN107908418B (en) Method for upgrading logic program of fiber channel node card and fiber channel bus equipment
US20220413962A1 (en) Detecting and recovering a corrupted non-volatile random-access memory
CN108153548A (en) A kind of EMMC firmware upgrade methods and device
CN113867812B (en) Method, system, equipment and medium for BMC to acquire link information
CN113821265B (en) Operating system control method and device, computer mainboard and readable storage medium
CN115981971A (en) Lighting method of server hard disk and server
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN114116027A (en) Method, system, terminal and storage medium for automatically installing drive for PCIE equipment
US11023244B2 (en) System, apparatus and method for recovering link state during link training

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant