CN102231126B - Method and system for implementing inter-core backup in multi-core processor - Google Patents

Method and system for implementing inter-core backup in multi-core processor Download PDF

Info

Publication number
CN102231126B
CN102231126B CN 201110213973 CN201110213973A CN102231126B CN 102231126 B CN102231126 B CN 102231126B CN 201110213973 CN201110213973 CN 201110213973 CN 201110213973 A CN201110213973 A CN 201110213973A CN 102231126 B CN102231126 B CN 102231126B
Authority
CN
China
Prior art keywords
core
data
service processing
channel
identifier
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.)
Active
Application number
CN 201110213973
Other languages
Chinese (zh)
Other versions
CN102231126A (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN 201110213973 priority Critical patent/CN102231126B/en
Publication of CN102231126A publication Critical patent/CN102231126A/en
Application granted granted Critical
Publication of CN102231126B publication Critical patent/CN102231126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a system for implementing inter-core backup in a multi-core processor to implement inter-core backup among a plurality of service processing cores in the multi-core processor so as to transmit services of a failure service processing core to a service processing core in backup with the failure service processing core for processing when the service processing core fails and improve the failure recovery speed. The multi-core processor comprises a control core, one or more data transmitting cores, at least two service processing cores and a data output core,wherein the control core is used for transmitting data transmission control information to the data transmitting cores when the failure service processing core is determined; the one or more data transmitting cores are used for transmitting a plurality of data packets to be transmitted to the failure service processing core to a plurality of service processing cores which are backup cores with the failure service processing core according to the data transmission control information; the at least two service processing cores are used for processing the data packets transmitted by the data transmitting cores; and the data output core is used for outputting the received data packets.

Description

Method and system for realizing internuclear backup in multi-core processor
Technical Field
The present invention relates to the field of communications, and in particular, to a method and system for implementing inter-core backup in a multi-core processor.
Background
At present, because of strong processing capability of a multi-core processor, the multi-core processor is more and more widely applied to communication equipment, but the existing multi-core processor cannot realize inter-core backup (inter-core backup refers to that a plurality of cores completing the same function in the multi-core processor are mutually backup cores), so when a single core fails, the whole multi-core processor needs to be reset to perform fault recovery, and by adopting the fault recovery mode, a long time is consumed, so that the system reliability can be reduced.
The multi-core processor in the prior art has the following technical defects:
(1) when a single core in the multi-core processor fails, the multi-core processor CPU needs to be reset to realize failure recovery, and long time needs to be consumed;
(2) the multi-core processor does not follow a certain software architecture during software development, and the increase of the inter-core backup function in the later period is difficult.
Disclosure of Invention
In view of the above technical problems in the prior art, embodiments of the present invention provide a method and a system for implementing inter-core backup in a multi-core processor, so as to implement inter-core backup of multiple service processing cores in the multi-core processor, so that when one of the service processing cores fails, a service of the failed service processing core is distributed to a service processing core that is backed up with the failed service processing core, so as to overcome a problem in the prior art that a failure recovery time is long due to the need to start up a whole multiple processors when the service processing core fails.
A system for realizing internuclear backup in a multi-core processor comprises a control core, a data distribution core, at least two service processing cores and a data output core, wherein:
the control core is used for sending data distribution control information to the data distribution core when the fault service processing core is determined;
the data distribution core is used for distributing a plurality of data packets to be sent to the fault service processing core to one or more of a plurality of service processing cores which are backup cores with the fault service processing core according to the data distribution control information when the data distribution control information is received;
the service processing core is used for processing the data packet distributed by the data distribution core and then outputting the data packet to the data output core;
a data output core for outputting the received data packet, and any one of the control core, the data distribution core, the at least two service processing cores and the data output core is further configured to,
when the system is initialized, selecting one FIFO from a set first-in first-out (FIFO) pool, and determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected FIFO; or,
when the system is initialized, a group of hardware channels are selected from the set hardware channel pool, and channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core are determined from channel resources corresponding to the selected group of hardware channels.
Preferably, the control core determines the failed service processing core, and the specific application is as follows:
when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
or, monitoring the service processing core by adopting a heartbeat mechanism, and determining that the service processing core is a fault service processing core when the heartbeat information reported by the service processing core is not received when a set time threshold value is reached.
Preferably, the control core is further configured to, after determining the failed service processing core, reset the failed service processing core, and send service recovery control information to the data distribution core;
the data distribution core is further configured to recover the data service of the reset failed service processing core according to the received service recovery control information.
Preferably, the channel resources corresponding to each data channel for performing data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core are determined from the selected channel resources corresponding to the FIFO, and the specific application is as follows:
for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected group of hardware channels, wherein the specific application is as follows:
for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
Preferably, when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, the data distribution core is specifically configured to: and sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core.
The embodiment of the invention also provides a method for realizing backup among a plurality of processor cores, which comprises the following steps:
when the control core determines the fault service processing core, the control core sends data distribution control information to the data distribution core;
when the data distribution core receives the data distribution control information, distributing a plurality of data packets to be sent to the fault service processing core to one or more of a plurality of service processing cores which are backup cores with the fault service processing core according to the data distribution control information;
after the service processing core processes the data packet distributed by the data distribution core, the data packet is output to the data output core;
the data output core outputs the received data packet, and any one of the control core, the data distribution core, the at least two service processing cores and the data output core performs the following operations:
when the system is initialized, selecting one FIFO from a set first-in first-out (FIFO) pool, and determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected FIFO; or,
when the system is initialized, a group of hardware channels are selected from the set hardware channel pool, and channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core are determined from channel resources corresponding to the selected group of hardware channels.
Preferably, the determining, by the control core, the failed service processing core specifically includes:
when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
or, monitoring the service processing core by adopting a heartbeat mechanism, and determining that the service processing core is a fault service processing core when the heartbeat information reported by the service processing core is not received when a set time threshold value is reached.
Preferably, the method further comprises: after determining the fault service processing core, the control core resets the fault service processing core and sends service recovery control information to the data distribution core;
and the data distribution core recovers the data service of the reset fault service processing core according to the received service recovery control information.
Preferably, the determining, from the selected channel resources corresponding to the FIFO, the channel resources corresponding to each data channel through which data interaction is performed between the control core, the data distribution core, the at least two service processing cores, and the data output core includes:
for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
the determining, from the channel resources corresponding to the selected group of hardware channels, channel resources corresponding to each data channel for performing data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core includes:
for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
Preferably, when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, the distributing the plurality of data packets of the faulty service processing core by the data distributing core includes: and sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core.
In the embodiment of the invention, on one hand, at least two service processing cores are arranged in a multi-core processor system, when one service processing core is in failure, a data distribution core can distribute a data packet to be sent to the service processing core to one or more service processing cores which are backup cores for the service processing core, so that the service processing of the failed service processing core can be realized, and the rapid failure recovery can be realized without resetting the whole multi-core processor; on the other hand, a FIFO pool or a hardware channel pool is arranged, one FIFO or a group of hardware channels can be selected from the FIFO pool or the hardware channel pool before the system is initialized, and when channel resources corresponding to data channels for data interaction among multiple cores in the multi-core processor are determined from the channel resources corresponding to the selected FIFO or the group of hardware channels, a cuttable and high-bandwidth service data channel is realized; on the other hand, the control core determines whether each service processing core has a fault or not through an active detection or heartbeat detection mode, so that whether the service processing core has the fault or not is quickly and reliably detected, the fault recovery time is further shortened, and the fault recovery speed is increased.
Drawings
FIG. 1 is a schematic structural diagram of a multi-core processor for data processing in an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an inter-core backup system implemented in a multi-core processor according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for implementing a unified receive interface according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for implementing a unified transmit interface in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a specific implementation of an inter-core backup system in a multi-core processor provided in combination with an actual application in the embodiment of the present invention;
FIG. 6 is a flowchart of a method for implementing inter-core backup in a multi-core processor according to an embodiment of the present invention.
Detailed Description
To solve the above technical problems in the prior art, embodiments of the present invention provide a method and a system for implementing inter-core backup in a multi-core processor, so as to implement inter-core backup of multiple service processing cores in the multi-core processor, so that when one of the service processing cores fails, a service of the failed service processing core is distributed to a service processing core that is backed up with the failed service processing core, so as to overcome a problem that a failure recovery time is long due to the need to start up a whole multiple processors when the service processing core fails in the prior art, and the technical solution of the present invention is adopted to improve a speed and efficiency of failure recovery; the system for realizing the inter-core backup in the multi-core processor comprises a control core, a data distribution core, at least two service processing cores and a data output core, wherein: the control core is used for sending data distribution control information to the data distribution core when the fault service processing core is determined; the data distribution core is used for distributing a plurality of data packets to be sent to the fault service processing core to one or more of a plurality of service processing cores which are backup cores with the fault service processing core according to the data distribution control information when the data distribution control information is received; the service processing core is used for processing the data packet distributed by the data distribution core and then outputting the data packet to the data output core; and the data output core is used for outputting the received data packet.
The technical scheme of the invention is described in detail in the following with reference to the attached drawings of the specification.
Referring to fig. 1, a data processing model diagram of a multi-core processor in an embodiment of the present invention, the data processing model of the multi-core processor may be generalized to a service model, and in order to reduce processing complexity, the service model may be divided into a plurality of independent service blocks according to functional division, and each service block may further include a plurality of sub-service blocks connected in parallel or in series, specifically, as shown in fig. 1, the service model of the multi-core processor may be divided into a service block a, a service block B, a service block C, and a service block D, where the service block B is connected in parallel with the service block C, the service block C further includes a sub-service block C1 and a sub-service block C2, the service block B includes a sub-service block B1 and a sub-service block B2, and the service block D includes a sub-service block D1 and a sub-service block D2.
Preferably, in order to better perform service processing, in the embodiment of the present invention, when cores of a multi-core processor are deployed, sub-service blocks included in a service block are deployed on the same core.
Referring to fig. 2, which is a schematic structural diagram of a system for implementing inter-core backup in a multi-core processor in the embodiment of the present invention, the system may include a control core 21, a data distribution core 22, at least two service processing cores 23, and a data output core 24, where:
the control core 21 is configured to send data distribution control information to the data distribution core when the failed service processing core is determined;
the data distribution core 22 is configured to, when receiving the data distribution control information, distribute, according to the data distribution control information, the multiple data packets to be sent to the faulty service processing core to one or more of multiple service processing cores that are backup cores for each other with the faulty service processing core;
the service processing core 23 is configured to process the data packet distributed by the data distribution core and output the data packet to the data output core 24;
and a data output core 24 for outputting the received data packet.
Preferably, in order to quickly know whether the service processing core 23 fails, so as to perform failure recovery as soon as possible, in the embodiment of the present invention, the control core 21 may determine whether the service processing core 23 fails by using any one of the following manners:
mode 1, adopting an active detection mechanism, in this case, the service processing core 23 is implemented inside the sub-service block, and can check by adding redundant information in the key processing of the sub-service block; therefore, the control core 21 determines the failed service processing core, and the specific application is as follows: when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
mode 2, a heartbeat mechanism is adopted, in this case, by detecting heartbeat information of a sub-service block inside the service processing core 23 at regular time, when the heartbeat information reported by the service processing core 23 is not received after a set time threshold value is exceeded, it is determined that the service processing core 23 fails; therefore, the control core 21 monitors the service processing core by using a heartbeat mechanism, and determines that the service processing core is a failed service processing core when the heartbeat information reported by the service processing core is not received when the set time threshold is reached.
Preferably, the control core 21 is further configured to, after determining the failed service processing core, reset the failed service processing core, and send service recovery control information to the data distribution core;
the data distribution core 22 is further configured to recover the data service of the reset failed service processing core according to the received service recovery control information.
Preferably, a tailorable, high bandwidth service data channel is implemented, In the embodiment of the present invention, a plurality of cores In a multi-core processor may share a memory software FIFO (First In First Out) or a hardware channel; any one of the control core 21, the data distribution core 22, the service processing core 23, and the data output core 24 may perform the following operations:
when the system is initialized, one FIFO is selected from a preset FIFO pool, and channel resources corresponding to each data channel for performing data interaction among the control core 21, the data distribution core 22, the at least two service processing cores 23, and the data output core 24 are determined from channel resources corresponding to the selected FIFO, which may specifically be as follows: for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
or, when the system is initialized, a group of hardware channels is selected from the set hardware channel pool, and channel resources corresponding to each data channel for performing data interaction between the control core 21, the data distribution core 22, the at least two service processing cores 23, and the data output core 24 are determined from channel resources corresponding to the selected group of hardware channels, which may specifically be as follows: for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
In practical application, a data table configuration mode can be adopted to configure the corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifier, and the C language is adopted to describe the basic configuration elements of the data table as follows:
in the embodiment of the present invention, to better implement large bandwidth of service data, channel resources are automatically allocated to each service data channel from a software FIFO pool or a hardware channel pool, bottom layer implementation details are shielded, a uniform sending interface and a receiving interface are provided for upper layer applications, a uniform receiving interface is implemented as shown in fig. 3, and a uniform sending interface is implemented as shown in fig. 4.
Preferably, when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, the data distribution core is specifically configured to: sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core; if a plurality of data packets need to be IP recombined, the data packets which are IP recombined and have the same ID in the plurality of data packets are sent to one of the service processing cores which are the same as the fault backup core and the backup core each other
The following describes a method for implementing the receiving unified interface and the sending unified interface in detail.
Referring to fig. 3, a flowchart of a method for implementing a receive unified interface according to an embodiment of the present invention is shown, where the method includes:
step 301, when a data packet is to be received, acquiring a source core identifier of the data packet to be received and a destination core identifier of the data packet to be received.
Step 302, determining the channel resource identifier and the type thereof corresponding to the original identifier and the destination core identifier obtained in step 301 from the configured corresponding relationship between the source core identifier, the destination core identifier and the identifier of the channel resource.
Step 303, determining the type of the determined channel resource, and selecting a corresponding bottom layer receiving function to receive the data packet to be received.
And step 304, ending the flow.
Referring to fig. 4, a flowchart of a method for implementing sending a unified interface in the embodiment of the present invention is shown, where the method includes:
step 401, when a data packet to be transmitted exists, a source core identifier and a destination core identifier of the data packet to be transmitted are obtained.
Step 402, determining the channel resource identifier and the type thereof corresponding to the original identifier and the destination core identifier obtained in step 401 from the configured corresponding relationship between the source core identifier, the destination core identifier and the identifier of the channel resource.
Step 403, determining the type of the determined channel resource, and selecting a corresponding bottom layer transmission function to transmit the data packet to be transmitted.
And step 404, ending the flow.
Preferably, a flexible data distribution policy is implemented on the data distribution core 22, and the modification may be performed in real time, but for some special service requirements, when the data distribution core 22 distributes a plurality of data packets to be sent to the faulty service processing core, special processing needs to be performed, for example, when data reassembly needs to be performed on the plurality of data packets to be sent to the faulty service processing core, the data distribution core 22 is specifically configured to: and sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core.
Referring to fig. 5, a specific structure of a multi-core processor is provided for practical application in the embodiment of the present invention, where the multi-core processor includes a control core 51, a data distribution core 52, two service processing cores (represented by a first service processing core 53 and a second service processing core 54, respectively) that are backup cores for each other, and a data output core 55, where:
the control core 51 includes a reset control module 511 for performing reset control on the first service processing core 53 and the second service processing core 54, a heartbeat detection module 512 for performing heartbeat detection on the first service processing core 53 and the second service processing core 54, and a data distribution control module 513 for sending data distribution control information to the data distribution core 52 when it is determined that the first service processing core 53 or the second service processing core 54 fails;
the first traffic processing core 53 includes a service block 531, the service block 531 further includes a first sub-service block 531a and a second sub-service block 531b connected in series; the second traffic processing core 54 comprises a service block 541, the service block 541 further comprising a third sub-service block 541a and a fourth sub-service block 541b connected in series; and service block 531 functions identically to service block 541;
the data output core 55 includes a service block 551, the service block 551.
With the multi-core processor shown in fig. 5, when the heartbeat detection module 512 of the control core 51 detects that the first service processing core 53 or the second service processing core 54 fails, the reset control module 511 is started to reset the failed first service processing core 53 or the second service processing core 54, and the data distribution control module 513 sends data distribution control information to the data distribution core 52; when receiving the data distribution control information, the data distribution core 52 sends a plurality of data packets to be sent to the first service processing core 53 or the second service processing core 54 to the second service processing core 54 or the first service processing core 53 for processing, thereby implementing failure recovery.
Based on the multi-core processor, the embodiment of the invention also provides a central processing unit, and the central processing unit comprises the system for realizing the inter-core backup of the multi-core processor.
Based on the foregoing system for implementing inter-core backup in a multi-core processor, an embodiment of the present invention further provides a method for implementing inter-core backup in a multi-core processor, where a flow of the method is shown in fig. 6, and the method includes:
step 601, when determining the fault service processing core, the control core sends data distribution control information to the data distribution core.
Step 602, when receiving the data distribution control information, the data distribution core distributes, according to the data distribution control information, the multiple data packets to be sent to the faulty service processing core to one or more of multiple service processing cores that are backup cores for each other with the faulty service processing core.
And 603, after processing the data packet distributed by the data distribution core by the service processing core, outputting the data packet to the data output core.
And step 604, outputting the received data packet by the data output core.
Preferably, in step 601, the control core determines the failed service processing core, and the following method may be specifically adopted:
when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
or, monitoring the service processing core by adopting a heartbeat mechanism, and determining that the service processing core is a fault service processing core when the heartbeat information reported by the service processing core is not received when a set time threshold value is reached.
Preferably, the step 601 may further include the steps of: after determining the fault service processing core, the control core resets the fault service processing core and sends service recovery control information to the data distribution core;
and the data distribution core recovers the data service of the reset fault service processing core according to the received service recovery control information.
Preferably, before the step 601, the method further includes the steps of:
any one of the control core, the data distribution core, the at least two service processing cores and the data output core performs the following operations:
when the system is initialized, selecting one FIFO from a set first-in first-out (FIFO) pool, and determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected FIFO; or,
when the system is initialized, a group of hardware channels are selected from the set hardware channel pool, and channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core are determined from channel resources corresponding to the selected group of hardware channels.
Preferably, the determining, from the selected channel resources corresponding to the FIFO, the channel resources corresponding to each data channel through which data interaction is performed between the control core, the data distribution core, the at least two service processing cores, and the data output core includes:
for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
the determining, from the channel resources corresponding to the selected group of hardware channels, channel resources corresponding to each data channel for performing data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core includes:
for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
Preferably, when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, in step 602, the plurality of data packets to be sent to the faulty service processing core are sent to one of the service processing cores that is a backup core for the faulty service processing core; and if the IP recombination is required to be carried out on the plurality of data packets, sending the data packets which are subjected to the IP recombination and have the same ID to one of the service processing cores which are the same as the fault backup core and the backup core.
In the embodiment of the invention, on one hand, at least one service processing core is arranged in the multi-core processor system, when one service processing core is in fault, the data distribution core can distribute a data packet to be sent to the service processing core to one or more of the service processing cores which are backup cores for the service processing core, so that the service processing of the service processing core in fault can be realized, and the quick fault recovery can be realized without resetting the whole CPU; on the other hand, a FIFO pool or a hardware channel pool is arranged, one FIFO or a group of hardware channels can be selected from the FIFO pool or the hardware channel pool before the system is initialized, and when channel resources corresponding to data channels for data interaction among multiple cores in the multi-core processor are determined from the channel resources corresponding to the selected FIFO or the group of hardware channels, a cuttable and high-bandwidth service data channel is realized; on the other hand, the control core determines whether each service processing core has a fault or not through an active detection or heartbeat detection mode, so that whether the service processing core has the fault or not is quickly and reliably detected, the time delay of fault recovery is further shortened, and the speed of fault recovery is increased.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (11)

1. A system for realizing internuclear backup in a multi-core processor is characterized by comprising a control core, a data distribution core, at least two service processing cores and a data output core, wherein:
the control core is used for sending data distribution control information to the data distribution core when the fault service processing core is determined;
the data distribution core is used for distributing a plurality of data packets to be sent to the fault service processing core to one or more of a plurality of service processing cores which are backup cores with the fault service processing core according to the data distribution control information when the data distribution control information is received;
the service processing core is used for processing the data packet distributed by the data distribution core and then outputting the data packet to the data output core;
a data output core for outputting the received data packet, and any one of the control core, the data distribution core, the at least two service processing cores and the data output core is further configured to,
when the system is initialized, selecting one FIFO from a set first-in first-out (FIFO) pool, and determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected FIFO; or,
when the system is initialized, a group of hardware channels are selected from the set hardware channel pool, and channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core are determined from channel resources corresponding to the selected group of hardware channels.
2. The system of claim 1, wherein the control core determines the failed service processing core, and the specific application is:
when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
or, monitoring the service processing core by adopting a heartbeat mechanism, and determining that the service processing core is a fault service processing core when the heartbeat information reported by the service processing core is not received when a set time threshold value is reached.
3. The system of claim 2, wherein the control core is further configured to, after determining the failed traffic processing core, reset the failed traffic processing core and send traffic restoration control information to the data distribution core;
the data distribution core is further configured to recover the data service of the reset failed service processing core according to the received service recovery control information.
4. The system of claim 1, wherein the channel resources corresponding to each data channel for performing data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core are determined from the channel resources corresponding to the selected FIFO, and the specific application is as follows:
for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected group of hardware channels, wherein the specific application is as follows:
for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
5. The system according to any one of claims 1 to 4, wherein when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, the data distribution core is specifically configured to: and sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core.
6. A central processing unit CPU comprising the system of any one of claims 1 to 5.
7. A method for realizing backup among cores of a multi-core processor is characterized by comprising the following steps:
when the control core determines the fault service processing core, the control core sends data distribution control information to the data distribution core;
when the data distribution core receives the data distribution control information, distributing a plurality of data packets to be sent to the fault service processing core to one or more of a plurality of service processing cores which are backup cores with the fault service processing core according to the data distribution control information;
after the service processing core processes the data packet distributed by the data distribution core, the data packet is output to the data output core;
the data output core outputs the received data packet, and any one of the control core, the data distribution core, the at least two service processing cores and the data output core performs the following operations:
when the system is initialized, selecting one FIFO from a set first-in first-out (FIFO) pool, and determining channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core from the channel resources corresponding to the selected FIFO; or,
when the system is initialized, a group of hardware channels are selected from the set hardware channel pool, and channel resources corresponding to each data channel for data interaction among the control core, the data distribution core, the at least two service processing cores and the data output core are determined from channel resources corresponding to the selected group of hardware channels.
8. The method according to claim 7, wherein the determining, by the control core, the failed service processing core specifically includes:
when receiving a fault information notification message reported by a service processing core, determining that the service processing core is a fault service processing core, wherein the fault information notification message is a notification message reported when the service processing core determines that an unrecoverable error occurs after monitoring key resources and key states in the service processing core;
or, monitoring the service processing core by adopting a heartbeat mechanism, and determining that the service processing core is a fault service processing core when the heartbeat information reported by the service processing core is not received when a set time threshold value is reached.
9. The method of claim 8, further comprising:
after determining the fault service processing core, the control core resets the fault service processing core and sends service recovery control information to the data distribution core;
and the data distribution core recovers the data service of the reset fault service processing core according to the received service recovery control information.
10. The method of claim 7, wherein the determining, from the channel resources corresponding to the selected FIFOs, the channel resource corresponding to each data channel for data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core comprises:
for each data channel, determining channel resource identifiers corresponding to the source core identifier and the destination core identifier of the data channel from the set corresponding relationship of the source core identifier, the destination core identifier and the channel resource identifiers, and determining the channel resources corresponding to the determined channel resource identifiers as the channel resources of the data channel;
the determining, from the channel resources corresponding to the selected group of hardware channels, channel resources corresponding to each data channel for performing data interaction between the control core, the data distribution core, the at least two service processing cores, and the data output core includes:
for each data channel, determining a hardware channel resource identifier corresponding to a source core identifier and a destination core identifier of the data channel from a corresponding relationship of the set source core identifier, destination core identifier and hardware channel resource identifier, and determining a channel resource corresponding to the determined hardware channel resource identifier as a channel resource of the data channel.
11. The method according to any one of claims 7 to 10, wherein when data reassembly of a plurality of data packets to be sent to the faulty service processing core is required, the distributing of the plurality of data packets by the faulty service processing core by the data distributing core includes: and sending a plurality of data packets to be sent to the fault service processing core to one of the service processing cores which is a backup core with the fault service core.
CN 201110213973 2011-07-28 2011-07-28 Method and system for implementing inter-core backup in multi-core processor Active CN102231126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110213973 CN102231126B (en) 2011-07-28 2011-07-28 Method and system for implementing inter-core backup in multi-core processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110213973 CN102231126B (en) 2011-07-28 2011-07-28 Method and system for implementing inter-core backup in multi-core processor

Publications (2)

Publication Number Publication Date
CN102231126A CN102231126A (en) 2011-11-02
CN102231126B true CN102231126B (en) 2013-09-04

Family

ID=44843693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110213973 Active CN102231126B (en) 2011-07-28 2011-07-28 Method and system for implementing inter-core backup in multi-core processor

Country Status (1)

Country Link
CN (1) CN102231126B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609327B (en) * 2012-01-17 2015-07-22 北京华为数字技术有限公司 Method and device for improving reliability of multi-core processor
CN104158764B (en) * 2014-08-12 2018-02-06 新华三技术有限公司 Message processing method and device
CN107181780B (en) 2016-03-10 2020-07-14 阿里巴巴集团控股有限公司 Communication channel processing method and system
CN112558948A (en) * 2020-12-16 2021-03-26 武汉绿色网络信息服务有限责任公司 Method and device for identifying message under mass flow
CN112565821B (en) * 2021-02-19 2021-05-28 紫光恒越技术有限公司 Data processing method and device, security gateway and storage device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595360A (en) * 2003-09-12 2005-03-16 国际商业机器公司 System and method for performing task in distributing calculating system structure
CN101136729A (en) * 2007-09-20 2008-03-05 华为技术有限公司 Method, system and device for implementing high usability
CN101799776A (en) * 2010-02-25 2010-08-11 上海华为技术有限公司 Fault processing method of multi-core processor, multi-core processor and communication device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7519855B2 (en) * 2006-06-15 2009-04-14 Motorola, Inc. Method and system for distributing data processing units in a communication network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595360A (en) * 2003-09-12 2005-03-16 国际商业机器公司 System and method for performing task in distributing calculating system structure
CN101136729A (en) * 2007-09-20 2008-03-05 华为技术有限公司 Method, system and device for implementing high usability
CN101799776A (en) * 2010-02-25 2010-08-11 上海华为技术有限公司 Fault processing method of multi-core processor, multi-core processor and communication device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
说明书第47段.
说明书第7页第7-10段
附图4.

Also Published As

Publication number Publication date
CN102231126A (en) 2011-11-02

Similar Documents

Publication Publication Date Title
JP3640187B2 (en) Fault processing method for multiprocessor system, multiprocessor system and node
WO2016037554A1 (en) Hybrid network system, communication method and network node
US7869376B2 (en) Communicating an operational state of a transport service
US9106523B2 (en) Communication device and method of controlling the same
WO2016029749A1 (en) Communication failure detection method, device and system
US20130003535A1 (en) Systems and methods for distributed service protection across plug-in units
US9331870B2 (en) Switch, information processing apparatus, and information processing system
KR102088298B1 (en) Method and appratus for protection switching in packet transport system
CN105024855A (en) Distributed cluster management system and method
CN102231126B (en) Method and system for implementing inter-core backup in multi-core processor
US20120281525A1 (en) METHOD AND SYSTEM FOR PRIORITY BASED (1:1)n ETHERNET PROTECTION
US20140258772A1 (en) Utilizing backward defect indications in y-cable protection switching
US20130148512A1 (en) Distributed control plane for link aggregation
CN103220189A (en) Multi-active detection (MAD) backup method and equipment
CN103036724B (en) State information transmission method, the network equipment and unit equipment
JP4724763B2 (en) Packet processing apparatus and interface unit
US9379938B2 (en) Method and system for SOAM flow switching
JP5352502B2 (en) Packet communication system and packet communication apparatus control method
JP2017536052A (en) Tag exchange path connectivity detection method and apparatus
US7746949B2 (en) Communications apparatus, system and method of creating a sub-channel
WO2012079328A1 (en) Switching method and system for multiplex section protection and packet transport network device
CN116192863B (en) Micro-service flow processing method, DPU service grid deployment method and system
CN103414591A (en) Method and system for fast converging when port failure is recovered
CN102857436A (en) Flow transmission method and flow transmission equipment based on IRF (intelligent resilient framework) network
CN103001832B (en) The detection method of distributed file system interior joint and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant