Embodiment
The embodiment of the invention provides a kind of method of supplying power to and electric supply installation of storage system, can avoid system when abnormal power-down takes place, and causes controlling the memory buffer store data inside and loses.For the ease of fully understanding to embodiment of the invention technical scheme, make that purpose of the present invention, technical scheme and advantage are clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is carried out clear, complete description.
Embodiment one:
Please refer to Fig. 1, Fig. 1 is for being arranged on the structural representation of the storage system of the ROC architectural framework on the motherboard circuit in the embodiment of the invention.This storage system mainly comprises: CPU, data cache, control cache, north bridge chips, ASIC, 2068E module, DE4 module, disk, Flash type storer and HOST module;
In the storage system of ROC architectural framework, with data cache and control cache separate management.Wherein, the HOST module connects host side, receives the request of data that the host side user sends; The DE4 module is used for the mutual of request of data and data feedback result between HOST module and the ASIC; The 2068E module is used to realize the conversion of interface shape between disk and the ASIC; CPU directly with control cache and be connected, store OS, the system file relevant among this control cache with the data message index; Data cache links to each other with ASIC.
By with the separating of data cache and CPU, improve the performance of CPU.
Please refer to Fig. 2, Fig. 2 is the electric supply installation structural representation of a kind of storage system of the embodiment of the invention;
This device comprises:
Mainboard detecting unit 201 is used for detecting in real time the externally fed state of motherboard circuit;
Described motherboard circuit comprises: control cache, data cache and connect the CPU of described control cache, described data cache comprise and read address storage space and write address storage space;
First power module is enabled unit 202, be used for when the externally fed that detects described motherboard circuit is interruption status, enable the electric power source pair of module CPU power supply of described motherboard circuit inside, the system file data unloading relevant with the data message index that makes CPU to control to have stored in the memory buffer read the address storage space to Data Buffer Memory;
First interrupt location 203, be used for when described CPU will control the system file data unloading relevant that memory buffer stored with the data message index to Data Buffer Memory read the address storage space after, interrupt the power supply of the described CPU of described electric power source pair of module.
Need to prove herein, the data message index is that a class stores the system file data that concerns under subordinate's file and the higher level's file, the path of searching in order to a certain specific data information of record search, have only under the prerequisite of this part system file existence, could correctly find the specific data information among the data cache.
When data cache read the address storage space when enough big, for easy to operate, also can with all data conversion storages of having stored among the control cache to data cache read the address storage space, to this, the present invention does not do concrete qualification.
In the embodiment of the invention, will control cache and data cache and carry out separate management, wherein, CPU only directly connects control cache.When the externally fed that detects described motherboard circuit when mainboard detecting unit 201 is interruption status, trigger described power module start unit 202, utilize described power module to keep power supply; First power module is enabled unit 202 and is kept under the situation of power supply at described power module, and the system file data unloading relevant with the data message index that makes CPU to control to have stored among the cache read the address storage space to data cache's.Like this, even CPU outage, leave the system file data relevant that data cache reads in the storage space of address in and can not lose yet, thereby the assurance system can not cause controlling the defective that the cache store data inside is lost when abnormal power-down takes place with the data message index.
For the ease of the present invention is further understood, describe the present invention below in conjunction with the specific embodiment of the present invention.
Usually, according to OS according to the division of the data type of being stored to the data space in the data cache, data space in the data cache specifically can be divided into and read address storage space and write address storage space, read the address storage space and be used for depositing specially read-only data, but the write address storage space is used for depositing specially write data.
When the externally fed that detects this storage system is interruption status, enable the power module of described motherboard circuit inside, continue to keep the power supply of CPU by this power module, control CPU will control the system file data unloading relevant with search tree of having stored among the cache and read the address storage space to data cache, read the address storage space when enough big as data cache, for easy to operate, also all data conversion storages that control can have been stored among the cache are read the address storage space to data cache.
Like this, even CPU outage leaves the system file data relevant with search tree that data cache reads in the storage space of address in and can not lose yet, thereby the assurance system can not cause controlling the defective that the cache store data inside is lost when the generation abnormal power-down.And, since with the system file data unloading to Data Buffer Memory read interrupted power supply behind the storage space of address to CPU, only need to utilize the electric power source pair of module ASIC that is arranged on motherboard circuit inside to power, therefore reached cost-effective purpose.
Embodiment two
Because abnormal power-down when taking place in system, the data of not preserving in the data cache write address storage space also abnormal power-down of possibility adjoint system are lost, appearance for fear of this situation, the embodiment of the invention provides the electric supply installation of another storage system, with reference to Fig. 3, this device specifically comprises:
Mainboard detecting unit 201 is used for detecting in real time the externally fed state of motherboard circuit;
Described motherboard circuit comprises: control cache, data cache and connect the CPU of described control cache, described data cache comprise and read address storage space and write address storage space;
First power module is enabled unit 202, be used for when the externally fed that detects described motherboard circuit is interruption status, enable the electric power source pair of module CPU power supply of described motherboard circuit inside, the system file data unloading relevant with the data message index that makes CPU to control to have stored in the memory buffer read the address storage space to Data Buffer Memory;
First interrupt location 203, be used for when described CPU will control the system file data unloading relevant that memory buffer stored with the data message index to Data Buffer Memory read the address storage space after, interrupt the power supply of the described CPU of described electric power source pair of module;
The second source module is enabled unit 204, the electric power source pair of module that is used to enable described motherboard circuit inside is arranged on the integrated circuit power supply between described Data Buffer Memory and the Flash type storer, make described integrated circuit with the corresponding data unloading of described Data Buffer Memory write address storage space storage to described Flash type storer.
Increase the second source module in the embodiment of the invention and enable unit 204, keep at described power module under the situation of power supply, enable unit 204 by this second source module, with the corresponding data unloading of data cache write address storage space storage to Flash type storer.Wherein, the function of described integrated circuit is identical with the function of aforementioned ASIC, and still, in specific implementation process, for the concrete setting of this integrated circuit, the present invention does not do concrete qualification,
Usually, for the efficient of the corresponding data unloading that improves data cache write address storage space stored, adopt the corresponding data of Flash type memory stores data cache write address storage space stored.Wherein, corresponding data is read from data cache write address storage space, and Flash type storer is gone in this corresponding data unloading can realize by the integrated circuit that is preset between described Data Buffer Memory and the Flash type storer, provide power supply by power module to this integrated circuit.
When finishing the corresponding data unloading in the data cache write address storage space to Flash type storer, can interrupt the power supply of the described integrated circuit of electric power source pair of module, with further saving power consumption.Therefore, in embodiments of the present invention, can also comprise in the electric supply installation of described storage system:
Second interrupt location 205, be used for when described corresponding data unloading with Data Buffer Memory write address storage space storage to Flash type storer, interrupt the power supply of the described integrated circuit of described electric power source pair of module.
In addition, when the system file data unloading of finishing the corresponding search tree that control has been stored in the memory buffer is read the address storage space to Data Buffer Memory, and the corresponding data unloading of finishing the storage of Data Buffer Memory write address storage space is triggered to Flash type storer, power module on can the final plant closure mainboard, interrupt the bulk supply of this power module, thereby reach the purpose of the power consumption of farthest saving mainboard.
In above-mentioned two embodiment technical schemes, because CPU will control the system file data unloading of having stored among the cache and read the address storage space to data cache, and it is the corresponding data unloading of Data Buffer Memory write address storage space storage is fast to the memory rate of Flash type storer, power consumption is low, therefore, only can provide the unloading process required electric energy, thereby simplify the design operation of power supply, realize simple, convenient by the power module that is provided with on the mainboard.
Power module can be realized by the battery or the large bulk capacitance that are arranged on the mainboard.Therefore, need not provide UPS power supply, only can provide related data among control cache and the data cache is carried out the required power supply of unloading, can reduce the difficulty of power management, simultaneously, reduce hardware cost by described power module.
In the concrete process of implementing of those skilled in the art, can realize that first power module enables the corresponding function that the unit 204 and second interrupt location 205 are enabled in unit 202, first interrupt location 203, second source module by switchgear, the specific implementation of described switchgear can be carried out the selectivity setting according to application scenarios, for example adopt: triode, MOS (Metal Oxide Semicondutor, metal-oxide semiconductor (MOS)) transistor, the present invention does not do concrete qualification to this.
Need to prove that the technical scheme that the embodiment of the invention provides not only can be applied to the storage system of ROC architectural framework, is equally applicable to the storage system that other have the analog system structure.
Embodiment three
Corresponding said system embodiment, the embodiment of the invention provides a kind of method of supplying power to embodiment of storage system, as shown in Figure 4, is the steps flow chart of this method, and this method specifically may further comprise the steps:
Step 401, detect the externally fed state of motherboard circuit in real time;
Step 402, when the externally fed that detects described motherboard circuit is interruption status, enable the electric power source pair of module CPU power supply of described motherboard circuit inside, the system file data unloading relevant with the data message index that makes CPU to control to have stored in the memory buffer read the address storage space to Data Buffer Memory;
Step 403, after described unloading success, interrupt the power supply of the described CPU of described electric power source pair of module.
Need to prove herein, the data message index is that a class stores the system file data that concerns under subordinate's file and the higher level's file, the path of searching in order to a certain specific data information of record search, have only under the prerequisite of this part system file existence, could correctly find the specific data information among the data cache.
When the embodiment of the invention is interruption status when the externally fed that detects described motherboard circuit, start the power module that is arranged on motherboard circuit, described power module can continue to keep the power supply of CPU, to control the system file data unloading relevant of having stored among the cache by CPU and read the address storage space to data cache with the data message index, and after this unloading process finishes, interrupt the power supply of the described CPU of described electric power source pair of module.Like this, even CPU outage, leave the system file data relevant that data cache reads in the storage space of address in and can not lose yet, thereby the assurance system can not cause controlling the defective that the cache store data inside is lost when abnormal power-down takes place with the data message index.And, since with the system file data unloading to Data Buffer Memory read interrupted power supply behind the storage space of address to CPU, only need to utilize the electric power source pair of module ASIC that is arranged on motherboard circuit inside to power, therefore reached cost-effective purpose.
When data cache read the address storage space when enough big, for easy to operate, also can with all data conversion storages of having stored among the control cache to data cache read the address storage space, to this, the present invention does not do concrete qualification.
Embodiment four
Because abnormal power-down when taking place in system, the data of not preserving in the data cache write address storage space also abnormal power-down of possibility adjoint system are lost, appearance for fear of this situation, the embodiment of the invention provides the method for supplying power to of another storage system, as shown in Figure 5, be the steps flow chart of this method, this method specifically may further comprise the steps:
Step 401, detect the externally fed state of motherboard circuit in real time;
Step 402, when the externally fed that detects described motherboard circuit is interruption status, enable the electric power source pair of module CPU power supply of described motherboard circuit inside, the system file data unloading relevant with the data message index that makes CPU to control to have stored in the memory buffer read the address storage space to Data Buffer Memory;
Step 403, after described unloading success, interrupt the power supply of the described CPU of described electric power source pair of module;
Step 404, the electric power source pair of module of enabling described motherboard circuit inside are arranged on the integrated circuit power supply between described Data Buffer Memory and the Flash type storer, make described integrated circuit with the corresponding data unloading of described Data Buffer Memory write address storage space storage to described Flash type storer.
The embodiment of the invention has increased the operation of step 404 on the basis of a last embodiment, utilize power module to keep power supply, with the corresponding data unloading of data cache write address storage space storage to Flash type storer, thereby avoid system when abnormal power-down takes place, the data of not preserving in the data cache write address storage space also abnormal power-down of possibility adjoint system are lost.
Usually, for the efficient of the corresponding data unloading that improves data cache write address storage space stored, adopt the corresponding data of Flash type memory stores data cache write address storage space stored.Wherein, corresponding data is read from data cache write address storage space, and Flash type storer is gone in this corresponding data unloading can realize by the integrated circuit that is preset between described Data Buffer Memory and the Flash type storer, by this integrated circuit power supply of electric power source pair of module.
Need to prove that in the embodiment of the invention, the concrete operations of step 402 and step 404 may be incorporated in the same step and take place simultaneously; Also can first execution in step 404, execution in step 402 again, and to this, the present invention does not do concrete qualification, and those skilled in the art can implement specifically set according to reality.
When finishing the corresponding data unloading in the data cache write address storage space to Flash type storer, can also continue to carry out following optional operation steps:
Step 405, when described integrated circuit with the corresponding data unloading of Data Buffer Memory write address storage space storage to Flash type storer, interrupt the power supply of the described integrated circuit of described electric power source pair of module, with further saving power consumption.
In addition, described power module can be realized by the battery or the large bulk capacitance that are arranged on the mainboard.Therefore, need not provide UPS power supply, only can provide related data among control cache and the data cache is carried out the required power supply of unloading, can reduce the difficulty of power management, simultaneously, reduce hardware cost by described power module.
In addition, in another embodiment, read the address storage space when finishing system file data unloading that control has been stored in the memory buffer to Data Buffer Memory, and finish corresponding data unloading with Data Buffer Memory write address storage space storage to Flash type storer, power module on can the final plant closure mainboard, interrupt the bulk supply of this power module, farthest to save the power consumption of mainboard.
In the concrete process of implementing of those skilled in the art, can control described power module power supply by switchgear starts and interruption, the specific implementation of described switchgear can be carried out the selectivity setting according to application scenarios, for example adopt: triode, MOS (Metal Oxide Semicondutor, metal-oxide semiconductor (MOS)) transistor, the present invention does not do concrete qualification to this.
Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying creative work.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be conspicuous concerning those skilled in the art, and defined herein General Principle can realize under the situation of the spirit or scope that do not break away from the embodiment of the invention in other embodiments.Therefore, the embodiment of the invention will can not be restricted to these embodiment shown in this article, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.