CN102467394A - Method and system for realizing multi-core hot patching - Google Patents

Method and system for realizing multi-core hot patching Download PDF

Info

Publication number
CN102467394A
CN102467394A CN2010105430205A CN201010543020A CN102467394A CN 102467394 A CN102467394 A CN 102467394A CN 2010105430205 A CN2010105430205 A CN 2010105430205A CN 201010543020 A CN201010543020 A CN 201010543020A CN 102467394 A CN102467394 A CN 102467394A
Authority
CN
China
Prior art keywords
patch
core processing
processing units
patch operation
notice
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010105430205A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2010105430205A priority Critical patent/CN102467394A/en
Priority to PCT/CN2011/075972 priority patent/WO2012062113A1/en
Publication of CN102467394A publication Critical patent/CN102467394A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running

Abstract

The invention discloses a method and a system for realizing multi-core hot patching. The method comprises the steps of: before one of a plurality of core processing units executes a patching operation on a code, informing other core processing units which share the code with the core processing unit, and waiting until the patching operation is executed completely by the other core processing units after receiving the notice; executing the patching operation by the core processing unit executing the patching operation; and after the patching operation is executed completely, informing the other core processing units of completely executing the patching operation by the core processing unit executing the patching operation. According to the invention, system stability is increased.

Description

The implementation method of multinuclear hot patch and system
Technical field
The present invention relates to the communications field, in particular to a kind of implementation method and system of multinuclear hot patch.
Background technology
Along with the continuous development of central processing unit (Central Processing Unit abbreviates CPU as) technology, multi-core technology has become current main flow.Traditional multicore architecture has two kinds: asymmetric multiprocessing (Asymmetrical Multi-Processing abbreviates AMP as) and symmetrical multiprocessing (Symmetrical Multi-Processing abbreviates SMP as).SMP is exactly operating systems of a plurality of kernel operations, their shared drives, bus and other resource, and task is evenly distributed on each kernel and handles.In the SMP framework, the status of each kernel equates.And in the AMP framework, each kernel is A distinction should be made between what is primary and what is secondary, and each kernel all moves an operating system, according to the dissimilar task of different disposal of the division of labor.Under the AMP framework, in order to save internal memory, the code of same virtual address can be mapped on the identical physical address between the multinuclear usually, to realize code sharing.
Any software systems all inevitably exist defective and leak, and the method for fixed software defective has usually: issue redaction or patch installing.Because it is many-sided that the version news conference involves, therefore little at defective effect, number adopts the way of patch installing after a little while usually.So-called patch installing is promptly corrected the defective in the current software version with correct code, accomplishes with the form of patch file usually, like each service packs of Windows operating system issue.In telecommunications service, require system behind the discovery software defect, can promptly revise, and do not allow the system break operation to avoid causing unnecessary loss.Patch operation flow process roughly is as follows:
Step 1: in existing engineering, add patch file patch.c, the engineering of compiling link Cheng Xin.
Step 2: make patch release.
Step 3: new patch release replaces original version.With respect to the operation of the patch under the general case (cold patch), the process of promptly not accomplishing the patch operation under the prerequisite of interrupt system operation is called hot patch.
Hot patch implementation method in the correlation technique only is applicable to monokaryon system (CPU), possibly cause system's instability even service disconnection for the hot patch of multiple nucleus system.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of multinuclear hot patch implementation method and system; Hot patch implementation method to solve at least in the above-mentioned correlation technique only is applicable to monokaryon system (CPU), possibly cause the problem of system's instability even service disconnection for the hot patch of multiple nucleus system.
To achieve these goals, according to an aspect of the present invention, a kind of implementation method of multinuclear hot patch is provided.
Multinuclear hot patch according to the present invention comprises: one in a plurality of core processing units before carrying out the patch operation to code; Other core processing units of notice code shared with it, other core processing units wait for that after receiving notice the patch operation is finished; Carry out the core processing unit of patch operation and carry out the patch operation; After the patch operation is finished, carries out the core processing unit of patch operation and notify other core processing unit patch operations to be finished.
Further; One in a plurality of core processing units before carrying out the patch operation to code; The wait patch operation after receiving notice of other core processing units of notice code shared with it, other core processing units is finished and comprises: the core processing unit of carrying out the patch operation is revised overall shared variable, to notify other core processing units of code shared with it; Wherein, to be used for multinuclear synchronous for overall shared variable; Other core processing units are revised global variable respectively be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation, and wait for that the patch operation is finished.
Further, the core processing unit of carrying out the patch operation is revised overall shared variable for treating patch state, with other core processing units of notice code shared with it; Other core processing units are revised global variable respectively be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation, and wait for that in the IDLE task patch operation is finished.
Further; One in a plurality of core processing units before carrying out the patch operation to code; Other core processing units of notice code shared with it; The wait patch operation after receiving notice of other core processing units is finished and comprises: the core processing unit of execution patch operation is examined to other and is distributed internuclear interruption, with other core processing units of notice code shared with it; Other core processing units wait for that the patch operation is finished after receiving internuclear interruption; After the patch operation was finished, the core processing unit of carrying out the patch operation sent internuclear interruption once more and is finished to notify other core processing unit patch operations.
Further, before carrying out the patch operation, be the memory headroom of the corresponding patch pre-determined constant of patch operation.
Further, through being set, zone bit is used to identify the core processing unit of sharing code.
Further, the corresponding patch of patch operation is that patch is right, and patch is to comprising by patch function and patch function.
Further, the MAP file that generates before the MAP file of patch operation back generation and the patch operation is consistent except that reserving the patch section.
A kind of realization system of multinuclear hot patch is provided according to a further aspect in the invention.
Realization system according to multinuclear hot patch of the present invention comprises: carry out the core processing unit of patch operation, it comprises: first notification module was used for before code is carried out the patch operation other core processing units of notice code shared with it; Execution module is used to carry out the patch operation; Second notification module is used for after the patch operation is finished, and notifies other core processing unit patch operations to be finished; Other core processing units, it comprises: wait for module, be used for after the notice that receives first notification module, waiting for that the patch operation is finished.
Further, first notification module comprises: first revises submodule, is used to revise overall shared variable, with other core processing units of notice code shared with it; The wait module comprises: second revises submodule, and being used to revise global variable is ready state, with notice carry out the patch operation core processing unit its prepared to carry out the patch operation; First waits for submodule, is used to wait for that the patch operation is finished.
Further, first revises submodule, is used to revise overall shared variable for treating patch state, with other core processing units of notice code shared with it; Second revises submodule, be used to revise global variable and be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation.
Further, first notification module comprises: the first distribution submodule is used for to the internuclear interruption of other nuclear distributions, with other core processing units of notice code shared with it; Second notification module comprises: the second distribution submodule, be used for after the patch operation is finished, and send internuclear interruption once more and be finished to notify other core processing unit patch operations; The wait module comprises: receive submodule, be used to receive internuclear interruption; Second waits for submodule, is used for waiting for that internuclear the having no progeny of reception the patch operation is finished.
Through the present invention; Adopt a plurality of core processing units; Solved the hot patch implementation method in the correlation technique and only be applicable to monokaryon system (CPU), possibly cause the problem of system's instability even interruption for the hot patch of multiple nucleus system, and then realize in multiple nucleus system, realizing hot patch; The loss of having avoided system break to cause, and reached the effect that has improved system stability.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram according to the multinuclear hot patch implementation method of the embodiment of the invention;
Fig. 2 is the Organization Chart according to the foreground system of the embodiment of the invention and backstage patch tool;
Fig. 3 is a process flow diagram of making service packs according to the backstage patch tool of the embodiment of the invention;
Fig. 4 is the hot patch functional schematic according to the multiple nucleus system of the embodiment of the invention;
Fig. 5 is the process flow diagram according to the processing patch order of the embodiment of the invention;
Fig. 6 is the multiple nucleus system frame diagram according to the embodiment of the invention;
Fig. 7 is the process flow diagram synchronous according to the multinuclear of the embodiment of the invention;
Fig. 8 is the structured flowchart according to the realization system of the multinuclear hot patch of the embodiment of the invention; And
Fig. 9 is the structured flowchart according to the realization system of the multinuclear hot patch of the embodiment of the invention.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Present embodiment provides a kind of implementation method of multinuclear hot patch, and Fig. 1 is the process flow diagram according to the hot patch implementation method of the embodiment of the invention, and is as shown in Figure 1, and this method comprises:
Step S102: before code is carried out the patch operation, notify other core processing units of code shared with it for one in a plurality of core processing units, other core processing units wait for that after receiving notice the patch operation is finished;
Step S104: the core processing unit of carrying out the patch operation is carried out the patch operation;
Step S106: after the patch operation is finished, carries out the core processing unit of patch operation and notify other core processing unit patch operations to be finished.
Pass through above-mentioned steps; One in the core processing unit of a plurality of shared codes before carrying out the patch operation to code; Other core processing units of notice code shared with it wait for that its patch operation is finished; Be finished in its other core processing unit patch operations that execute patch operation back notice code shared then, overcome the hot patch implementation method in the correlation technique and only be applicable to the core processing unit, in multinuclear heart processing unit system, can cause the problem of system's instability and service disconnection with it; Realized in multiple nucleus system, realizing hot patch, reached the effect that has improved system stability.
Preferably, preferred embodiment describe in the face of one among the step S102 down.Carry out the core processing unit of patch operation and revise overall shared variable, with other core processing units of notice code shared with it, wherein, it is synchronous that overall shared variable is used for multinuclear; Other core processing units are revised global variable respectively be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation, and wait for that the patch operation is finished.Pass through the preferred embodiment; Realized through revising overall shared variable in order to notify other relevant core processing units of this patch operation; And be that ready state prepares to carry out the patch operation with notice through revising global variable; And wait for that the patch operation is finished, realized under the situation that does not influence operation flow between the multinuclear synchronously.
Preferably, the core processing unit of carrying out the patch operation is revised overall shared variable for treating patch state, with other core processing units of notice code shared with it; Other core processing units are revised global variable respectively be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation, and wait for that in the IDLE task patch operation is finished.Through the preferred embodiment, realize the mutual of information between the multinuclear through IDLE, reduced the interruption delay of hot patch and reduced influence operation flow.
One that faces step S102 down preferred embodiment describes.The core processing unit of carrying out the patch operation is to the internuclear interruption of other nuclear distributions, with other core processing units of notice code shared with it; Other core processing units wait for that the patch operation is finished after receiving interruption; After the patch operation was finished, the core processing unit of carrying out the patch operation sent internuclear interruption once more and is finished to notify other core processing unit patch operations.Through the preferred embodiment, realized realizing the transmission of internuclear information in the hot patch through distributing internuclear interruption.
Preferably, before carrying out the patch operation, be the memory headroom of the corresponding patch pre-determined constant of patch operation.Through the preferred embodiment, guaranteed that other all internal memories except that patch file are unaffected, and guaranteed to carry out the correctness of hot patch.
Preferably, through being set, zone bit is used to identify the core processing unit of sharing code.Pass through the preferred embodiment; Share the core processing unit of code through being designated sign; Can realize that all core processing units are shared code or the part core processing unit is shared code, both can support the system of SMP framework, also can support the system of AMP framework.
Preferably, the corresponding patch of patch operation is that patch is right, and patch is to comprising by patch function and patch function.Through the preferred embodiment, will be right as patch by patch function and patch function, occur when wrong in patch operation, can carry out by the patch function in order to system reducing, improved the robustness of system.
Preferably, the MAP file that generates before the MAP file of patch operation back generation and the patch operation is consistent except that reserving the patch section.Through the preferred embodiment, guaranteed the accuracy of patch to file.
Embodiment one
Present embodiment has combined the foregoing description and preferred implementation wherein, in the present embodiment, a kind of implementation method of multinuclear hot patch is provided, and this method comprises:
Step 1: in order to the suitable nuclear number distribution (patch is suitable for bitmap) of sign patch function.And be called patch to (Pair) to be one group by patch function (in the original system wrong realization) and patch function (be used for make amendment correct realization) to by the patch function.If this to patch to being applicable to certain nuclear, its corresponding bit position 1.All patches to and other patch information (like the binary code realization of patch function, the distribution of patch function in the patch section etc.) form a patch file jointly, be called service packs (Patch).
In system's (multiple nucleus system that refers to the AMP framework) of complicacy; Because the needs that function is divided; Possibly both exist multinuclear to share code, also have the privately owned code of monokaryon, or even the block code that certain several nuclear is shared, other nuclear can not be visited; Through step 1, it is that those several nuclears are shared that code can be used for identifying.
Step 2: in original system, reserve the patch section.
In order to guarantee that original system avoids occurring calling unusual after patch operation, must guarantee that it is consistent that other internal memory except patch section (data segment, code segment and constant section etc.) is divided in the patch front and back.As: a function call callp _ FuncOrigText is arranged in original system; , in the binary code that after link, generates, FuncOrigText is replaced by the memory address that compiling generates.If the address of FuncOrigText difference 0x1000 and 0x2000 before and after the patch carry out this function call so and can't obtain correct result behind the patch.For this reason; Require application program to reserve certain memory headroom (size is fixing, address fix) in advance the hot patch module; The global variable that defines in the file that increases during patch, code, constant etc. must be assigned in the patch section, thereby can guarantee that other all internal memories except patch file are all unaffected.
Step 3: realize making, verification, the distribution of service packs through the backstage patch tool.
Fig. 2 is the Organization Chart according to the foreground system of the embodiment of the invention and backstage patch tool, and is as shown in Figure 2, and the backstage patch tool sends the patch order to the foreground software systems, and receives the execution result from foreground software systems feedback.Patch tool provides friendly interface to the user, allows the user to specify the various configurations of patch: like the right version number of patch, patch to the nuclear that is suitable for number.Patch tool extracts the right information of patch from user-defined MAP file and OUT file: function name, function definition, binary code realization etc.And according to the definition the form patch information is write in the service packs.Before making service packs, in order to ensure the internal memory consistance in the step 2, patch tool provides the function of MAP file verification, and promptly whether the patch tool MAP file that can judge original system and the map file of patch system do not have except the patch section that other are different again.After the verification unanimity, patch tool generates patch package file.Simultaneously, patch tool is opened tftp server.Particularly, Fig. 3 is the process flow diagram of making service packs according to the backstage patch tool of the embodiment of the invention, and is as shown in Figure 3, comprising:
Step S302: the user imports the various attribute informations of service packs on patch tool.
Step S304: whether patch tool verification original system MAP file is consistent with the new MAP of system.
Step S306: patch tool extracts the patch segment information from new system MAP file, OUT file.
Step S308: patch tool generates patch package file.
Step 4: software systems hot patch functional module is handled the patch request.During software systems initialization hot patch module, create the patch Processing tasks and handle all with the relevant order of patch operation.Comprise: activate patch, unloading patch.When existing patch needed the patch operation, patch tool sent a command to foreground software, and foreground hot patch resume module command request is initiated the download of TFTP request patch package file, and service packs is resolved, according to the content configuration patch section of service packs.Fig. 4 is the hot patch functional schematic according to the multiple nucleus system of the embodiment of the invention, and is as shown in Figure 4, and hot patch function management module and memory storage unit carry out information interaction, in order to accomplish patch command process, patch release management, code.Functions such as buffer memory (CACHE) is synchronous, multinuclear state synchronized.
Step 5: multinuclear back is synchronously revised by the redirect code at patch function place.
In multiple nucleus system, have shared code, wherein a nuclear is when revising by the patch function, and other nuclear can not be carried out this function.
Preferably, the operation of the patch of all multinuclears can be accomplished by the nuclear of nuclear minimum, and other nuclear only is responsible for cooperating with this nuclear.The synchronous detailed process of multinuclear is following: small nut is revised overall shared variable, notifies other relevant nuclear of this patch operation.After other was authorized existing this nuclear and needs the patch operation, getting into and revising overall shared variable in the IDLE task was ready state, notified this nuclear of small nut to finish synchronously.After this other nuclear is waited indefinitely in the IDLE task, till small nut is accomplished the patch operation.When all nuclears all finish synchronously, small nut promptly begins to carry out the patch operation, and accomplishing back modification global variable is that exit status notifies other nuclear to withdraw from synchronously.Particularly, Fig. 5 is according to the process flow diagram of the processing patch order of the embodiment of the invention, comprising:
Step S502: patch tool sends the patch request command to software systems.
Step S504: small nut change global variable notifies other nuclears to get into the multinuclear synchronous regime.
Step S506: other nuclears are received synchronization request, get into the IDLE task, revise global variable, and wait indefinitely.
Step S508: small nut is accomplished back configuration patch section, modification by the redirect code of patch function synchronously at other nuclears.
Step S510: small nut patch operation is accomplished, and notifies other nuclears to leave the multinuclear synchronous regime.
Preferably, synchronizing process can also realize in the following manner.Main nuclear is responsible for receiving the patch request; And the internuclear interruption of other nuclear distributions that cooperates to needs; Other nuclears are waited indefinitely up to receiving the main internuclear interruption of sending of authorizing again after receiving internuclear interruption (main checking and approving begins to carry out the hot patch operation fully) for the first time; Can think that then main nuclear accomplished the hot patch operation, from interrupt, return and continue to carry out operation flow.But the defective of this mode is possibly influence operation flow, and the retardation ratio that interrupts is bigger.In addition, multinuclear also can adopt between multinuclears such as internuclear semaphore, internuclear mailbox synchronization mechanism to realize synchronously.
Step 6: the patch release that software system management is different.
Service packs is backed up in the internal memory after downloading to the foreground immediately.Under the situation that internal memory allows, the patch of different editions allows to be present in simultaneously in the current system.Eigen allows a plurality of service packs of user definition as a subsidiary function, operates flexibly, and to unit testing and integration testing more comprehensively support is provided.
Need to prove that the technical scheme that the foregoing description provides is with the concrete realization in the multi-nuclear DSP system, but it is useful in other monokaryon system or multiple nucleus system equally, repeats no more at this.
Embodiment two
Present embodiment provides a kind of multinuclear hot patch implementation method, and the residing system environments of present embodiment is the AMP system of multinuclear, and is as shown in Figure 6, n=5.Wherein, code segment is divided into type in 3: 1) the shared code of 6 nuclears is called ST; 2) block code shared of nuclear 0, nuclear 1 is called G1T; 3) block code shared of nuclear 2,3,4,5 is called G2T.Supposing has 3 function: ST_Func, G1T_Func, G2T_Func respectively in the former software systems; Find that at present these 3 functions are wrong; So desire is carried out the patch operation to it, corresponding patch function is respectively ST_Func_Patch, G1T_Func_Patch and G2T_Func_Patch.
This method comprises the steps:
Step 1: realize the patch function, compiling patch engineering generates patch code.
Particularly; The realization of ST_Func_Patch, G1T_Func_Patch and G2T_Func_Patch is write among the Patch.c; And in the engineering of original system, add Patch.c, and use translation and compiling environment or Makefile compiling patch engineering, generate new map file and out file.It should be noted that compiler is for for the purpose of optimizing, not invoked function possibly not be linked in the new out file, should take measures to guarantee that the patch function is linked.
Step 2: make patch package file.
Particularly, software systems are connected with patch tool.The user sets gradually the attribute of patch to (ST_Func, ST_Func_Patch), (G1T_Func, G1T_Func_Patch), (G2T_Func, G2T_Func_Patch) through patch tool: version number, suitable nuclear number.And the map file and the out file of specifying the patch engineering to generate, specify the map file of original system simultaneously.Patch tool is the difference of 2 map files at first relatively, and when having only all difference all in the reservation internal memory of patch section, 2 map files just are considered to mate.If the map file can not mate, then can not proceed next step operation.Then, patch tool finds the right function address of patch from new map file, and from the out file, extracts whole patch section content, and last form by appointment is packaged into service packs.
Step 3: send patch activation or unloading order.
Particularly, activation command is used for software systems and downloads patch package file to internal memory from background host computer, and replaces by the patch function with the patch function in the service packs.The unloading order then is used for the current service packs that is moving is removed, and system state is returned to by the state before the patch, simultaneously the backup of service packs is deleted from internal memory.
Step 4: the hot patch task is handled the patch request.Processing procedure comprises step a and step b.
Step a: if patch tool sends to software systems is activation command; Then patch tool is opened a tftp server in this locality, and the IP address of tftp server, service packs are sent to foreground system in the store path of this locality, the version number of service packs as the additional parameter of ordering simultaneously.The foreground then according to these parameters to local host download patches bag, the application Dram backs up service packs and by the code of patch function from internal memory then.
After back-up job was accomplished, the current small nut that is in running status began to carry out the patch operation.The overall shared variable of synchronous use of multiple nucleus system indicates the state of each nuclear, thereby realizes synchronously.
Volatile unsigned int gaudCoresPatchStat [6]; The synchronous regime of // sign multinuclear.
Each of present embodiment checked an index of answering gaudCoresPatchStat.The possible state of gaudCoresPatchStat has 3: PM_SYNC_ENTER, PM_SYNC_READY, PM_SYNC_EXIT.PM_SYNC_ENTER representes this nuclear needs entering at present synchronous regime, but accomplishes synchronously as yet.PM_SYNC_READY representes that this nuclear has got into synchronous regime.PM_SYNC_EXIT representes this and endorses to withdraw from synchronous regime.
Fig. 7 is the process flow diagram synchronous according to the multinuclear of the embodiment of the invention, and is as shown in Figure 7, comprising:
Step S702: small nut is revised as PM_SYNC_ENTER with the relevant nuclear sign of this patch operation.
Step S704: the patch section is put in minimum caryogamy.
Step S706: small nut is revised patch function redirect code.
Step S708: upgrade gtCachetrl.
Step S710: it is PM_SYNC_EXIT that small nut is revised gaudCoresPatchStat.
Step S712: the feedback execution result, and withdraw from.
Step S714: whether the sign of other nuclear this nuclear of inquiry after getting into the IDLE task is PM_SYNC_ENTER, if then the sign with this nuclear is revised as PM_SYNC_READY.
Step S716: wait indefinitely then, until the PM_SYNC_EXIT that is masked as of this nuclear.Small nut copies the patch code section of preserving in the patch package file, data segment and constant section to corresponding physical memory place successively after all nuclears are all accomplished synchronously.Revise successively then by article one of patch function instruction, change it entry address of its patch function into.Article one instruction like: ST_Func should be revised as jmp_ST_Func_Patch, wherein _ and ST_Func_Patch should be concrete memory address.What need to specify is, execute the ST_Func_Patch patch after, should the PC pointer be turned back to the address of calling ST_Func.
Step S718: simultaneously, because code segment possibly be cacheable, therefore small nut should notify other nuclear to refresh by the cache of patch function after having revised by the code of patch function, and what avoid that other nuclear still carries out is the old code in the cache.Concrete implementation is following: definition global structure body variable gtCacheCtrl, preserve in the service packs with by the data of patch functional dependence.Small nut after carrying out the patch operation, with the information back-up in the service packs in gtCacheCtrl.Other nuclear brushes the gtCacheCtrl content in the cache before withdrawing from the IDLE task, accomplishes the synchronous of internal memory and cache.
Step S720: after working more than the small nut completion, revise the PM_SYNC_EXIT that is masked as of the relevant nuclear of this patch.Other nuclear is able to withdraw from the IDLE task, and continues to carry out.
Step b: if patch tool sends to software systems is the unloading order, operation below then foreground system is carried out: use the system state before the information of the former patch function of backup returns to patch.Synchronous operation in this process is with mentioned above consistent.Then, the Dram of applying in the patch activation process is all discharged, with the patch file deletion of backup, with the hidden danger of avoiding system to exist internal memory to reveal.
Step 5: hot patch task feedback processing result.
The last process result of foreground system feeds back to the backstage patch tool with the form of error code.
Present embodiment provides a kind of realization system of multinuclear hot patch, and Fig. 8 is the structured flowchart according to the realization system of the multinuclear hot patch of the embodiment of the invention, and is as shown in Figure 8, is described in detail in the face of said structure down:
Carry out the core processing unit 2 of patch operation, it comprises:
First notification module 82 was used for before code is carried out the patch operation other core processing units of notice code shared with it;
Execution module 84 is connected to first notification module 82, is used for after other core processing units of first notification module, 82 notices code shared with it, carrying out the patch operation;
Second notification module 86 is connected to execution module 84, is used for after the patch operation of execution module 84 is finished, and notifies other core processing unit patch operations to be finished;
Other core processing units 4 comprise:
Wait for module 88, be used for after the notice that receives first notification module 82, waiting for that the patch operation is finished.
Fig. 9 is the preferred construction block diagram according to the realization system of the multinuclear hot patch of the embodiment of the invention, and is as shown in Figure 9, is described in detail in the face of said structure down:
First notification module 82 comprises: first revises submodule 822, is used to revise overall shared variable, with other core processing units of notice code shared with it;
Wait for that module 88 comprises: second revises submodule 882, and being used to revise global variable is ready state, with notice carry out the patch operation core processing unit its prepared to carry out the patch operation; First waits for submodule 884, is connected to second and revises submodule 882, is used to wait for that the patch operation is finished.
Preferably, first revises submodule 822, is used to revise overall shared variable for treating synchronous regime, with other core processing units of notice code shared with it;
Second revises submodule 882, be used to revise global variable and be ready state with notice carry out the patch operation core processing unit its prepared to carry out the patch operation.
First notification module 82 comprises: the first distribution submodule 824 is used for to the internuclear interruption of other nuclear distributions, with other core processing units of notice code shared with it;
Second notification module 86 comprises: the second distribution submodule 862, be used for after the patch operation is finished, and send internuclear interruption once more and be finished to notify other core processing unit patch operations;
Wait for that module 88 comprises: receive submodule 886, be used to receive internuclear interruption; Second waits for submodule 888, is connected to and receives submodule 886, is used for waiting for that the patch operation is finished receiving internuclear having no progeny;
Pass through the foregoing description; A kind of multinuclear hot patch implementation method and system are provided; Through this method; One in the core processing unit of a plurality of shared codes other core processing units of notice code shared with it wait for that its patch operation is finished before code is carried out the patch operation, are finished in its other core processing unit patch operations that execute patch operation back notice code shared with it then; Overcome the hot patch implementation method in the correlation technique and only be applicable to the core processing unit; In multinuclear heart processing unit system, can cause the problem of system's instability and service disconnection, realize in multiple nucleus system, realizing hot patch, reach the effect that has improved system stability.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the memory storage and carry out, and in some cases, can carry out step shown or that describe with the order that is different from here by calculation element; Perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. the implementation method of a multinuclear hot patch is characterized in that, comprising:
Notice is shared other core processing units of said code with it in a plurality of core processing units one before code execution patch is operated, and the said patch operation of said other core processing units wait after receiving said notice is finished;
Carry out the core processing unit of said patch operation and carry out said patch operation;
After said patch operation is finished, carries out the core processing unit of said patch operation and notify the said patch operation of said other core processing units to be finished.
2. method according to claim 1; It is characterized in that; One in a plurality of core processing units before carrying out the patch operation to code; Notice is shared other core processing units of said code with it, and the said patch operation of said other core processing units wait after receiving said notice is finished and comprises:
Carry out the core processing unit of said patch operation and revise overall shared variable, with notice and its other core processing units of sharing said code, wherein, it is synchronous that said overall shared variable is used for multinuclear;
Said other core processing units are revised said global variable respectively be ready state with notice carry out said patch operation core processing unit its prepared to carry out the patch operation, and wait for that said patch operation is finished.
3. method according to claim 2 is characterized in that:
Carry out the core processing unit of said patch operation and revise said overall shared variable, share other core processing units of said code with notice and its for treating patch state;
Said other core processing units are revised said global variable respectively be ready state with notice carry out said patch operation core processing unit its prepared to carry out the patch operation, and wait for that in idle IDLE task said patch operation is finished.
4. method according to claim 1; It is characterized in that; One in a plurality of core processing units before carrying out the patch operation to code; Notice is shared other core processing units of said code with it, and the said patch operation of said other core processing units wait after receiving said notice is finished and comprises:
The core processing unit of carrying out said patch operation is shared other core processing units of said code to the internuclear interruption of said other nuclear distributions with notice and its;
Said other core processing units wait for that said patch operation is finished after receiving said internuclear interruption;
After said patch operation was finished, the core processing unit of carrying out said patch operation sent internuclear interruption once more and is finished to notify the said patch operation of said other core processing units.
5. according to each described method in the claim 1 to 4, it is characterized in that, before carrying out said patch operation, be the memory headroom of the corresponding patch pre-determined constant of said patch operation.
6. according to each described method in the claim 1 to 4, it is characterized in that, be used to identify the core processing unit of sharing said code through zone bit is set.
7. according to each described method in the claim 1 to 4, it is characterized in that the corresponding patch of said patch operation is that patch is right, said patch is to comprising by patch function and patch function.
8. method according to claim 7 is characterized in that, the MAP file that generates before MAP file that said patch operation back generates and the operation of said patch is consistent except that reserving the patch section.
9. the realization system of a multinuclear hot patch is characterized in that, comprising:
Carry out the core processing unit of patch operation, it comprises:
First notification module was used for before code is carried out the patch operation, and notice is shared other core processing units of said code with it;
Execution module is used to carry out said patch operation;
Second notification module is used for after said patch operation is finished, and notifies the said patch operation of said other core processing units to be finished;
Said other core processing units, it comprises:
Wait for module, be used for after the notice that receives said first notification module, waiting for that said patch operation is finished.
10. system according to claim 9 is characterized in that,
Said first notification module comprises:
First revises submodule, is used to revise overall shared variable, shares other core processing units of said code with notice and its;
Said wait module comprises:
Second revises submodule, and being used to revise global variable is ready state, with notice carry out said patch operation core processing unit its prepared to carry out the patch operation;
First waits for submodule, is used to wait for that said patch operation is finished.
11. system according to claim 10 is characterized in that:
Said first revises submodule, is used to revise overall shared variable for treating patch state, shares other core processing units of said code with notice and its;
Said second revises submodule, be used to revise global variable and be ready state with notice carry out said patch operation core processing unit its prepared to carry out the patch operation.
12. system according to claim 9 is characterized in that,
Said first notification module comprises:
The first distribution submodule is used for sharing other core processing units of said code to the internuclear interruption of said other nuclear distributions with notice and its;
Said second notification module comprises:
The second distribution submodule is used for after said patch operation is finished, and sends internuclear interruption once more and is finished to notify the said patch operation of said other core processing units;
Said wait module comprises:
Receive submodule, be used to receive said internuclear interruption;
Second waits for submodule, is used for waiting for that said patch operation is finished receiving said internuclear having no progeny.
CN2010105430205A 2010-11-12 2010-11-12 Method and system for realizing multi-core hot patching Pending CN102467394A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2010105430205A CN102467394A (en) 2010-11-12 2010-11-12 Method and system for realizing multi-core hot patching
PCT/CN2011/075972 WO2012062113A1 (en) 2010-11-12 2011-06-20 Method and system for realizing multi-core hot patching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105430205A CN102467394A (en) 2010-11-12 2010-11-12 Method and system for realizing multi-core hot patching

