DATA PROCESSING METHOD AND APPARATUS, PCI-E BUS SYSTEM, AND SERVER

Information

  • Patent Application
  • 20130238871
  • Publication Number
    20130238871
  • Date Filed
    April 26, 2013
    11 years ago
  • Date Published
    September 12, 2013
    11 years ago
Abstract
A data processing method and apparatus, a PCI-E bus system, and a server are provided. The method includes: configuring address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; and controlling a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data. thus a problem that in the prior art, because the PCI-E device stores the data received by the PCI-E device in a memory of the CPU, when the data stored in the memory of the CPU is accessed by another CPU, a part of a bandwidth of a bus between the another CPU and the CPU is occupied and a bus through which the CPU accesses the memory that corresponds the CPU is occupied can be avoided, thereby improving a utilization rate of the CPU.
Description
TECHNICAL FIELD

Embodiments of the present invention relate to communications technologies, and particularly, to a data processing method and apparatus, an expansion peripheral component interconnect express (Peripheral Component Interconnect Express, referred to as PCI-E) bus system, and a server.


BACKGROUND

Generally, a server may include a plurality of central processing units (Central Processing Unit referred to as CPU), and each of the CPUs is interconnected in the form of a bus, where a CPU may be connected to a device, that is, a PCI-E device, through a PCI-E bus system. The PCI-E device stores data received by the PCI-E device in a memory of the CPU according to obtained address information of the memory of the CPU.


However, when another CPU needs to access the data, it needs to access the data stored in the memory, through a bus between another CPU and the CPU that corresponds to the memory that stores the received data, and a bus between the CPU and the memory that corresponds to the CPU. Therefore, a part of a bandwidth of the bus between another CPU and the CPU is occupied, and a bus through which the CPU accesses the memory that corresponds the CPU is occupied, thereby reducing a utilization rate of the CPU.


SUMMARY

Embodiments of the present invent ion provide a data processing method and apparatus, a PCI-E bus system, and a server, so as to improve a utilization rate of a CPU.


In one aspect, an embodiment of the present invention provides a data processing method, including:


configuring address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; and


controlling a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data.


In another aspect, an embodiment of the present invention provides a data processing apparatus, including:


a configuring unit, configured to configure address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; and


a controlling unit, configured to control a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data.


In another aspect, an embodiment of the present invention provides a PCI-E bus system, including a PCI-E memory and the foregoing data processing apparatus, where the PCI-E memory is configured to store data received by the PCI-E device.


In another aspect, an embodiment of the present invention provides a server, including a CPU and the foregoing PCI-E bus system, where the CPU is configured to access the data stored in the PCI-E memory, and process the data.


It can be seen from the foregoing technical solutions, in the embodiments of the present invention, the address information of the PCI-E memory of the PCI-E device is configured, so that after the PCI-E device stores the data received by the PCI-E device in the PCI-E memory, the CPU can be controlled to access the data stored in the PCI-E memory. This can avoid a problem that in the prior art, because the PCI-E device stores the data received by the PCI-E in a memory of the CPU, when the data stored in the memory of the CPU is accessed by another CPU, a part of a bandwidth of a bus between the another CPU and the CPU is occupied and a bus through which the CPU accesses the memory that corresponds the CPU is occupied, thereby improving a utilization rate of the CPU.





BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the accompanying drawings required for describing the embodiments or the prior art are briefly introduced in the following. Evidently, the accompanying drawings in the following description are some embodiments of the present invention, and persons of ordinary skill in the art may also obtain other drawings according to these accompanying drawings without creative efforts.



FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention;



FIG. 2 is a schematic structural diagram of a PCI-E bus system involved in an embodiment corresponding to FIG. 1;



FIG. 3 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present invention;



FIG. 4 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present invention;



FIG. 5 is a schematic structural diagram of a PCI-E bus system according to another embodiment of the present invention; and



FIG. 6 is a schematic structural diagram of a server according to another embodiment of the present invention.





DETAILED DESCRIPTION

In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely in the following with reference to the accompanying drawings in the embodiments of the present invention. Evidently, the embodiments to be described are only a part rather than all of the embodiments of the present invention. Based on the embodiments of the present invention, other embodiments that are obtained by persons of ordinary skill in the art without creative efforts all fall within the protection scope of the present invention.



FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention. As shown in FIG. 1, the data processing method in this embodiment may include:



101: Configure address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory.



102: Control a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data.


An executor of 101 and 102 may be an operating system.


Further, before 102, the operating system may also determine the CPU that is used for accessing the data by pre-specifying the CPU (for example, a main CPU) that is used for accessing the data stored in the PCI-E memory. For a specific determining method, reference may be made to relevant contents in the prior art, which is not repeated here.


Optionally, in 102, the determined CPU may be specifically controlled to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory.


Optionally, in 102, the data stored in the PCI-E memory may be specifically copied into a memory of the determined CPU, and the determined CPU may be controlled to access the data stored in the memory of the determined CPU.


Optionally, the PCI-E memory maybe located on a PCI-E bus, that is, the PCI-E memory may be set in front of a switch (Switch). Optionally, the PCI-E memory may also be connected to the PCI-E bus, that is, the PCI-E memory maybe similar to a PCI-E device and behind the switch (Switch), and maybe connected to the CPU through a bus.


In this embodiment, the address information of the PCI-E memory of the PCI-E device is configured, so that after the PCI-E device stores the data received by the PCI-E device in the PCI-E memory, the CPU can be controlled to access the data stored in the PCI-E memory. This can avoid a problem that in the prior art, because the PCI-E device stores the data received by the PCI-E device in a memory of the CPU, when the data stored in the memory of the CPU is accessed by another CPU, a part of a bandwidth of a bus between the another CPU and the CPU is occupied and a bus through which the CPU accesses the memory that corresponds the CPU is occupied, thereby improving a utilization rate of the CPU.


To make the method provided in this embodiment of the present invention clearer, a PCI-E bus system as shown in FIG. 2 is taken as an example in the following. In the PCI-E bus system as shown in FIG. 2, a CPU 1 is connected to a CPU 2 through a quick path interconnect (Quick Path Interconnect, referred to as QPI) bus; the CPU 1 and the CPU 2 are connected to an input output hub (Input Output Hub, referred to as IOH) through the QPI bus; the IOH is connected to a switch (Switch) through a root complex (Root Complex); and the switch (Switch) is connected to a PCI-E device 1, a PCI-E device 2, and a PCI-E memory. First, an operating system running on the CPU 1 and an operating system running on the CPU 2 configure address information of a PCI-E memory of the PCI-E device 1 and address information of a PCI-E memory of the PCI-E device 2, so that the PCI-E device 1 or the PCI-E device 2 stores data received by the PCI-E device 2 in the PCI-E memory. Then, the operating system controls the CPU 1 to access the data stored in the PCI-E memory, so that the CPU 1 processes the data. The CPU 1 may further transfer information through the QPI bus between the CPU 1 and the CPU 2 at the same time when the CPU 1 accesses the data stored in the PCI-E memory. The CPU 1 does not occupy a bandwidth of the QPI bus between the CPU 1 and the CPU 2 when accessing the data stored in the PCI-E memory. In addition, the CPU 2 may also access other data stored in its corresponding memory at the same time when the CPU 1 accesses the data stored in the PCI-E memory, thereby improving utilization rates of the CPU 1 and the CPU 2.


It should be noted that, for simple description, the foregoing method embodiments are expressed as a series of actions. But those skilled in the art should know that the present invention is not limited to an order of described actions, because according to the present invention, some steps may be performed in another order or be performed simultaneously. Next, those skilled in the art should also know that all the embodiments described in the specification are exemplary embodiments, and that involved actions and modules are not necessarily required in the present invention.


In the foregoing embodiments, the description of each embodiment has its emphasis, and for a part that is not detailed in a certain embodiment, reference maybe made to the relevant description of another embodiment.



FIG. 3 is a schematic structural diagram of a data processing apparatus according to another embodiment of the present invention. As shown in FIG. 3, a data processing apparatus 3 in this embodiment may include a configuring unit 31 and a controlling unit 32. The configuring unit 31 is configured to configure address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; and the controlling unit 32 is configured to control a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data.


The method in the foregoing embodiment corresponding to FIG. 1 may be implemented by the data processing apparatus provided in this embodiment.


Further, as shown in FIG. 4, a data processing apparatus 4 in this embodiment may further include a determining unit 41, configured to determine the CPU that is used for accessing the data by pre-specifying the CPU that is used for accessing the data stored in the PCI-E memory, so that the controlling unit 32 controls the CPU determined by the determining unit 41 to access the data stored in the PCI-E memory.


Optionally, the controlling unit 32 in this embodiment may specifically control the CPU to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory.


Optionally, the controlling unit 32 in this embodiment may also specifically copy the data stored in the PCI-E memory into a memory of the CPU, and control the CPU to access the data stored in the memory of the CPU.


Optionally, the PCI-E memory may be located on a PCI-E bus, that is, the PCI-E memory may be set in front of a switch (Switch). Optionally, the PCI-E memory may also be connected to the PCI-E bus, that is, the PCI-E memory may be similar to a PCI-E device and behind the switch (Switch), and may be connected to the CPU through a bus.


In this embodiment, the address information of the PCI-E memory of the PCI-E device is configured by the configuring unit, so that after the PCI-E device stores the data received by the PCI-E device in the PCI-E memory, the controlling unit can control the CPU to access the data stored in the PCI-E memory. This can avoid a problem that in the prior art, because the PCI-E device stores the data received by the PCI-E device in a memory of the CPU, when the data stored in the memory of the CPU is accessed by another CPU, a part of a bandwidth of a bus between the another CPU and the CPU is occupied and a bus through which the CPU accesses the memory that corresponds the CPU is occupied, thereby improving a utilization rate of the CPU.



FIG. 5 is a schematic structural diagram of a PCI-E bus system 5 according to another embodiment of the present invention. As shown in FIG. 5, the PCI-E bus system in this embodiment may include a PCI-E memory 51, and a data processing apparatus 52 provided in the embodiment corresponding to FIG. 3 or FIG. 4, where the PCI-E memory 51 is configured to store data received by the PCI-E device.



FIG. 6 is a schematic structural diagram of a server 6 according to another embodiment of the present invention. As shown in FIG. 6, the server in this embodiment may include a CPU 61, and a PCI-E bus system 62 provided in the embodiment corresponding to FIG. 5, where the CPU 61 is configured to access the data stored in the PCI-E memory, and process the data.


Those skilled in the art may clearly understand that, to describe conveniently and simply, for specific working processes of the system, the apparatus, and the unit described in the foregoing, reference may be made to corresponding processes in the foregoing method embodiments, which are not repeated here.


In several embodiments of the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the apparatus embodiments described in the following are only exemplary, for example, the unit division is only logic function division, and there may be other division ways during practical implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or may not be executed. In addition, the shown or discussed mutual couplings or direct couplings or communication connections maybe implemented through some interfaces. Indirect couplings or communication connections between apparatuses or units may be electrical, mechanical, or in other forms.


The units described as separated parts may or may not be physically separated from each other, and the parts shown as units may or may not be physical units, that is, they may be located at the same place, and may also be distributed to multiple network elements. A part or all of the units may be selected according to an actual requirement to achieve the objectives of the solutions in the embodiments.


In addition, function units in the embodiments of the present invention may be integrated into a processing unit, each of the units may also exist separately and physically, and two or more units may also be integrated into one unit. The integrated unit maybe implemented in the form of hardware, and may also be implemented in the form of a software function unit.


If the integrated unit is implemented in the form of a software function unit and is sold or used as an independent product, it may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention essentially, or the part contributing to the prior art, or all or a part of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device, and so on.) to execute all or a part of steps of the methods described in the embodiments of the present invention. The storage medium includes: any medium that is capable of storing program codes, such as a USE-disk, a removable hard disk, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a magnetic disk, or an optical disk.

Claims
  • 1. A data processing method, comprising: configuring address information of a Peripheral Component Interconnect Express (PCI-E) memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; andcontrolling a Central Processing Unit (CPU) to access the data stored in the PCI-E memory, so that the CPU processes the data.
  • 2. The method according to claim 1, wherein before controlling the CPU to access the data stored in the PCI-E memory, the method comprises: determining the CPU that is used for accessing the data by pre-specifying the CPU that is used for accessing the data stored in the PCI-E memory.
  • 3. The method according to claim 1, wherein controlling the CPU to access the data stored in the PCI-E memory comprises: controlling the CPU to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory; orcopying the data stored in the PCI-E memory into a memory of the CPU, and controlling the CPU to access the data stored in the memory of the CPU.
  • 4. The method according to claim 1, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
  • 5. The method according to any one of claim 3, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
  • 6. A data processing apparatus, comprising: a configuring unit, configured to configure address information of a PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; anda controlling unit, configured to control a CPU to access the data stored in the PCI-E memory, so that the CPU processes the data.
  • 7. The apparatus according to claim 6, further comprising: a determining unit, configured to: determine the CPU that is used for accessing the data by pre-specifying the CPU that is used for accessing the data stored in the PCI-E memory, so that the controlling unit controls the determined CPU to access the data stored in the PCI-E memory.
  • 8. The apparatus according to claim 6, wherein the controlling unit is configured to: control the CPU to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory; orcopy the data stored in the PCI-E memory into a memory of the CPU, and control the CPU to access the data stored in the memory of the CPU.
  • 9. The apparatus according to claim 6, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
  • 10. The apparatus according to claim 8, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
  • 11. A PCI-E bus system, comprising: a Peripheral Component Interconnect Express (PCI-E) memory;a processor programmed to: configure address information of the PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; andcontrol a Central Processing Unit (CPU) to access the data stored, in the PCI-E memory, so that the CPU processes the data; andwherein the data received by the PCI-E device is stored in the PCI-E memory.
  • 12. The system according to claim 11, wherein the processor is programmed to: configure the address information of the PCI-E memory of the PCI-E device, so that the PCI-E device stores the data received by the PCI-E device in the PCI-E memory; andcontrol the CPU to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory, so that the CPU processes the data.
  • 13. The system according to claim 11, wherein the processor is programmed to: configure the address information of the PCI-E memory of the PCI-E device, so that the PCI-E device stores the data received by the PCI-E device in the PCI-E memory; andcopy the data stored in the PCI-E memory into a memory of the CPU, and control the CPU to access the data stored in the memory of the CPU, so that the CPU processes the data.
  • 14. The system according to claim 11, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
  • 15. A server, comprising: a Central Processing Unit (CPU); anda Peripheral Component Interconnect Express (PCI-E) bus system, wherein the PCI-E bus system comprises: a Peripheral Component Interconnect Express (PCI-E) memory,a processor programmed to: configure address information of the PCI-E memory of a PCI-E device, so that the PCI-E device stores data received by the PCI-E device in the PCI-E memory; and control a Central Processing Unit (CPU) to access the data stored in the PCI-E memory, so that the CPU processes the data, andwherein the data received by the PCI-E device is stored in the PCI-E memory and wherein the CPU is configured to access the data stored in the PCI-E memory, and process the data.
  • 16. The server according to claim 15, wherein the processor is programmed to: configure the address information of the PCI-E memory of the PCI-E device, so that the PCI-E device stores the data received by the PCI-E device in the PCI-E memory; andcontrol the CPU to access, according to the address information of the PCI-E memory, the data stored in the PCI-E memory, so that the CPU processes the data.
  • 17. The server according to claim 15, wherein the processor is programmed to: configure the address information of the PCI-E memory of the PCI-E device, so that the PCI-E device stores the data received by the PCI-E device in the PCI-E memory; andcopy the data stored in the PCI-E memory into a memory of the CPU, and control the CPU to access the data stored in the memory of the CPU, so that the CPU processes the data.
  • 18. The server according to claim 15, wherein the PCI-E memory is located on a PCI-E bus or connected to the PCI-E bus.
Priority Claims (1)
Number Date Country Kind
201110185059.9 Jul 2011 CN national
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No. PCT/CN2011/083754, filed on Dec. 9, 2011, which claims priority to Chinese Patent Application No. 201110185059.9, filed on Jul. 4, 2011, both of which are hereby incorporated by reference in their entireties.

Continuations (1)
Number Date Country
Parent PCT/CN2011/083754 Dec 2012 US
Child 13871596 US