CN104122977B - The method and storage system of a kind of data storage - Google Patents

The method and storage system of a kind of data storage Download PDF

Info

Publication number
CN104122977B
CN104122977B CN201410330397.0A CN201410330397A CN104122977B CN 104122977 B CN104122977 B CN 104122977B CN 201410330397 A CN201410330397 A CN 201410330397A CN 104122977 B CN104122977 B CN 104122977B
Authority
CN
China
Prior art keywords
cache
internal memory
data
memory
write
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
CN201410330397.0A
Other languages
Chinese (zh)
Other versions
CN104122977A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410330397.0A priority Critical patent/CN104122977B/en
Publication of CN104122977A publication Critical patent/CN104122977A/en
Application granted granted Critical
Publication of CN104122977B publication Critical patent/CN104122977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention relates to technical field of data storage, disclose the method and storage system of a kind of data storage, in this scenario, after the partial data in internal memory is moved in Cache, during by the partial data write-in nonvolatile memory in Cache, self-refresh state is saved as in setting, due to it is interior self-refresh state be present during can not be accessed, therefore, the power consumption of internal memory can be ignored, and reduce the power consumption of internal memory.

Description

The method and storage system of a kind of data storage
Technical field
The present invention relates to technical field of data storage, the method and storage system of more particularly to a kind of data storage.
Background technology
In actual applications, storage system needs to carry out substantial amounts of read-write operation to disk, still, the machinery read-write of disk Speed is far smaller than the read or write speed of storage system.In order to coordinate the greatest differences of both data transmission bauds, in storage system There is provided core buffer, wherein, the data frequently used are cached with internal memory.
Main frame from storage system read data when, in storage system checks whether the data that are read of main frame are stored in Among depositing, if be buffered among internal memory, data recovery is read directly from internal memory to main frame;If it is not buffered in internal memory Among, then main frame is replied to again after obtaining data to hard disc request.Main frame to storage system write data when, storage system is first Among data are write direct internal memory, and main frame is replied to immediately, inform that this write operation has been completed.Then again by data from Hard disk is write among internal memory.
Although internal memory drastically increases the speed of read-write data, volatile storage medium is saved as due to interior, if electric Source powers off suddenly, and being buffered in internal memory will also lose without the data of storage to hard disk.
When being powered off suddenly in order to avoid power supply, the problem of data being stored in internal memory are lost, storage system all can Stand-by power supply is configured, stand-by power supply is that CPU (Central Processing Unit, central processing unit), write buffer and hard disk carry Power supply energy.When the power break occurs, controller is hard by the data Cun Chudao being buffered in internal memory according to the electric energy that stand-by power supply provides In disk.
At present, when stand-by power supply provides electric energy, controller is generally in frequency reducing state, and normal power consumption is about 57W or so. But present storage system generally carries 12 root memory bars, per root memory bar typical case power consumption in 6W or so, stand-by power supply power supply When, the power consumption of all internal memories is 72W or so.The power consumption of internal memory considerably beyond the power consumption of controller, turns into stand-by power supply most Big consumer, controller is seriously reduced by the effective time in the data Cun Chudao hard disks being buffered in internal memory, that is, Say the defects of energy consumption of memory is larger in the prior art be present.
The content of the invention
The embodiment of the present invention provides a kind of method and storage system of data storage, is to solve to store in the prior art The defects of energy consumption of memory is larger after system power down.
Concrete technical scheme provided in an embodiment of the present invention is as follows:
First aspect, there is provided a kind of method of data storage, methods described is performed by the controller in storage system, described Storage system includes controller and nonvolatile memory, and methods described includes:
It is determined that during the storage system power down, the partial data in the internal memory is moved into cache memory In Cache;
The partial data in the Cache is write into the nonvolatile memory;
During the partial data in the Cache is write into the nonvolatile memory, described in setting Inside save as self-refresh state, wherein, it is described it is interior self-refresh state be present during can not be accessed.
It is described by the part number in the Cache with reference in a first aspect, in the first possible implementation After writing in the nonvolatile memory, methods described also includes:
Judge whether the data in the internal memory all write the nonvolatile memory;
In the case of it is determined that the data in the internal memory do not write the nonvolatile memory all, by the internal memory The self-refresh state is exited, and performs the partial data by the internal memory and moves step in Cache.
With reference to the first possible implementation of first aspect, in second of possible implementation, methods described Also include:
In the case of it is determined that the data in the internal memory all write the nonvolatile memory, deposited described in closing Storage system.
With reference in a first aspect, or first aspect the first to second possible implementation, it is possible at the third In implementation, the partial data by the internal memory is moved in Cache, is specifically included:
Fixing address space is set in the internal memory, wherein, the fixing address space can be visited by the Cache Ask;The partial data in the internal memory is copied to the fixing address space, and by the partial data from described solid Determine address space to be copied in the Cache;
Or
Partial data in the internal memory is moved in Cache using direct memory access dma mode.
With reference in a first aspect, or first aspect first to the third possible implementation, it is possible at the 4th kind It is described before the partial data in the Cache is write into the nonvolatile memory in implementation, also wrap Include:
Execution code cache in the internal memory to the Cache, the execution code is described for writing data into Nonvolatile memory;
The partial data in the Cache is write into the nonvolatile memory, specifically included;
It is based on the execution code in the Cache, the partial data write-in in the Cache is described non-easy The property lost memory.
Second aspect, there is provided a kind of storage system, including:
Controller, for it is determined that during the storage system power down, the partial data in the internal memory to be moved at a high speed In buffer storage Cache;The partial data in the Cache is write into the nonvolatile memory;By described in During the partial data in Cache writes the nonvolatile memory, set in described and save as self-refresh state, Wherein, it is described it is interior self-refresh state be present during can not be accessed;
Nonvolatile memory, for storing the data in the internal memory.
With reference to second aspect, in the first possible implementation, the controller is additionally operable to:
Judge whether the data in the internal memory all write the nonvolatile memory;
In the case of it is determined that the data in the internal memory do not write the nonvolatile memory all, by the internal memory The self-refresh state is exited, and performs the partial data by the internal memory and moves step in Cache.
With reference to the first possible implementation of second aspect, in second of possible implementation, the control Device is additionally operable to:
In the case of it is determined that the data in the internal memory all write the nonvolatile memory, deposited described in closing Storage system.
It is possible at the third with reference to the first to second possible implementation of second aspect, or second aspect In implementation, the controller is specifically used for:
Fixing address space is set in the internal memory, wherein, the fixing address space can be visited by the Cache Ask;The partial data in the internal memory is copied to the fixing address space, and by the partial data from described solid Determine address space to be copied in the Cache;
Or
Partial data in the internal memory is moved in Cache using direct memory access dma mode.
With reference to second aspect, or second aspect first to the third possible implementation, it is possible at the 4th kind In implementation, the controller is specifically used for:
Execution code cache in the internal memory to the Cache, the execution code is described for writing data into Nonvolatile memory;
The controller by the partial data in the Cache when writing the nonvolatile memory, specifically For;
It is based on the execution code in the Cache, the partial data write-in in the Cache is described non-easy The property lost memory.
The method of data storage provided in an embodiment of the present invention, it is determined that during storage system power down, by the part in internal memory Data-moving is into Cache;Partial data in Cache is write into nonvolatile memory;By the partial data in Cache During writing nonvolatile memory, self-refresh state is saved as in setting, wherein, during inside self-refresh state being present It can not be accessed, in this scenario, be write by the data in internal memory to Cache, make internal memory enter self-refresh state, by In it is interior self-refresh state be present during can not be accessed, in this process, the power consumption of internal memory can be ignored.So as to After reducing storage system power down, the power consumption of internal memory during data storage, extending controller will be buffered in internal memory Data Cun Chudao hard disks in effective time.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described.
Fig. 1 is a kind of flow chart of data storage provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another data storage provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of storage system provided in an embodiment of the present invention.
Embodiment
The purpose, technical scheme and advantage of the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention one Divide embodiment, rather than whole embodiments.
The preferred embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
Preferred embodiment described below can be applied in following scene, such as:Storage system power down, storage system In the case where stand-by power supply is powered, performed by the controller in storage system, the data in internal memory are write to storage system In nonvolatile memory, the nonvolatile memory in storage system can be hard disk, disk etc..
As shown in fig.1, providing a kind of method of data storage in the embodiment of the present invention, the detailed process of this method is such as Under:
Step 100:Controller moves the partial data in internal memory in Cache it is determined that during storage system power down;
Step 110:Partial data in Cache is write nonvolatile memory by controller;
Step 120:Controller is during by the partial data write-in nonvolatile memory in Cache, in setting Self-refresh state is saved as, wherein, it can not be accessed during self-refresh state being inside present.
In the embodiment of the present invention, trigger the trigger condition of the data-moving in internal memory to Cache is had it is a variety of, for example, can Think the power-off signal received, certainly, in actual applications, it is also possible to be other trigger conditions, no longer carry out one herein One is described in detail.
In the embodiment of the present invention, described partial data can be all data in internal memory in step 100, can also It is a part of data in internal memory, specially how many data, the size depending on the size of data in EMS memory, and Cache.
For example, the size of the data in internal memory is 30M, and Cache size is 10M, then the partial data in step 100 It is just a part of data in internal memory, to the 30M stored in internal memory data are all stored to nonvolatile memory, Circulate and perform 3 step 100-120.If the size of data in internal memory is 10M, and Cache size is 10M, then step 100 In partial data just be internal memory in total data, to the 10M stored in internal memory data are all stored to non-volatile If memory, 1 step 100-120 can is performed.
To be moved in the embodiment of the present invention, in internal memory to the data of nonvolatile memory can be dirty data, dirty data Including polytype, for example, can be dirty business datum, or, or dirty system data, certainly, in practical application, also It may be other kinds of data, be no longer described in detail one by one herein.
Cache in the embodiment of the present invention can be an independent device, can also be located in other hardware, for example, In CPU, or in FPGA (Field-Programmable Gate Array, field-programmable gate array) (for SRAM in FPGA).
In actual applications, because Cache memory space is limited, the size of all data in possible internal memory is remote The size of memory space much larger than Cache, at this moment, it is impossible to once all data in internal memory are all copied in Cache, because This, in the embodiment of the present invention, after by the partial data write-in nonvolatile memory in Cache, the side of data storage Method also comprises the following steps:
Step 130:Controller judges whether the data in internal memory all write nonvolatile memory, if so, performing step Rapid 140;Otherwise, internal memory is exited self-refresh state by controller, and is returned and performed step 100.
Step 140:Close storage system;
, will in the case of it is determined that the data in internal memory all do not write nonvolatile memory in the embodiment of the present invention Internal memory exits self-refresh state, and continues executing with the step moved the partial data in internal memory in Cache, i.e., if internal memory In data all write nonvolatile memory when, internal memory is exited into self-refresh state, and re-execute step 100- 120.If still have after having re-executed step 100-120, in internal memory data all write nonvolatile memory when, also Internal memory is exited into self-refresh state, re-executes step 100-120, until the data in internal memory all write non-volatile deposit Reservoir, this is the process that a circulation performs.
That is, each time after by the data duplication in internal memory to Cache, internal memory will be made to enter self-refresh shape State, the power consumption of internal memory is reduced, and it is determined that data are stored to nonvolatile memory from Cache, if also having not in internal memory When storing the data into nonvolatile memory, also to continue these remaining data storages to nonvolatile memory, And now, internal memory is accessed, therefore, to control internal memory to exit self-refresh state, to allow internal memory to be accessed, then by residue Data duplication now, after remaining data is copied into Cache, will also control internal memory to enter self-refresh shape again to Cache State, to cause internal memory to forbid being accessed;Then, remaining data is stored to nonvolatile memory from Cache.
For example, Cache memory space is 15MB, and the size of the data in internal memory is 90MB, is set in internal memory The memory space in fixing address space is arranged to 15MB, then six storing process are needed, could be by the number of the 90MB in internal memory According to storing completely to hard disk, when storing first time, first by the fixing address space of the data duplication of 15MB in internal memory to internal memory In, then, Cache will be copied in the fixing address space of 15MB datarams, and control internal memory to enter self-refresh state, And store 15MB data into hard disk from Cache, therefore, due to still having 75MB data from memory storage to hard disk Continue to access internal memory, now, to control internal memory to exit self-refresh state, then carry out second and store, when storing for second It is similar with storing for the first time, it is still to first then, incite somebody to action in the fixing address space of the data duplication of 15MB in internal memory to internal memory Cache is copied in the fixing address space of 15MB dirty data internal memory, and controls internal memory to enter self-refresh state, and by 15MB Dirty data stored from Cache into hard disk, due to after second stores, still there is 60MB data will be from memory storage to hard Disk, therefore, to continue access internal memory, carry out third time storage, third time, the 4th time, the 5th time, the 6th storing process with it is upper It is similar to state process, is no longer described in detail one by one herein.
In the embodiment of the present invention, such as a CPU (for example, E5-2620) has 6 cores, and each cores of CPU have 2.5MB's Cache, CPU can cache 15MB data altogether, and the size of the memory space in the fixing address space set in internal memory is 15MB, It is 15MB/ (1333M*8*4*0.8)=0.4ms, CPU by 15MB that 15MB data are copied to Cache time by CPU from internal memory Data time=15MB/75MB=200ms of hard disk is saved in from Cache, due to 15MB data being answered from internal memory in CPU For system to after Cache, control internal memory enters self-refresh state, CPU by 15MB data from Cache be saved in hard disk when Between in 200ms, internal memory can not be accessed, and therefore, the power consumption of internal memory just reduces, and CPU by 15MB data from internal memory The power consumption for being copied to Cache internal memories this period is only 0.4W, and according to scheme of the prior art, the work(of internal memory Consume and be far longer than the power consumption of internal memory in the embodiment of the present invention for 7W, the power consumption of internal memory of the prior art, and then, the present invention is implemented The lower power consumption of internal memory in example, the electric energy that controller is utilized improve.
In the embodiment of the present invention, such as FPGA has 5MB internal SRAM as Cache, can cache 5MB data, internal memory The size of the memory space in the fixing address space of middle setting is 5MB, and 5MB data are copied to Cache's by FPGA from internal memory Time be 5MB/ (1600M*8*2*0.8)=0.24ms, FPGA by 5MB data from Cache be saved in time of hard disk= 5MB/75MB=67ms, due to FPGA by 5MB data after internal memory is copied to Cache, control internal memory enter self-refresh State, 5MB data are saved in the time 67ms period of hard disk from Cache in FPGA, internal memory is to be interviewed Ask, therefore, the power consumption of internal memory is just reduced, and 5MB data are copied to Cache internal memories this period by FPGA from internal memory Power consumption is only 0.2W, and according to scheme of the prior art, the power consumption of internal memory is 7W, internal memory of the prior art Power consumption is far longer than the power consumption of internal memory in the embodiment of the present invention, and then, the lower power consumption of internal memory in the embodiment of the present invention, control The electric energy that device is utilized improves.
In the embodiment of the present invention, the mode in Cache that the partial data in internal memory is moved have it is a variety of, for example, optional , can be in the following way:
Fixing address space is set in internal memory, wherein, fixing address space can be accessed by Cache;By in internal memory Partial data is copied to fixing address space, and partial data is copied in Cache from fixing address space.
In the embodiment of the present invention, in order to improve storage efficiency, when fixing address space is set in internal memory, this can be consolidated The memory space for determining address space is arranged to equal with Cache memory space.
For example, a CPU (for example, E5-2620) has 6 cores, each cores of CPU have 2.5MB Cache, CPU to cache altogether 15MB data, then when fixing address space is set in internal memory, the memory space in the fixing address space can be set For 15MB.
, can also be in the following way when the partial data in internal memory is moved in Cache in the embodiment of the present invention:
Partial data in internal memory is moved using DMA (Direct Memory Access, direct memory access) mode Into Cache.
In actual applications, when performing per single stepping, will could be performed on the basis of code is performed, and existing skill In art, in order to reduce the power consumption of internal memory, after by the data duplication in internal memory to Cache, internal memory is entered into self-refresh state , internal memory can not be accessed, and performed code originally and be stored in internal memory, therefore, in order to make data from Cache successes Store to nonvolatile memory, before by the partial data write-in nonvolatile memory in Cache, in addition to following behaviour Make:
By the execution code cache in internal memory to Cache, perform code and be used to write data into nonvolatile memory.
In this operation, the Cache that caching performs code can be the Cache in CPU, it is of course also possible to be held for other Need to use the equipment for performing code during row operation, be no longer described in detail one by one herein.
Wherein, the Cache that caching performs code can be the Cache in CPU, include performing in Cache and internal memory Code, what controller was read is the data of Cache in CPU, rather than the data in internal memory.
In embodiments of the present invention, by the execution code cache in internal memory to Cache, then by the partial data in Cache Write-in nonvolatile memory is specifically as follows;
Based on the execution code in Cache, the partial data in Cache is write into nonvolatile memory.
During the present invention is implemented, nonvolatile memory has polytype, can be hard disk for example, optionally, disk.
Further, in order to improve the efficiency of storage, nonvolatile memory can also be solid hard disk.
From said process as can be seen that storage method provided in an embodiment of the present invention, due to after system power failure, controller During the data of internal memory are write into nonvolatile memory, first the data in internal memory are write to Cache, and by Data in depositing make internal memory enter self-refresh state after writing to Cache.Due to it is interior self-refresh state be present during be It can not be accessed, so, the power consumption of internal memory is relatively low, can be ignored.After reducing storage system power down, in storage number The power consumption of internal memory during, controller is extended by the effective time in the data Cun Chudao hard disks being buffered in internal memory.
Embodiment for a better understanding of the present invention, concrete application scene given below, for the process of data storage, make Go out to be described in further detail, in embodiments of the present invention, using CPU Cache memory space as 15MB, and the data in internal memory Size be 30MB exemplified by illustrate.As shown in Figure 2:
Step 200:Controller sets fixing address space in internal memory, wherein, the storage size of the fixing address For 15MB;
In this step, fixing address space can be accessed by Cache.
Step 210:Controller by the data of 15MB in internal memory and performs Code copying extremely it is determined that during storage system power down Fixing address space in internal memory;
Step 220:Controller is by the data of the 15MB in fixing address space and performs Code copying to CPU Cache In;
Step 230:Controller sets internal memory to enter self-refresh state, to prevent internal memory from being accessed;
Step 240:Controller is based on performing code, by the data duplication of 15MB in CPU Cache to solid state hard disc;
Step 250:After controller judges whether the data in internal memory all write solid state hard disc, if so, performing step 260, otherwise, internal memory is exited self-refresh state by controller, and is returned to execution and performed step 210;
The step is similar with step 130 shown in Fig. 1, can specifically participate in the description to step 130, will not be repeated here.
Step 260:Controller closes storage system;
From said process as can be seen that the storage method that step 200-260 is provided, due to after system power failure, controller During the data of internal memory are write into solid state hard disc, the Cache that first writes the data in internal memory into CPU, and will Internal memory is made to enter self-refresh state after the Cache that data in internal memory are write into CPU.Self-refresh state be present due to interior During be to be accessed, so, the power consumption of internal memory is relatively low, can be ignored.After reducing storage system power down, The power consumption of internal memory during data storage, controller is extended by having in the data Cun Chudao hard disks being buffered in internal memory Imitate the time.
Based on above-mentioned technical proposal, as shown in fig.3, the embodiment of the present invention provides a kind of storage system, the storage system Including controller 30, nonvolatile memory 31, wherein:
Controller 30, for it is determined that during storage system power down, the partial data in internal memory to be moved in Cache;Will Partial data write-in nonvolatile memory 31 in Cache;Partial data in Cache is being write into nonvolatile memory During 31, self-refresh state is saved as in setting, wherein, it can not be accessed during self-refresh state being inside present;
Nonvolatile memory 31, for the data in stored memory.
Further, in the embodiment of the present invention, controller 30 is additionally operable to:
Judge whether the data in internal memory all write nonvolatile memory 31;
In the case of it is determined that the data in internal memory all do not write nonvolatile memory 31, internal memory is exited into self-refresh State, and perform the step partial data in internal memory moved in Cache.
Further, in the embodiment of the present invention, controller 30 is additionally operable to:
In the case of it is determined that the data in internal memory all write nonvolatile memory 31, storage system is closed.
Optionally, in the embodiment of the present invention, controller 30 is specifically used for:
Fixing address space is set in internal memory, wherein, fixing address space can be accessed by Cache;By in internal memory Partial data is copied to fixing address space, and partial data is copied in Cache from fixing address space;
Or
Partial data in internal memory is moved in Cache using direct memory access dma mode.
Optionally, in the embodiment of the present invention, controller 30 is specifically used for:
By the execution code cache in internal memory to Cache, perform code and be used to write data into nonvolatile memory 31;
Controller 30 by the partial data in Cache when writing nonvolatile memory 31, specially;
Based on the execution code in Cache, the partial data in Cache is write into nonvolatile memory 31.
A kind of storage system that the embodiment of the present invention proposes includes controller 30 and nonvolatile memory 31, wherein, control Device 30 processed is used to, it is determined that during storage system power down, the partial data in internal memory is moved in cache memory Cache; Partial data in Cache is write into nonvolatile memory 31;Partial data in Cache is being write into non-volatile memories During device 31, self-refresh state is saved as in setting, wherein, it can not be accessed during self-refresh state being inside present.This The storage system that inventive embodiments provide, due to after system power failure, the data of internal memory are being write into nonvolatile memory 31 During, first the data in internal memory are write to Cache, and after will the data in internal memory be write to Cache in order Deposit into self-refresh state.Due to it is interior self-refresh state be present during can not be accessed, so, the power consumption of internal memory can neglect Slightly disregard.After reducing storage system power down, the power consumption of internal memory during data storage, extending controller will be slow The effective time in the data Cun Chudao hard disks in internal memory be present.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real Present one flow of flow chart or one square frame of multiple flows and/or block diagram or the device of the function in multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or Function in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function in individual square frame or multiple square frames.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations.This The there is provided embodiment of application is only schematical.It is apparent to those skilled in the art that in order to describe Convenience and succinct, in the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in detail in some embodiment Part, may refer to the associated description of other embodiment.The spy disclosed in the embodiment of the present invention, claim and accompanying drawing Sign, which can be individually present, can also combine presence.

Claims (6)

1. a kind of method of data storage, methods described is performed by the controller in storage system, and the storage system includes control Device and nonvolatile memory processed, it is characterised in that methods described includes:
It is determined that during the storage system power down, the partial data in internal memory is moved in cache memory Cache;
The partial data in the Cache is write into the nonvolatile memory;
During the partial data in the Cache is write into the nonvolatile memory, the internal memory is set For self-refresh state, wherein, it is described it is interior self-refresh state be present during can not be accessed;
It is described after the partial data in the Cache is write in the nonvolatile memory, methods described is also Including:
Judge whether the data in the internal memory all write the nonvolatile memory;
In the case of it is determined that the data in the internal memory do not write the nonvolatile memory all, the internal memory is exited The self-refresh state, and perform the partial data by the internal memory and move step in Cache;
Methods described also includes:
In the case of it is determined that the data in the internal memory all write the nonvolatile memory, the storage system is closed System.
2. the method as described in claim 1, it is characterised in that the partial data by the internal memory moves Cache In, specifically include:
Fixing address space is set in the internal memory, wherein, the fixing address space can be accessed by the Cache;Will The partial data in the internal memory is copied to the fixing address space, and by the partial data from the fixing address Space is copied in the Cache;
Or
Partial data in the internal memory is moved in Cache using direct memory access dma mode.
3. the method as described in claim any one of 1-2, it is characterised in that described by the part in the Cache Data are write before the nonvolatile memory, in addition to:
Execution code cache in the internal memory to the Cache, the execution code is described non-easy for writing data into The property lost memory;
The partial data in the Cache is write into the nonvolatile memory, specifically included;
It is based on the execution code in the Cache, the partial data write-in in the Cache is described non-volatile Memory.
A kind of 4. storage system, it is characterised in that including:
Controller, for it is determined that during the storage system power down, the partial data in internal memory to be moved into caches In device Cache;The partial data in the Cache is write into nonvolatile memory;By described in the Cache During partial data writes the nonvolatile memory, set in described and save as self-refresh state, wherein, the internal memory It can not be accessed during self-refresh state;
Nonvolatile memory, for storing the data in the internal memory;
The controller is additionally operable to:
Judge whether the data in the internal memory all write the nonvolatile memory;
In the case of it is determined that the data in the internal memory do not write the nonvolatile memory all, the internal memory is exited The self-refresh state, and perform the partial data by the internal memory and move step in Cache;
The controller is additionally operable to:
In the case of it is determined that the data in the internal memory all write the nonvolatile memory, the storage system is closed System.
5. storage system as claimed in claim 4, it is characterised in that the controller is specifically used for:
Fixing address space is set in the internal memory, wherein, the fixing address space can be accessed by the Cache;Will The partial data in the internal memory is copied to the fixing address space, and by the partial data from the fixing address Space is copied in the Cache;
Or
Partial data in the internal memory is moved in Cache using direct memory access dma mode.
6. the storage system as described in claim any one of 4-5, it is characterised in that the controller is specifically used for:
By the execution code cache in the internal memory into the Cache, the execution code is described non-for writing data into Volatile memory;
The controller by the partial data in the Cache when writing the nonvolatile memory, specially;
It is based on the execution code in the Cache, the partial data write-in in the Cache is described non-volatile Memory.
CN201410330397.0A 2014-07-11 2014-07-11 The method and storage system of a kind of data storage Active CN104122977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410330397.0A CN104122977B (en) 2014-07-11 2014-07-11 The method and storage system of a kind of data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410330397.0A CN104122977B (en) 2014-07-11 2014-07-11 The method and storage system of a kind of data storage

Publications (2)

Publication Number Publication Date
CN104122977A CN104122977A (en) 2014-10-29
CN104122977B true CN104122977B (en) 2018-02-23

Family

ID=51768423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410330397.0A Active CN104122977B (en) 2014-07-11 2014-07-11 The method and storage system of a kind of data storage

Country Status (1)

Country Link
CN (1) CN104122977B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406493B (en) 2015-07-30 2020-04-28 华为技术有限公司 Electronic device capable of reducing power consumption and method for reducing power consumption of electronic device
CN106569964A (en) * 2015-10-13 2017-04-19 中兴通讯股份有限公司 Power-off protection method, power-off protection device, power-off protection system and memory
EP3321767B1 (en) 2015-12-30 2020-04-15 Huawei Technologies Co., Ltd. Method for reducing power consumption of memory and computer device
CN105740172A (en) * 2016-01-26 2016-07-06 浪潮(北京)电子信息产业有限公司 Block device data cache power-down protection method and system
CN107397421A (en) * 2016-05-18 2017-11-28 佛山市顺德区美的电热电器制造有限公司 Cooking appliance and its startup control method
US10901898B2 (en) * 2018-02-14 2021-01-26 Samsung Electronics Co., Ltd. Cost-effective solid state disk data-protection method for power outages

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458668A (en) * 2008-12-19 2009-06-17 成都市华为赛门铁克科技有限公司 Caching data block processing method and hard disk
CN102290094A (en) * 2011-07-01 2011-12-21 创新科存储技术(深圳)有限公司 Low power consumption circuit for reliably keeping self-refresh state of memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004362369A (en) * 2003-06-06 2004-12-24 Sony Corp Storage device for network, its control method, and computer program
CN101516038B (en) * 2005-12-13 2012-11-28 松下电器产业株式会社 Data processor
JP5674613B2 (en) * 2011-09-22 2015-02-25 株式会社東芝 Control system, control method and program
CN103500131B (en) * 2013-09-18 2015-09-09 华为技术有限公司 A kind of storage system power failure data backup method and controller system memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458668A (en) * 2008-12-19 2009-06-17 成都市华为赛门铁克科技有限公司 Caching data block processing method and hard disk
CN102290094A (en) * 2011-07-01 2011-12-21 创新科存储技术(深圳)有限公司 Low power consumption circuit for reliably keeping self-refresh state of memory