Publications (1)

Publication Number Publication Date
CN102467394A true CN102467394A (en) 2012-05-23

Family

ID=46050367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105430205A Pending CN102467394A (en) 2010-11-12 2010-11-12 Method and system for realizing multi-core hot patching

Country Status (2)

Country Link
CN (1) CN102467394A (en)
WO (1) WO2012062113A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159738A (en) * 2015-08-20 2015-12-16 上海斐讯数据通信技术有限公司 Hot patch implementation method and system
WO2016127566A1 (en) * 2015-02-12 2016-08-18 中兴通讯股份有限公司 Patch processing method and device
CN106775732A (en) * 2016-12-23 2017-05-31 上海优刻得信息科技有限公司 A kind of hot patch loading method and device
WO2020238245A1 (en) * 2019-05-30 2020-12-03 华为技术有限公司 Function jump implementation method, device, and computer storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9792112B2 (en) * 2013-08-28 2017-10-17 Via Technologies, Inc. Propagation of microcode patches to multiple cores in multicore microprocessor
US10649763B2 (en) * 2018-06-15 2020-05-12 Microsoft Technology Licensing, Llc Resource efficient deployment of multiple hot patches

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7149843B1 (en) * 2001-12-10 2006-12-12 Vmware, Inc. System and method for detecting access to shared structures and for maintaining coherence of derived structures in virtualized multiprocessor systems
CN101178672A (en) * 2007-11-29 2008-05-14 上海华为技术有限公司 Multi-nucleus processor sharing code segment patching method and apparatus
CN101561764A (en) * 2009-05-18 2009-10-21 华为技术有限公司 Patching method and patching device under multi-core environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6075938A (en) * 1997-06-10 2000-06-13 The Board Of Trustees Of The Leland Stanford Junior University Virtual machine monitors for scalable multiprocessors

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7149843B1 (en) * 2001-12-10 2006-12-12 Vmware, Inc. System and method for detecting access to shared structures and for maintaining coherence of derived structures in virtualized multiprocessor systems
CN101178672A (en) * 2007-11-29 2008-05-14 上海华为技术有限公司 Multi-nucleus processor sharing code segment patching method and apparatus
CN101561764A (en) * 2009-05-18 2009-10-21 华为技术有限公司 Patching method and patching device under multi-core environment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016127566A1 (en) * 2015-02-12 2016-08-18 中兴通讯股份有限公司 Patch processing method and device
CN105159738A (en) * 2015-08-20 2015-12-16 上海斐讯数据通信技术有限公司 Hot patch implementation method and system
CN106775732A (en) * 2016-12-23 2017-05-31 上海优刻得信息科技有限公司 A kind of hot patch loading method and device
WO2020238245A1 (en) * 2019-05-30 2020-12-03 华为技术有限公司 Function jump implementation method, device, and computer storage medium
US11645068B2 (en) 2019-05-30 2023-05-09 Huawei Technologies Co., Ltd. Method for implementing function jump, apparatus, and computer storage medium

