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.
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.
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.
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.
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.
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
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.
The method in the foregoing embodiment corresponding to
Further, as shown in
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.
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.
Number | Date | Country | Kind |
---|---|---|---|
201110185059.9 | Jul 2011 | CN | national |
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.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2011/083754 | Dec 2012 | US |
Child | 13871596 | US |