CN101937400B - Method and electronic equipment for managing warm back-up internal memory - Google Patents

Method and electronic equipment for managing warm back-up internal memory Download PDF

Info

Publication number
CN101937400B
CN101937400B CN2009100867631A CN200910086763A CN101937400B CN 101937400 B CN101937400 B CN 101937400B CN 2009100867631 A CN2009100867631 A CN 2009100867631A CN 200910086763 A CN200910086763 A CN 200910086763A CN 101937400 B CN101937400 B CN 101937400B
Authority
CN
China
Prior art keywords
memory
internal memory
hot spare
spare internal
application program
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
CN2009100867631A
Other languages
Chinese (zh)
Other versions
CN101937400A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN2009100867631A priority Critical patent/CN101937400B/en
Publication of CN101937400A publication Critical patent/CN101937400A/en
Application granted granted Critical
Publication of CN101937400B publication Critical patent/CN101937400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a method for managing a warm back-up internal memory, which is applied to electronic equipment comprising a main internal memory and the warm back-up internal memory. The method comprises the following steps of: detecting whether the main internal memory works normally or not; detecting whether an application program applies for using the warm back-up internal memory as a buffer memory or not when the main internal memory works normally; if so, handling the application in order to decide whether the warm back-up internal memory is agreed to be used as the buffer memory of the application program or not; and using the warm back-up internal memory as the buffer memory of the application program if the warm back-up internal memory is agreed to be used as the buffer memory of the application program. The invention also provides the electronic equipment. In the invention, the warm back-up internal memory can be utilized during the period of normal operation of the main internal memory, thereby reducing waste of resources.

Description

The method and the electronic equipment of management Hot Spare internal memory
Technical field
The present invention relates to computer technology, relate in particular to the method and the electronic equipment of management Hot Spare internal memory.
Background technology
Find that according to statistics in the hardware fault that computing machine takes place, memory failure occupies the first place.Memory failure possibly cause computer data to be lost or computer down, and then causes damage to the user.For guaranteeing the stability of computer run; People have taked a variety of technology; Such as parity technique, bug check and error correction (ECC, Error Checking and Correcting) technology, internal memory Hot Spare (Sparing) technology and memory mirror (Mirroring) technology etc.Wherein, Internal memory Hot Spare technology is meant, in computing machine, with a part of memory headroom as the archive memory space; Free time when the archive memory space is normally moved in non-archive memory space; When break down in non-archive memory space, the archive memory space just is activated, and carries out work to replace non-archive memory space.In general, non-archive memory space and archive memory space are two separate memory bars, describe for ease of hereinafter, non-archive memory space are called main memory here, and the archive memory space is called the Hot Spare internal memory.
Internal memory Hot Spare technology can improve the stability of computer run effectively.But from another point of view, at the main memory normal operation period, the Hot Spare internal memory can leave unused, and can cause the waste of resource like this.
Summary of the invention
The present invention provides the method and the electronic equipment of management Hot Spare internal memory, in order to reduce the waste of resource.
A kind of method of managing the Hot Spare internal memory, said method are applied to one and comprise in the electronic equipment of main memory and Hot Spare internal memory, comprising: whether detect said main memory in operate as normal; When said main memory operate as normal, detect the application that whether has application program that said Hot Spare internal memory is used as buffer memory; When detecting the application that application program uses said Hot Spare internal memory as buffer memory, handle said application, whether agree the buffer memory of said Hot Spare internal memory with decision as said application program; When agreeing said Hot Spare internal memory, the buffer memory of said Hot Spare internal memory as said application program used as the buffer memory of said application program.
A kind of electronic equipment comprises main memory and Hot Spare internal memory, and said electronic equipment also comprises: whether first detecting unit is used to detect said main memory in operate as normal; Second detecting unit when said first detection goes out said main memory operate as normal, detects the application that whether has application program that said Hot Spare internal memory is used as buffer memory; First processing unit is used for during to the application that has application program that said Hot Spare internal memory is used as buffer memory, handling said application in said second detection, whether agrees the buffer memory of said Hot Spare internal memory as said application program with decision; Second processing unit is used for when said first processing unit is agreed said Hot Spare internal memory as the buffer memory of said application program, and the buffer memory of said Hot Spare internal memory as said application program used.
In the present invention, exist the main memory normal operation period to be used in the Hot Spare, reduced the waste of resource.
Description of drawings
Figure 1A is a kind of process flow diagram of managing the method for Hot Spare internal memory of the present invention;
Figure 1B is the logical organization synoptic diagram of a kind of electronic equipment of the present invention;
Fig. 1 is the process flow diagram of the disposal route of a kind of Hot Spare internal memory of the present invention;
Fig. 2 is the structural representation of the treating apparatus of a kind of Hot Spare internal memory of the present invention;
Fig. 3 is the process flow diagram of the management method of a kind of Hot Spare internal memory of the present invention;
Fig. 4 is the structural representation of a kind of Memory Controller Hub of the present invention;
Fig. 5 is the process flow diagram of the disposal route of another kind of Hot Spare internal memory of the present invention;
Fig. 6 is the structural representation of the treating apparatus of another kind of Hot Spare internal memory of the present invention;
Fig. 7 is the process flow diagram of the management method of another kind of Hot Spare internal memory of the present invention;
Fig. 8 is the structural representation of another kind of Memory Controller Hub of the present invention;
Fig. 9 is the process flow diagram of first preferred embodiment of the present invention;
Figure 10 is the process flow diagram of second preferred embodiment of the present invention.
Embodiment
At first combine Figure 1A, a kind of method of managing the Hot Spare internal memory of the present invention is described.Need to prove that at first this method can be applied to one and comprise in the electronic equipment of main memory and Hot Spare internal memory.Shown in Figure 1A, this method comprises:
S101A: whether detect main memory in operate as normal;
S102A: when said main memory operate as normal, detect the application that whether has application program that the Hot Spare internal memory is used as buffer memory;
S103A: when detecting the application that application program uses said Hot Spare internal memory as buffer memory, handle said application, whether agree the buffer memory of said Hot Spare internal memory as said application program with decision;
S104A: when agreeing said Hot Spare internal memory, the buffer memory of said Hot Spare internal memory as said application program used as the buffer memory of said application program.
Whether in practical application, can have multiple mode to detect has application program with the application of said Hot Spare internal memory as the buffer memory use.For example, detect the data of the memory size whether required application of sign that application program provides is arranged.
In practical application, can there be multiple mode to realize the buffer memory of said Hot Spare internal memory as said application program used.For example, the start address of the internal memory that allow to use is offered said application program, and the memory headroom of using for said application program in the state table record distribution that is being used for safeguarding Hot Spare internal memory operating position.
Further, the method shown in Figure 1A also comprises: forbid that said application program continues to use said Hot Spare internal memory.For example, when detecting the main memory cisco unity malfunction, forbid that said application program uses said Hot Spare internal memory.Again for example, obtain the information that no longer continues to use said Hot Spare internal memory that said application program is sent; Forbid that said application program continues to use said Hot Spare internal memory.
The present invention also provides a kind of electronic equipment, comprises main memory and Hot Spare internal memory.Shown in Figure 1B, this electronic equipment also comprises: whether the first detecting unit 101B is used to detect said main memory in operate as normal; The second detecting unit 102B when the first detecting unit 101B detects said main memory operate as normal, detects the application that whether has application program that said Hot Spare internal memory is used as buffer memory; The first processing unit 103B; Be used for when the second detecting unit 102B detects the application that application program uses said Hot Spare internal memory as buffer memory; Handle said application, whether agree the buffer memory of said Hot Spare internal memory as said application program with decision; The second processing unit 104B is used for when the first processing unit 103B agrees said Hot Spare internal memory as the buffer memory of said application program, and the buffer memory of said Hot Spare internal memory as said application program used.
Optional, the second detecting unit 102B specifically can be used to detect the data of the memory size whether required application of sign that application program provides is arranged.
Optional, the second processing unit 104B specifically can be used for the start address of the internal memory that allows to use is offered said application program, and is being used for safeguarding the memory headroom of the state table record distribution of Hot Spare internal memory operating position to said application program use.
Electronic equipment shown in Figure 1B further comprises: the 3rd processing unit 105B is used to forbid that said application program continues to use said Hot Spare internal memory.Concrete, when the first detecting unit 101B detected the main memory cisco unity malfunction, the 3rd processing unit 105B can forbid that said application program uses said Hot Spare internal memory.In addition, the 3rd processing unit 105B obtains that said application program sends no longer continue to use the information of said Hot Spare internal memory after, can forbid that also said application program continues to use said Hot Spare internal memory.
In fact, the present invention can describe from a plurality of angles such as Memory Controller Hub, application programs.Because application program need operate on the functional unit of electronic equipment, so among the embodiment below, the function of application program is all carried out by functional unit.
At first the present invention is described from the angle of application program (functional unit).As shown in Figure 1, a kind of disposal route of Hot Spare internal memory comprises:
S101: the Hot Spare internal memory is used in the Memory Controller Hub application to the control internal memory;
S102: if success application is then used the Hot Spare internal memory.
Both can be at the main memory normal operation period execution opportunity of S101, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.Can be at the main memory normal operation period execution opportunity of S102.The executive agent of S101 and S102 can be the some functional units in the electronic equipment; CPU etc. for example; Further again, the executive agent of S101 and S102 can be the some functional units in the electronic equipment and operate in the computer program on the functional unit.The electronic equipment here generally is meant server.
A register can be set on the Memory Controller Hub, describe, this register is called first register here for ease of hereinafter.When the Hot Spare internal memory is used in the needs application, can the data of the memory size that identifies required application be write in said first register.For example, need to suppose the memory headroom of application 1 megabyte (1MB), so just can data " 1 " be write in first register.Certainly, application uses the Hot Spare internal memory can have multiple mode to realize, illustrates no longer one by one here.
After Memory Controller Hub is received the data of the memory size that identifies required application; Can judge that the memory headroom that whether has desired volume in the Hot Spare internal memory is available; If have; Then can the start address of the memory headroom of desired volume be write in first register,, then can write first register being used for identifying the data that do not have suitable memory headroom if do not have.Need to prove that start address can use side-play amount to represent, N1-1 etc. for example, being used to identify the data that do not have suitable memory headroom can be predefined data.Certainly, start address can also have other expression modes, illustrates no longer one by one here.
After using the Hot Spare internal memory to the Memory Controller Hub application of control internal memory; Can read the data that write by said Memory Controller Hub in said first register, if said data are addresses, promptly above-mentioned start address; Then represent success application; If said data are not addresses, for example be the data that sign does not have suitable memory headroom, then expression application failure.
After the success application, just the Hot Spare internal memory can be used, specifically, the memory headroom in the Hot Spare internal memory of distribution can be used.How to use memory headroom to design according to actual needs by those skilled in the art; For example; The memory headroom of being applied for as cache memory, is read the data in the hard disk that needs, if do not hit from said cache memory; The data that then from hard disk, read said needs read the data of said needs again to said cache memory from said cache memory.The memory headroom of being applied for can be accelerated travelling speed as cache memory.
Behind said use Hot Spare internal memory,, then can the information that no longer need use said Hot Spare internal memory be notified to said Memory Controller Hub, so that Memory Controller Hub is safeguarded the user mode of Hot Spare internal memory if no longer need use said Hot Spare internal memory.
A register can also be set on the Hot Spare internal memory, describe, this register is called second register here for ease of hereinafter.When the information that will no longer need use said Hot Spare internal memory is notified to said Memory Controller Hub, can the data that when the Hot Spare internal memory is used in application, from said first register, read be written in said second register.Certainly, the information that no longer need use said Hot Spare internal memory notified to said Memory Controller Hub can have multiple mode to realize, illustrates no longer one by one here.
Corresponding to method shown in Figure 1, the present invention also provides a kind of treating apparatus of Hot Spare internal memory.As shown in Figure 2, said device comprises: application unit 201 is used for using the Hot Spare internal memory to the Memory Controller Hub application of control internal memory; Use unit 202,, then use the Hot Spare internal memory if be used for success application.
It both can be at the main memory normal operation period that application unit 201 uses the opportunity of Hot Spare internal memory to the Memory Controller Hub application, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.Using unit 202 to use the opportunity of Hot Spare internal memory can be at the main memory normal operation period.
A register can be set on the Memory Controller Hub, describe, this register is called first register here for ease of hereinafter.When applying for that unit 201 needs application to use the Hot Spare internal memory, application unit 201 can write the data of the memory size that identifies required application in said first register.For example, suppose that application unit 201 needs the memory headroom of application 1 megabyte (1MB), applies for that so unit 201 just can write data " 1 " in first register.Certainly, 201 applications of application unit use the Hot Spare internal memory can have multiple mode to realize, illustrate no longer one by one here.
After Memory Controller Hub is received the data of the memory size that identifies required application; Can judge that the memory headroom that whether has desired volume in the Hot Spare internal memory is available; If have; Then can the start address of the memory headroom of desired volume be write in first register,, then can write first register being used for identifying the data that do not have suitable memory headroom if do not have.Need to prove that start address can use side-play amount to represent, N1-1 etc. for example, being used to identify the data that do not have suitable memory headroom can be predefined data.Certainly, start address can also have other expression modes, illustrates no longer one by one here.
Application unit 201 is after using the Hot Spare internal memory to the Memory Controller Hub application of control internal memory; Can read the data that write by said Memory Controller Hub in said first register, if said data are addresses, promptly above-mentioned start address; Then represent success application; If said data are not addresses, for example be the data that sign does not have suitable memory headroom, then expression application failure.Optional; Device shown in Figure 2 can also comprise reading unit (not illustrating among Fig. 2) and judging unit (not illustrating among Fig. 2), when application unit 201 after using the Hot Spare internal memory to the Memory Controller Hub application of control internal memory, reading unit can read the data that write by said Memory Controller Hub in said first register; And the data that read are offered judging unit; Judging unit can judge whether the data that reading unit provides are start addresses, if, then can be to using unit 202 that this start address is provided; Use unit 202 to use the Hot Spare internal memory according to this start address; Otherwise judging unit both can be to having used 202 notice Hot Spare internal memories unavailable or application in unit to use information such as the Hot Spare internal memory is unsuccessful, also can be to using unit 202 to send any information.Certainly, the work of reading unit and judging unit can be accomplished by application unit 201.
After application unit 201 success application, use unit 202 just can use the Hot Spare internal memory, specifically, use unit 202 can use the memory headroom in the Hot Spare internal memory of distribution.Use unit 202 how to use memory headroom to design according to actual needs by those skilled in the art; For example; Use unit 202 with the memory headroom of being applied for as cache memory, from said cache memory, read the data in the hard disk that needs, if do not hit; The data that then from hard disk, read said needs read the data of said needs again to said cache memory from said cache memory.The memory headroom of being applied for can be accelerated travelling speed as cache memory.
Device shown in Figure 2 can also comprise releasing unit 203; After using unit 202 to use the Hot Spare internal memory; If use unit 202 no longer need use said Hot Spare internal memory; Then releasing unit 203 can be notified the information that no longer need use said Hot Spare internal memory to said Memory Controller Hub, so that Memory Controller Hub is safeguarded the user mode of Hot Spare internal memory.
A register can also be set on the Hot Spare internal memory, describe, this register is called second register here for ease of hereinafter.When releasing unit 203 will no longer need use the information of said Hot Spare internal memory to notify to said Memory Controller Hub; Releasing unit 203 can be written to the data that when the Hot Spare internal memory is used in application, from said first register, read in said second register; Certainly; Before this, apply for that unit 201 or the data of using unit 202 to need from said first register, to read offer releasing unit 203.Certainly, releasing unit 203 will no longer need use the information of said Hot Spare internal memory to notify to said Memory Controller Hub can have multiple mode to realize, illustrates no longer one by one here.
All moved computer program on each unit in device shown in Figure 2, these unit can be provided with or be applied on the some functional units in the electronic equipment, for example CPU etc.The electronic equipment here generally is meant server.
Method shown in Figure 1 and device shown in Figure 2 are to describe of the present inventionly from the angle of application program (other functional units the electronic equipment except that Memory Controller Hub), and in fact, the present invention can also describe from the angle of Memory Controller Hub.To this, the present invention also provides the management method of Hot Spare internal memory shown in Figure 3 and Memory Controller Hub shown in Figure 4.
As shown in Figure 3, a kind of management method of Hot Spare internal memory comprises:
S301: the application of the use Hot Spare internal memory that a functional unit in the electron gain equipment sends;
S302:, then allow said functional unit to use the Hot Spare internal memory if meet the first condition that is provided with in advance.
Both can be at the main memory normal operation period execution opportunity of S301 and S302, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.The executive agent of S301 and S302 can be a Memory Controller Hub.Memory Controller Hub can be meant the Memory Controller Hub in the electronic equipment, and the electronic equipment here generally is meant server.
The application of the use Hot Spare internal memory that a functional unit in the electron gain equipment sends can have multiple implementation, for example, obtains the data of the memory size of the required application of sign that said functional unit provides.A register can be set on the Memory Controller Hub, describe, this register is called first register here for ease of hereinafter.Certain functional unit in the electronic equipment can write the data of the memory size that identifies required application in said first register; Like this; Memory Controller Hub has just obtained to identify the data of the memory size that this functional unit need apply for, the actual application that has been equivalent to obtain use the Hot Spare internal memory.
After Memory Controller Hub obtains to use the application of Hot Spare internal memory; Can judge whether current states meets the first condition that is provided with in advance, if then allow said functional unit to use the Hot Spare internal memory; Otherwise, do not allow said functional unit to use the Hot Spare internal memory.Judge whether current states meets in advance the first condition that is provided with and for example do, whether the Hot Spare internal memory is replacing main memory work, the current operable memory headroom of Hot Spare internal memory whether can satisfy memory size that application uses etc.Certainly; The first condition that is provided with in advance judges perhaps whether current states meets the first condition that is provided with in advance other performances or implementation can also be arranged; Those skilled in the art can design the first condition that is provided with in advance according to actual needs or how judge that whether current states meets the first condition that is provided with in advance, illustrates no longer one by one here.
If confirm to meet the first condition that is provided with in advance, just can allow to apply for using the functional unit of Hot Spare internal memory to use the Hot Spare internal memory.Allow functional unit to use the Hot Spare internal memory that multiple implementation can be arranged, for example, the start address of the internal memory that allows to use is offered said functional unit.Specifically, can the start address of the internal memory that allows to use be written in first register.Certainly; Allow functional unit to use the Hot Spare internal memory that other implementations can also be arranged; Those skilled in the art can be according to actual needs and the start address of the internal memory that design allows to use is written to the implementation of first register, illustrates no longer one by one here.
When reality realizes; Memory Controller Hub can be safeguarded the state table of a Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table both can have been shared to other functional units in the electronic equipment, also can not share to other functional units in the electronic equipment.Table 1 is the part of a state table or state table.
Figure G2009100867631D00091
Table 1
After carrying out S301; If meet the first condition that is provided with in advance; Then also need in above-mentioned state table, record distribution give the memory headroom of said functional unit use; Like this, use during the memory headroom that distributes, as other functional units or when operating in other computer programs on the said functional unit and also applying for using the Hot Spare internal memory at said functional unit; Memory Controller Hub is through above-mentioned state table, just can confirm to distribute to memory headroom that said functional unit uses and can not reallocate to other functional units or operate in other computer programs uses on the said functional unit.
After carrying out S302, if meet the second condition that is provided with in advance, then Memory Controller Hub can forbid that said functional unit re-uses said Hot Spare internal memory.The second condition that is provided with in advance for example does, obtains the information that no longer need use said Hot Spare internal memory that said functional unit sends, detects main memory and break down etc.Wherein, break down, then forbid that said functional unit re-uses said Hot Spare internal memory and specifically can comprise if detect main memory: notify said functional unit to clear up the data in the said Hot Spare internal memory; Obtain the notice that cleans out that said functional unit sends; Refuse the application of all use Hot Spare internal memories.Certainly, the second condition that is provided with in advance can also have other manifestation modes, and those skilled in the art can design the second condition that is provided with in advance according to actual needs, illustrate no longer one by one here.
If meet in advance the second condition that is provided with, then forbid that said functional unit re-uses said Hot Spare internal memory and specifically can comprise: remove distributing to the record of the memory headroom that said functional unit uses at the state table that is used for safeguarding Hot Spare internal memory operating position; Like this; Follow-up have the functional unit application to use the Hot Spare internal memory again, and the then above-mentioned memory headroom of distributing to said functional unit use originally also is the memory headroom of candidate allocation.
Corresponding to method shown in Figure 3, the present invention provides a kind of Memory Controller Hub as shown in Figure 4, comprising: obtain unit 401, be used for the application of the use Hot Spare internal memory that a functional unit of electron gain equipment sends; Administrative unit 402 if be used for meeting the condition that is provided with in advance, then allows said functional unit to use the Hot Spare internal memory.
Obtain unit 401 and obtain to apply for that it both can be at the main memory normal operation period that use Hot Spare internal memory and administrative unit 402 allow said functional unit to use the opportunity of Hot Spare internal memory; Also can be during main memory breaks down, the instant heating archive memory replaces the main memory duration of work.
The application that obtains the use Hot Spare internal memory that a functional unit in the unit 401 electron gain equipment sends can have multiple implementation, for example, obtains the data of the memory size of the required application of sign that said functional unit provides.A register can be set on the Memory Controller Hub, describe, this register is called first register here for ease of hereinafter.Certain functional unit in the electronic equipment can write the data of the memory size that identifies required application in said first register; First register can offer the data that obtain and obtain unit 401; Like this; Obtain the data that unit 401 has just obtained to identify the memory size that this functional unit need apply for, the actual application that has been equivalent to obtain use the Hot Spare internal memory.Optional; Obtaining unit 401 can be exactly first register; Like this; After certain functional unit in electronic equipment can write the data of memory size of the required application of sign in said first register, first register (obtaining unit 401) had just obtained to identify the data of the memory size that this functional unit need apply for.
Memory Controller Hub shown in Figure 4 can comprise judging unit (not illustrating among the figure); After the application that obtains unit 401 acquisition use Hot Spare internal memories; Judging unit can judge whether current states meets the first condition that is provided with in advance, if then administrative unit 402 can allow said functional unit to use the Hot Spare internal memory; Otherwise administrative unit 402 does not allow said functional unit to use the Hot Spare internal memory.Whether the judgment unit judges current states meets in advance the first condition that is provided with, and whether the Hot Spare internal memory is replacing main memory work, the current operable memory headroom of Hot Spare internal memory whether can satisfy memory size that application uses etc.Certainly; The first condition that is provided with in advance judges perhaps whether current states meets the first condition that is provided with in advance other performances or implementation can also be arranged; Those skilled in the art can design the first condition that is provided with in advance according to actual needs or how judge that whether current states meets the first condition that is provided with in advance, illustrates no longer one by one here.
If judging unit confirms to meet the first condition that is provided with in advance, administrative unit 402 just can allow to apply for using the functional unit of Hot Spare internal memory to use the Hot Spare internal memory.Administrative unit 402 allows functional units to use the Hot Spare internal memories that multiple implementation can be arranged, and for example, the start address of the internal memory that allows to use is offered said functional unit.Specifically, administrative unit 402 can be written to the start address of the internal memory that allows to use in first register.Certainly; Administrative unit 402 allows functional unit to use the Hot Spare internal memory that other implementations can also be arranged; Those skilled in the art can be according to actual needs and the start address of the internal memory that design management unit 402 allows to use is written to the implementation of first register, illustrates no longer one by one here.
When reality realizes; Memory Controller Hub can be safeguarded the state table of a Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table both can have been shared to other functional units in the electronic equipment, also can not share to other functional units in the electronic equipment.The work of maintenance state table can be carried out by administrative unit 402, also can be carried out by an independent maintenance unit.After the application that obtains unit 401 acquisition use Hot Spare internal memories; If judging unit confirms to meet the first condition that is provided with in advance; Then administrative unit 402 also need record distribution be given the memory headroom of said functional unit use in above-mentioned state table; Like this; Use during the memory headroom that distributes at said functional unit; As other functional units or when operating in other computer programs on the said functional unit and also applying for using the Hot Spare internal memory, administrative unit 402 is through above-mentioned state table, just can confirm to distribute to memory headroom that said functional unit uses and can not reallocate to other functional units or operate in other computer programs uses on the said functional unit.
After administrative unit 402 allowed said functional unit to use the Hot Spare internal memory, if judging unit meets the second condition that is provided with in advance, then administrative unit 402 can forbid that said functional unit re-uses said Hot Spare internal memory.The second condition that is provided with in advance for example does; Obtaining unit 401 obtains the information that no longer need use said Hot Spare internal memory, administrative unit 402 that said functional unit sends and detects main memory and break down etc.; Certainly, detection also can be carried out by an independent detecting unit.Wherein, If administrative unit 402 detects main memory and breaks down; Then administrative unit 402 can notify said functional unit to clear up the data in the said Hot Spare internal memory; Obtain unit 401 and obtain the notice that cleans out that said functional unit sends, the application of the use Hot Spare internal memory that administrative unit 402 refusals are all.Certainly, the second condition that is provided with in advance can also have other manifestation modes, and those skilled in the art can design the second condition that is provided with in advance according to actual needs, illustrate no longer one by one here.
If judging unit is confirmed to meet in advance the second condition that is provided with, then administrative unit 402 forbids that said functional unit re-uses said Hot Spare internal memory and specifically can comprise: remove distributing to the record of the memory headroom that said functional unit uses at the state table that is used for safeguarding Hot Spare internal memory operating position; Like this; Follow-up have the functional unit application to use the Hot Spare internal memory again, and the then above-mentioned memory headroom of distributing to said functional unit use originally also is the memory headroom of candidate allocation.
Need to prove that the work of above-mentioned judging unit can be carried out by administrative unit 402.
Need to prove that also Memory Controller Hub shown in Figure 4 can be meant the Memory Controller Hub in the electronic equipment, the electronic equipment here generally is meant server.
Except that the disposal route of Hot Spare internal memory shown in Figure 1, the present invention also provides the disposal route of another kind of Hot Spare internal memory.As shown in Figure 5, comprising:
S501: judge whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory;
S502: if then use the memory headroom satisfy the demands, and notify Memory Controller Hub to the control internal memory with the information of the memory headroom of said use.
Both can be at the main memory normal operation period execution opportunity of S501, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.Can be at the main memory normal operation period execution opportunity of S502.The executive agent of S501 and S502 can be the some functional units in the electronic equipment; CPU etc. for example; Further again, the executive agent of S501 and S502 can be the some functional units in the electronic equipment and operate in the computer program on the functional unit.The electronic equipment here generally is meant server.
Memory Controller Hub can be safeguarded the state table of a record Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table can be shared to other functional units in the electronic equipment.Judge when whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory, can write down that the state table inquiry of Hot Spare internal memory operating position is said judges whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory in said Memory Controller Hub being used for of safeguarding.If satisfy, then carry out S502, otherwise, can carry out S503, promptly do not use the Hot Spare internal memory.Here need to prove, confirm in the Hot Spare internal memory that the current memory headroom that can use does not satisfy the demands a variety of situations can be arranged.For example, because the Hot Spare internal memory is replacing main memory work, so the Hot Spare internal memory can not be used by said functional unit; Again for example; Because the partial memory space of Hot Spare internal memory is used by other functional units or the application program that operates on the said functional unit; And in the Hot Spare internal memory remaining memory headroom capacity less than the capacity of said functional unit application, so the Hot Spare internal memory can not be used by said functional unit.
If confirm that the current memory headroom that can use satisfies the demands in the Hot Spare internal memory, just can use the memory headroom that satisfies the demands, and the information of the memory headroom of said use is notified to the Memory Controller Hub of controlling internal memory.
Use memory headroom description can with reference in the method shown in Figure 1 about using the description of Hot Spare internal memory, repeat no more here.
Can be provided with described in the embodiment shown in fig. 1 first register on the Memory Controller Hub, when notifying the Memory Controller Hub to the control internal memory, can the start address of the memory headroom that uses be write first register the information of the memory headroom of said use.Certainly, notify Memory Controller Hub that multiple implementation can also be arranged the information of the memory headroom of said use, illustrate no longer one by one here to the control internal memory.After Memory Controller Hub obtains the information of memory headroom of said use, can in state table, revise the state of the memory headroom of said use.
Behind the memory headroom that use satisfies the demands,, then can the information of the memory headroom that no longer need use be notified to said Memory Controller Hub if no longer need use the memory headroom that satisfies the demands.Concrete; Can be provided with described in the embodiment shown in fig. 1 second register on the Memory Controller Hub; When notifying the information of the memory headroom that no longer need use to said Memory Controller Hub, can the start address of the memory headroom that uses be write second register.Certainly, the information of the memory headroom that no longer need use notified to said Memory Controller Hub can also have multiple implementation, illustrates no longer one by one here.
Corresponding to method shown in Figure 5, the present invention also provides a kind of treating apparatus of Hot Spare internal memory.As shown in Figure 6, comprising: judging unit 601 is used for judging whether the current memory headroom that can use of Hot Spare internal memory satisfies the demands; Use unit 602, confirm that the current memory headroom that can use of Hot Spare internal memory can satisfy the demands, then use the memory headroom that satisfies the demands if be used for said judging unit 601; Notification unit 603 confirms that the current memory headrooms that can use of Hot Spare internal memory can satisfy the demands if be used for said judging unit 601, then notifies the Memory Controller Hub to the control internal memory with the information of the memory headroom of said use.
Judging unit 601 judges that both can be at the main memory normal operation period opportunity that whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.It can be at the main memory normal operation period that memory headroom that 602 uses of use unit satisfy the demands and notification unit 603 are notified the opportunity to the Memory Controller Hub of controlling internal memory with the information of the memory headroom of said use.
Memory Controller Hub can be safeguarded the state table of a record Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table can be shared to other functional units in the electronic equipment.Judging unit 601 judges when whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory, can write down that the state table inquiry of Hot Spare internal memory operating position is said judges whether the current memory headroom that can use satisfies the demands in the Hot Spare internal memory in said Memory Controller Hub being used for of safeguarding.If satisfy, then use unit 602 to use the memory headroom that satisfies the demands, notification unit 603 is notified the Memory Controller Hub to the control internal memory with the information of the memory headroom of said use, otherwise, use unit 602 not use the Hot Spare internal memory.Here need to prove that the current memory headroom that can use does not satisfy the demands a variety of situations can be arranged in judging unit 601 definite Hot Spare internal memories.For example, because the Hot Spare internal memory is replacing main memory work, so the Hot Spare internal memory can not be used by said functional unit; Again for example; Because the partial memory space of Hot Spare internal memory is used by other functional units or the application program that operates on the said functional unit; And in the Hot Spare internal memory remaining memory headroom capacity less than the capacity of said functional unit application, so the Hot Spare internal memory can not be used by said functional unit.
If judging unit 601 confirms that the current memory headroom that can use satisfies the demands in the Hot Spare internal memory; Use unit 602 just can use the memory headroom that satisfies the demands, notification unit 603 is notified the Memory Controller Hub to the control internal memory with the information of the memory headroom of said use.
Use unit 602 use memory headrooms description can with reference in the device shown in Figure 2 about using unit 202 to use the description of Hot Spare internal memories, repeat no more here.
Can be provided with described in the embodiment shown in Figure 2 first register on the Memory Controller Hub; When notification unit 603 is notified the Memory Controller Hub to the control internal memory with the information of the memory headroom of said use, can the start address of the memory headroom that uses be write first register.Certainly, notification unit 603 notifies the Memory Controller Hub to the control internal memory that multiple implementation can also be arranged the information of the memory headroom of said use, illustrates no longer one by one here.After Memory Controller Hub obtains the information of memory headroom of said use, can in state table, revise the state of the memory headroom of said use.
After using unit 602 to use the memory headroom that satisfies the demands; If use unit 602 no longer need use the memory headroom that satisfies the demands; Then notification unit 603 can be notified the information of the memory headroom that no longer need use to said Memory Controller Hub; At this moment, the effect of notification unit 603 is equivalent to the effect of releasing unit shown in Figure 2 203.Concrete; Can be provided with described in the embodiment shown in fig. 1 second register on the Memory Controller Hub; When the information of the memory headroom that notification unit 603 will no longer need use is notified to said Memory Controller Hub, can the start address of the memory headroom that uses be write second register.Certainly, the information of the memory headroom that notification unit 603 will no longer need use is notified to said Memory Controller Hub can also have multiple implementation, illustrates no longer one by one here.
All moved computer program on each unit in device shown in Figure 6, these unit can be provided with or be applied on the some functional units in the electronic equipment, for example CPU etc.The electronic equipment here generally is meant server.
Method shown in Figure 5 and device shown in Figure 6 are to describe of the present inventionly from the angle of application program (other functional units the electronic equipment except that Memory Controller Hub), in fact, can also describe the present invention from the angle of Memory Controller Hub again.To this, the present invention also provides the Memory Controller Hub shown in the management method and 8 of Hot Spare internal memory shown in Figure 7.
As shown in Figure 7, a kind of management method of Hot Spare internal memory comprises:
S701: the information of sharing the user mode of Hot Spare internal memory;
S702: the notice of the memory headroom that the said functional unit that a functional unit in the electron gain equipment sends has used;
S703: the user mode of revising the Hot Spare internal memory.
Both can be at the main memory normal operation period execution opportunity of S701 and S702, also can be during main memory breaks down, and the instant heating archive memory replaces the main memory duration of work.Can be at the main memory normal operation period execution opportunity of S703.The executive agent of S701, S702 and S703 can be a Memory Controller Hub.Memory Controller Hub can be meant the Memory Controller Hub in the electronic equipment, and the electronic equipment here generally is meant server.
Memory Controller Hub can be safeguarded the state table of a Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table can be shared to other functional units in the electronic equipment, and like this, other functional units just can inquire the operating position of Hot Spare internal memory.
Can be provided with described in the embodiment shown in fig. 3 first register on the Memory Controller Hub.The notice of the memory headroom that the said functional unit that a functional unit in the electron gain equipment sends has used can have multiple implementation, and for example, functional unit writes first register with the start address of the memory headroom that uses.
After Memory Controller Hub obtains the notice of the memory headroom that said functional unit used, can revise the user mode of Hot Spare internal memory.For example, in above-mentioned state table, revise the state of the memory headroom that has used.
After revising the user mode of Hot Spare internal memory,, then can revise the user mode of Hot Spare internal memory once more if obtain the notice of the memory headroom that no longer need use that said functional unit sends.The notice that obtains the memory headroom that no longer need use that said functional unit sends can have multiple implementation; For example; Can be provided with described in the embodiment shown in fig. 3 second register on the Memory Controller Hub, functional unit writes second register with the start address of the memory headroom that uses.The user mode of revising the Hot Spare internal memory once more also can have multiple implementation, for example, in above-mentioned state table, revises the state of the memory headroom that uses once more.
Corresponding to method shown in Figure 7, the invention provides a kind of Memory Controller Hub, as shown in Figure 8, comprising: administrative unit 802 is used for sharing the information of the user mode of Hot Spare internal memory; Obtain unit 801, be used for the notice of the memory headroom that said functional unit that a functional unit of electron gain equipment sends used; After said acquisition unit 801 obtained said notice, said administrative unit 802 was revised the user mode of Hot Spare internal memory.
Both can be at the main memory normal operation period opportunity of the notice of the memory headroom that the information of the user mode of administrative unit 802 shared Hot Spare internal memories and the acquisition unit said functional unit of 801 acquisitions have used; Also can be during main memory breaks down, the instant heating archive memory replaces the main memory duration of work.Can be at the main memory normal operation period opportunity that administrative unit 802 is revised the user mode of Hot Spare internal memory.
Administrative unit 802 can be safeguarded the state table of a Hot Spare internal memory operating position, and this state table for example can write down information such as which memory headroom of Hot Spare internal memory can use, which memory headroom is used, when begin to be used.This state table can be shared to other functional units in the electronic equipment, and like this, other functional units just can inquire the operating position of Hot Spare internal memory.Certainly, administrative unit 802 also can be safeguarded by an independent maintenance unit (not illustrating among the figure).
Can be provided with described in the embodiment shown in fig. 4 first register on the Memory Controller Hub.The notice of the memory headroom that the said functional unit that a functional unit in the acquisition unit 801 electron gain equipment sends has used can have multiple implementation, and for example, functional unit writes first register with the start address of the memory headroom that uses.Certainly, first register can be a part that obtains unit 801.
After the notice of the memory headroom that the acquisition unit said functional unit of 801 acquisitions has used, administrative unit 802 can be revised the user mode of Hot Spare internal memory.For example, in above-mentioned state table, revise the state of the memory headroom that has used.Certainly, the user mode of revising the Hot Spare internal memory can be accomplished by above-mentioned independent maintenance unit.
After administrative unit 802 was revised the user mode of Hot Spare internal memory, if the notice of the memory headroom that no longer need use that the acquisition unit said functional unit of 801 acquisitions sends, then administrative unit 802 can be revised the user mode of Hot Spare internal memory once more.The notice of the memory headroom that no longer need use that the acquisition unit said functional unit of 801 acquisitions sends can have multiple implementation; For example; Can be provided with described in the embodiment shown in fig. 4 second register on the Memory Controller Hub, functional unit writes second register with the start address of the memory headroom that uses.The user mode that administrative unit 802 is revised the Hot Spare internal memory once more also can have multiple implementation, for example, in above-mentioned state table, revises the state of the memory headroom that uses once more.Certainly, second register also can be a part that obtains unit 801.
Need to prove that Memory Controller Hub shown in Figure 8 can be meant the Memory Controller Hub in the electronic equipment, the electronic equipment here generally is meant server.
For making those skilled in the art more clearly understand the present invention, introduce two preferred embodiments below again.
First preferred embodiment
In this preferred embodiment, application program (driver) is used the Hot Spare internal memory to the Memory Controller Hub application, with the cache memory (cache) of Hot Spare internal memory as hard disk.Realization flow is as shown in Figure 9, comprising:
S901: application program (driver) is used the Hot Spare internal memory to the Memory Controller Hub application;
S902: judge whether success, if, then carry out S903, otherwise, process ends;
S903: the memory headroom that application program (driver) will be applied for reads the data in the hard disk as cache from cache;
S904: judge whether to hit, if, then carry out S906, otherwise, S905 carried out;
S905: application program (driver) reads data in batches to cache from hard disk;
S906: application program (driver) obtains required data from cache.
Second preferred embodiment
In this preferred embodiment, after application program (driver) was with the cache of Hot Spare internal memory as hard disk, if fault has appearred in main memory, then Memory Controller Hub need be launched the Hot Spare internal memory and substitute out of order main memory.Realization flow is shown in figure 10, comprising:
S1001: Memory Controller Hub detects main memory and breaks down;
S1002: judge whether the Hot Spare internal memory is used, if, then carry out S1003, otherwise, S1005 carried out;
S1003: notification application (driver) is cleared up the data in the Hot Spare internal memory (cache);
S1004: after application program (driver) has been cleared up the data among the cache, with the message informing Memory Controller Hub that cleans out;
S1005: the cache function of Memory Controller Hub cancellation Hot Spare internal memory, promptly refusal uses the application of Hot Spare internal memory;
S1006: the Hot Spare internal memory replaces out of order main memory work.
In the present invention, if main memory keeps normal operating condition, then the Hot Spare internal memory can be used by the functional unit in the electronic equipment, has reduced the wasting of resources.
In the present invention, if main memory keeps normal operating condition, then the Hot Spare internal memory cache that can be used as hard disk uses, and can accelerate travelling speed like this, improves the performance of electronic equipment.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (10)

1. method of managing the Hot Spare internal memory, said method is applied to one and comprises in the electronic equipment of main memory and Hot Spare internal memory, it is characterized in that, comprising:
Whether detect said main memory in operate as normal;
Whether when said main memory operate as normal, detecting has application program that said Hot Spare internal memory is used as buffer memory;
When having detected application program said Hot Spare internal memory used as buffer memory, handle said application, whether agree the buffer memory of said Hot Spare internal memory with decision as said application program;
When agreeing said Hot Spare internal memory, the buffer memory of said Hot Spare internal memory as said application program used as the buffer memory of said application program.
2. the method for claim 1 is characterized in that, whether said detection has application program that said Hot Spare internal memory is used as buffer memory is specially: the data that detect the memory size whether required application of sign that application program provides is arranged.
3. the method for claim 1; It is characterized in that; Said said Hot Spare internal memory is used as the buffer memory of said application program is specially: the start address of the internal memory that will allow to use offers said application program, and is being used for safeguarding that the state table record distribution of Hot Spare internal memory operating position gives the memory headroom of said application program use.
4. like any described method of claim 1-3, it is characterized in that, further comprise: forbid that said application program continues to use said Hot Spare internal memory.
5. method as claimed in claim 4 is characterized in that, saidly forbids that said application program continues to use said Hot Spare internal memory to be specially: when detecting the main memory cisco unity malfunction, forbid that said application program uses said Hot Spare internal memory.
6. method as claimed in claim 4 is characterized in that, the said said Hot Spare internal memory of said application program continuation use of forbidding is specially:
Obtain the information that no longer continues to use said Hot Spare internal memory that said application program is sent;
Forbid that said application program continues to use said Hot Spare internal memory.
7. an electronic equipment comprises main memory and Hot Spare internal memory, it is characterized in that, also comprises:
Whether first detecting unit is used to detect said main memory in operate as normal;
Second detecting unit, whether when said first detection goes out said main memory operate as normal, detecting has application program that said Hot Spare internal memory is used as buffer memory;
First processing unit is used in said second detection handling said application when having application program that said Hot Spare internal memory is used as buffer memory, whether agrees the buffer memory of said Hot Spare internal memory as said application program with decision;
Second processing unit is used for when said first processing unit is agreed said Hot Spare internal memory as the buffer memory of said application program, and the buffer memory of said Hot Spare internal memory as said application program used.
8. electronic equipment as claimed in claim 7 is characterized in that, said second detecting unit specifically is used to detect the data of the memory size whether required application of sign that application program provides is arranged.
9. electronic equipment as claimed in claim 7; It is characterized in that; Said second processing unit specifically is used for the start address of the internal memory that allows to use is offered said application program, and is being used for safeguarding the memory headroom of the state table record distribution of Hot Spare internal memory operating position to said application program use.
10. like any described electronic equipment of claim 7-9, it is characterized in that, further comprise: the 3rd processing unit is used to forbid that said application program continues to use said Hot Spare internal memory.
CN2009100867631A 2009-06-29 2009-06-29 Method and electronic equipment for managing warm back-up internal memory Active CN101937400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100867631A CN101937400B (en) 2009-06-29 2009-06-29 Method and electronic equipment for managing warm back-up internal memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100867631A CN101937400B (en) 2009-06-29 2009-06-29 Method and electronic equipment for managing warm back-up internal memory

Publications (2)

Publication Number Publication Date
CN101937400A CN101937400A (en) 2011-01-05
CN101937400B true CN101937400B (en) 2012-07-25

Family

ID=43390739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100867631A Active CN101937400B (en) 2009-06-29 2009-06-29 Method and electronic equipment for managing warm back-up internal memory

Country Status (1)

Country Link
CN (1) CN101937400B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102725746B (en) * 2011-07-20 2015-01-21 华为技术有限公司 Method and apparatus for managing memories in distributed computer system
CN102902602B (en) * 2012-09-19 2015-08-19 华为技术有限公司 The method of data thermal backup, device and storage system
CN104252419B (en) * 2014-09-16 2017-09-19 华为技术有限公司 A kind of method and device of Memory Allocation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226457A (en) * 2008-01-25 2008-07-23 中兴通讯股份有限公司 On-line capacity-enlarging system and method for magnetic disc array
CN101286143A (en) * 2008-05-26 2008-10-15 中兴通讯股份有限公司 Method for supervisory unit driving cache

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226457A (en) * 2008-01-25 2008-07-23 中兴通讯股份有限公司 On-line capacity-enlarging system and method for magnetic disc array
CN101286143A (en) * 2008-05-26 2008-10-15 中兴通讯股份有限公司 Method for supervisory unit driving cache

Also Published As

Publication number Publication date
CN101937400A (en) 2011-01-05

Similar Documents

Publication Publication Date Title
CN103810058B (en) Backup method, equipment and system for virtual machine
CN103019888B (en) Backup method and device
US8127099B2 (en) Resource recovery using borrowed blocks of memory
JP6882662B2 (en) Migration program, information processing device and migration method
US20090077302A1 (en) Storage apparatus and control method thereof
JP6459644B2 (en) Storage control device, control system, and control program
JP2010086474A (en) Information backup/restore processor, and information backup/restore processing system
CN101878471A (en) Data storage space recovery system and method
CN102447650A (en) Consistent messaging with replication
JP5840594B2 (en) Method and apparatus for memory management by storage system
JP2010113712A (en) Method, device and system for storing data in cache in power failure
US20170177225A1 (en) Mid-level controllers for performing flash management on solid state drives
CN103678149A (en) Data processing method and device
CN101937400B (en) Method and electronic equipment for managing warm back-up internal memory
CN112667422A (en) Memory fault processing method and device, computing equipment and storage medium
CN114556310A (en) Garbage collection in a data storage system
CN103559119B (en) File operation requests disposal route and device
US9400723B2 (en) Storage system and data management method
JP2009151393A (en) Storage medium control device, storage medium managing system, storage medium control method, and storage medium control program
US11500741B2 (en) Data write method and storage system
JP2005092308A (en) Disk management method and computer system
JP2015179419A (en) Cache control apparatus, control method thereof, storage device, and computer program
WO2016006108A1 (en) Storage and control method therefor
CN107122261B (en) Data reading and writing method and device of storage equipment
JP6142510B2 (en) Information storage control device, control method therefor, and computer program

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