Also Published As

Publication number Publication date
WO2012062113A1 (en) 2012-05-18

Similar Documents

Publication Publication Date Title
US11379412B2 (en) Enabling data replication processes between heterogeneous storage systems
CN103198028B (en) A kind of internal storage data moving method, Apparatus and system
US8661457B2 (en) Pipeline across isolated computing environments
CN102467394A (en) Method and system for realizing multi-core hot patching
US10936545B1 (en) Automatic detection and backup of primary database instance in database cluster
EP3688598B1 (en) Method for reading data stored in a non-volatile cache using rdma
CN102103518A (en) System for managing resources in virtual environment and implementation method thereof
CN101697128A (en) Version upgrading method and device
US20210089379A1 (en) Computer system
RU2681409C1 (en) System and method for synchronization of memory in multi-core system
EP3951607A1 (en) Data reading method, data writing method, and server
CN102053869A (en) Resource allocation method and device for multi-operation system
CN102597963A (en) Dynamic replica volume swap in a cluster
KR20040074627A (en) System and method of distributing replication commands
JP2013037450A (en) Database update controller, database management system, and database update control program
US10824641B1 (en) Deterministic query-based replication
CN112434008A (en) Distributed database upgrading method, device and medium
CN112230853A (en) Storage capacity adjusting method, device, equipment and storage medium
US8312239B2 (en) Cache management for increasing performance of high-availability multi-core systems
CN109324549B (en) Dual-master control equipment configuration method and dual-master control equipment
US8738873B2 (en) Interfacing with a point-in-time copy service architecture
WO2018010603A1 (en) Storage mode upgrade method, apparatus and system based on video cloud storage system
CN103888545A (en) Method and device for processing global data in distributed system
US20160292050A1 (en) Elastic virtual multipath resource access using sequestered partitions
CN115292408A (en) Master-slave synchronization method, device, equipment and medium for MySQL database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120523