Also Published As

Publication number Publication date
CN104122977A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
CN104122977B (en) The method and storage system of a kind of data storage
US9348527B2 (en) Storing data in persistent hybrid memory
CN105095116B (en) Cache method, cache controller and the processor replaced
US9177670B1 (en) Method and apparatus for flash cache management
CN109783004A (en) The data processing method of data memory device and memory device
US20130007488A1 (en) Power management of a storage device including multiple processing cores
CN109952567B (en) Method and apparatus for bypassing internal caches of advanced DRAM memory controllers
US9779024B2 (en) Semiconductor storage device and processor system
JP2009205335A (en) Storage system using two kinds of memory devices for cache and method for controlling the storage system
CN106909318A (en) Solid state hard disc application method and device
CN103064792A (en) Method and device for writing data
CN107430554A (en) Storage cache performance is improved as the standard that cache is inserted by using the compressibility of data
CN105373338A (en) Control method and controller for FLASH
CN103514110A (en) Cache management method and device for nonvolatile memory device
CN103150245A (en) Method for determining visiting characteristic of data entityand store controller
CN102314321B (en) Storage system, utilization storage system carry out the method and apparatus of data access
US9323614B2 (en) Dynamic error handling for on-chip memory structures
CN105630699B (en) A kind of solid state hard disk and read-write cache management method using MRAM
US9141543B1 (en) Systems and methods for writing data from a caching agent to main memory according to a pre-clean criterion
CN105589912B (en) A kind of method and storage organization using MRAM processing frequency written document
CN105260328B (en) Data save method and device when a kind of device looses power
CN109710547B (en) Buffer memory management design and implementation method in industrial Internet of things
JP5907189B2 (en) Storage control device, storage control method, and program
CN106126472A (en) A kind of control structure realizing static state and dynamic memory controller access seamless switching
CN106201912A (en) A kind of memory pool access method and computer system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant