WO2015074232A1 - 一种内存数据的迁移方法、计算机和装置 - Google Patents
一种内存数据的迁移方法、计算机和装置 Download PDFInfo
- Publication number
- WO2015074232A1 WO2015074232A1 PCT/CN2013/087645 CN2013087645W WO2015074232A1 WO 2015074232 A1 WO2015074232 A1 WO 2015074232A1 CN 2013087645 W CN2013087645 W CN 2013087645W WO 2015074232 A1 WO2015074232 A1 WO 2015074232A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory card
- memory
- data
- source
- migration
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000013508 migration Methods 0.000 claims abstract description 384
- 230000005012 migration Effects 0.000 claims abstract description 383
- 230000001960 triggered effect Effects 0.000 claims description 27
- 238000001514 detection method Methods 0.000 claims description 12
- 238000012546 transfer Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 claims 1
- 238000012423 maintenance Methods 0.000 abstract description 11
- 230000008569 process Effects 0.000 description 18
- 238000012545 processing Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 206010000210 abortion Diseases 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1666—Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
- G06F11/2058—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using more than 2 mirrored copies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1461—Backup scheduling policy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1658—Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1658—Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
- G06F11/1662—Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit the resynchronized component or unit being a persistent storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
- G06F11/2069—Management of state, configuration or failover
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/065—Replication mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0665—Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0685—Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/84—Using snapshots, i.e. a logical point-in-time copy of the data
Definitions
- the present invention relates to computer technology, and more particularly to a method, computer and apparatus for migrating memory data.
- Memory also known as main memory, is one of the most important components in a computer.
- the running of all programs in the computer is done in memory, so the performance of the memory has a huge impact on the computer.
- Memory can be used to temporarily store operational data in the processor and data exchanged with external memory such as a hard disk.
- the processor will transfer the data that needs to be calculated to the memory for calculation.
- the processor will transmit the result, and the operation of the memory determines the stable operation of the computer.
- the server supports more and more memory.
- the latest Intel E7 V2 processor can support up to 2 memory boards in a single processor. Each memory board can support up to 12 memory modules in an 8P. The number of memory modules in the system can reach 192. However, the current failure rate in the system can be as high as 0.1%. Memory failures may not only cause unstable system operation, but may also cause system crashes.
- the prior art cannot implement the migration of the memory data in the computer.
- the data in the failed memory board or the faulty memory module cannot be migrated under the normal operation of the computer, so the fault memory cannot be online maintained. You can only replace the faulty memory board or the faulty memory module after powering off the computer.
- the embodiment of the invention provides a method, a computer and a device for migrating memory data, which can perform memory data migration without the computer being powered off.
- an embodiment of the present invention provides a computer, where the computer includes: a processor; a main memory, an instruction to load an operating system of the computer, the main memory including one or more memory cards;
- each memory card is configured with a corresponding memory controller
- the operating system is configured to obtain a first triggering instruction, determine a source memory card of the memory data to be migrated according to the first triggering instruction, and determine a backup memory card for the source memory card, indicating the The memory controller of the source memory card performs the migration of the memory data;
- the memory controller of the source memory card is configured to migrate memory data of the source memory card to the backup memory card according to an instruction of the operating system.
- the operating system is specifically configured to set the source memory card and the backup memory card to a mirror mode, and send the memory controller to the source memory card a data read command, the data read command is used to instruct the memory controller of the source memory card to read the memory data of the source memory card, and send a data write command to the memory controller of the source memory card, where the data is Writing instructions for instructing a memory controller of the source memory card to write the read data back to the source memory card;
- the memory controller of the source memory card is specifically configured to read a command according to data of the operating system Reading the memory data of the source memory card, receiving the data write command sent by the operating system, and reading the source according to a mirror mode between the source memory card and the backup memory card
- the memory data of the memory card is sent to the memory controller of the backup memory card; the memory controller of the backup memory card is configured to write the received memory data of the source memory card to the Backup memory card.
- the operating system is specifically configured to obtain a split migration policy, and indicate the source memory card according to the split migration policy.
- the memory controller divides the memory data multiple times.
- the operating system is specifically configured to perform the following operations a)-d) according to the split migration policy, until the All the memory data of the source memory card is migrated to the backup memory card, the operation a)
- -d includes: a) determining the amount of data to be migrated at the time, indicating that the memory controller of the source memory card will be The amount of data of the current migration is migrated to the backup memory card, or the duration of the current migration is determined, and the memory controller of the source memory card is instructed to perform the migration of the memory data during the duration of the current migration; After the memory controller of the source memory card is determined to complete the current migration, the migration of the memory data is suspended; C) receiving a second trigger instruction, the second trigger instruction is used to instruct the operating system to continue Migration of memory data; d) returning to step a) until all memory data of the source memory card is migrated to the backup memory card.
- the operating system is further used to After determining that the memory data of the source memory card is all migrated to the backup memory card, the target memory card pointed to by the system address of the source memory card is changed to the backup memory card.
- an embodiment of the present invention provides a method for migrating memory data, which is used to migrate memory data in a computer, and the method includes:
- the operating system of the computer acquires a first triggering instruction, where the first triggering instruction is used to instruct the operating system to perform migration of memory data;
- the operating system suspends a task currently being executed to initiate migration of memory data; the operating system determines a source memory card of the memory data to be migrated;
- the operating system determines a backup memory card for the source memory card
- the operating system instructs the memory controller of the source memory card to perform migration of the memory data, so that the memory controller of the source memory card migrates the memory data of the source memory card to the location according to the instruction of the operating system Backup memory card.
- the method further includes: the operating system setting the source memory card and the backup memory card to a mirror mode; the operating system indicating the source memory
- the memory controller of the card performs migration of the memory data, so that the memory controller of the source memory card reads the memory data of the source memory card according to the instruction of the processor, and reads the source memory card Write the memory data to the backup memory card, including: the operating system indication
- the memory controller of the source memory card performs migration of the memory data, so that the memory controller of the source memory card reads the memory data of the source memory card according to the instruction of the operating system, and reads the read The memory data of the source memory card is written to the backup memory card, including:
- the operating system sends a data read command to the memory controller of the source memory card, where the data read command is used to instruct the memory controller of the source memory card to read the memory data of the source memory card;
- the memory controller of the memory card reads the memory data of the source memory card according to the data read instruction of the operating system;
- the operating system sends a data write command to the memory controller of the source memory card, where the data write command is used to instruct the memory controller of the source memory card to write the read data back to the source memory card ;
- the memory controller of the source memory card receives the data write command sent by the operating system, and reads the source memory card according to a mirror mode between the source memory card and the backup memory card.
- the memory data is sent to the memory controller of the backup memory card, so that the memory controller of the backup memory card writes the received memory data of the source memory card to the backup memory card.
- the method further includes: The system obtains a split migration policy.
- the operating system instructs the memory controller of the source memory card to perform the migration of the memory data multiple times according to the split migration policy.
- the operating system indicates, according to the split migration policy, that the memory controller of the source memory card performs memory data multiple times.
- the migration includes: a) the operating system determines the amount of data to be migrated at a time, and indicates that the memory controller of the source memory card migrates the data amount of the current migration to the backup memory card, or the operation
- the system determines the duration of the current migration, indicating that the memory controller of the source memory card performs the migration of the memory data during the duration of the current migration; b) determining that the memory controller of the source memory card is completed
- the operating system aborts execution of the in-memory data
- the operating system receives the second triggering instruction, the second triggering instruction is used to instruct the operating system to continue the migration of the memory data; d) the operating system returns to perform step a) until the The memory data of the source memory card is all migrated to the backup memory card.
- the source memory card After the memory data is all migrated to the backup memory card, the method further includes: changing, by the operating system, the target memory card pointed to by the system address of the source memory card to the backup memory card.
- an embodiment of the present invention provides a memory data migration apparatus for migrating memory data in a computer, where the apparatus includes:
- An acquiring unit configured to acquire a first triggering instruction, where the first triggering instruction is used to instruct the operating system to perform migration of the memory data;
- a determining unit configured to: after the acquiring unit acquires the first triggering instruction, suspend a task currently being executed to initiate migration of memory data, determine a source memory card of the memory data to be migrated, and determine the source memory card Back up the memory card;
- a migration unit configured to instruct the memory controller of the source memory card to perform migration of the memory data, so that the memory controller of the source memory card migrates the memory data of the source memory card according to the instruction of the operating system to The backup memory card.
- the apparatus further includes: a mirroring unit, configured to set the source memory card and the backup memory card to a mirroring mode;
- the memory controller of the source memory card sends a data read command, where the data read command is used to instruct the memory controller of the source memory card to read the memory data of the source memory card, and to the source memory card
- the memory controller sends a data write command, the data write command is used to instruct the memory controller of the source memory card to write the read data back to the source memory card, so that the memory of the source memory card is controlled.
- the memory data of the read source memory card is written to the memory data of the backup memory card source memory card according to a mirror mode between the source memory card and the backup memory card.
- the migration unit is specifically configured to obtain a split migration policy, and according to the split migration policy, the memory controller that instructs the source memory card performs migration of the memory data multiple times.
- the migration unit is specifically configured to cyclically perform the following operations a)-d) until the memory data of the source memory card is All of the operations are performed to the backup memory card, and the operations a)-d) include: a) determining the amount of data to be migrated, indicating that the memory controller of the source memory card migrates the amount of data migrated to the current time to The backup memory card, or determining the duration of the current migration, indicating that the memory controller of the source memory card performs the migration of the memory data during the duration of the current migration; b) determining the source memory card After the memory controller completes the current migration, the execution of the migration of the memory data is suspended; c) receiving the second trigger instruction, where the second trigger instruction is used to instruct the operating system to continue the migration of the memory data; d) returning execution Step a) until all the memory data of the source memory card is migrated to the backup memory card.
- the migration unit is further used to After the memory controller of the source memory card completes the memory data migration of the source memory card, the target memory card pointed to by the system address of the source memory card is changed to the backup memory card.
- the operating system can suspend the currently executing task to start the migration of the memory data after receiving the first triggering instruction, determine the source memory card of the memory data to be migrated, and determine the backup memory for the source memory card.
- a card the memory controller indicating the source memory card reads the source memory card, so that the memory data of the source memory card can be migrated when the computer is not powered off, and the faulty memory card is online. Maintenance solves the problem in the prior art that the entire computer needs to be powered off to replace or maintain the faulty memory card.
- FIG. 1 is a system block diagram of a computer according to an embodiment of the present invention.
- FIG. 2 is a flowchart of a method for migrating memory data according to an embodiment of the present invention
- FIG. 3 is a flowchart of still another method for migrating memory data according to an embodiment of the present invention
- FIG. 4 is a flowchart of another method for migrating memory data according to an embodiment of the present invention
- FIG. a composition diagram of the data migration device
- FIG. 6 is a structural diagram of still another memory data migration apparatus according to an embodiment of the present invention. detailed description
- the embodiment of the invention provides a method, a computer and a system for migrating memory data, which can perform memory data migration under normal operation of the computer.
- an example of a computer for implementing an embodiment of the present invention includes a main memory 101, a memory controller 102, a processor 105, a Basic Input Output System (BIOS) 104, and a hard disk ( Figure 1 is not shown).
- the main memory 101 includes at least one memory card. In FIG. 1, three memory cards are taken as an example.
- the memory controllers 101-A, 101-B, and 101-Co are used to control the main memory 101.
- a corresponding memory controller 102 can be configured for each memory card of the main memory 101, such as a memory controller 102-A of the memory card 101-A, a memory controller 102-B of the memory card 101-B, and a memory card 101.
- -C The storage medium of the memory controller memory.
- a memory card can refer to a memory module or a memory board. It can also refer to a collection of multiple memory modules or a collection of multiple memory boards. Each memory card is configured with a corresponding memory controller. The correspondence between the memory card and the memory controller may be one-to-one, or may be one-to-many or many-to-one. FIG. 1 is only one of the embodiments of the present invention. After the computer system is powered on, the main memory 101 can load an instruction in the BIOS 104 and an instruction of an operating system (OS) 103 of a computer stored in the hard disk when the computer is powered on.
- OS operating system
- the device 105 can execute instructions of the BIOS 104 or instructions of an operating system (OS) 103 of the computer, for example, the processor 105 can execute instructions of the BIOS 104 to initialize devices in the computer, and execute The instruction of the OS 103 performs a read and write operation on the memory card, where the processor 105 mainly refers to a CPU core portion, and may be a CPU core or a set of multiple CPU cores, in the embodiment of the present invention.
- the processor 105 is a collection of a plurality of CPU cores.
- the BIOS 104 can be a processing chip in which a plurality of processing instructions are registered, and the processor 105 can execute the processing instructions.
- the memory card migrated in the present embodiment is referred to as a source memory card in this embodiment.
- the memory cards 101-A and 101-B may be source memory cards
- the memory card 101-C is a backup memory card configured in the embodiment of the present invention.
- the computer specifies a backup memory card 101-C as an example. In fact, multiple backup memory cards can be specified for the computer.
- the purpose of the migration of the memory data in the embodiment of the present invention is to enable the backup memory card to obtain the memory data in the source memory card.
- the copying, copying, or relocation of the memory data may be adopted.
- the above various specific implementation manners are in the category of "migration" in the embodiment of the present invention.
- the embodiment of the present invention performs the function improvement on the OS 103 to implement the unpowered computer, and performs the migration of the memory data.
- the improved OS 103 can obtain the first trigger instruction, and the current trigger instruction is suspended according to the first trigger instruction.
- Performing a task starting a migration of the memory data, for example, determining a source memory card of the memory data to be migrated, determining a backup memory card for the source memory card, and instructing the memory controller of the source memory card to perform memory data migration, so that a memory controller of the source memory card capable of migrating memory data of the source memory card to the Back up the memory card.
- the OS 103 is configured to acquire a first trigger instruction, and according to the first trigger instruction, suspending a task currently being executed to initiate migration of the memory data, and determining a memory card of the data to be migrated, for example, the source memory card 101-A, A backup memory card is determined for the source memory card, for example, the source memory card 101-A determines a backup memory card 101-C, and a memory controller 102-A that instructs the source memory card to perform memory data migration.
- the memory controller 102-A of the source memory card is configured to read the memory data of the source memory card 101-A according to the instruction of the OS 103, and read the read source memory card 101-A. Memory data is written to the backup memory card 101-C.
- the OS 103 can suspend the task currently being executed after acquiring the first triggering instruction, perform the migration of the memory data, and determine the source memory card 101-A of the memory data to be migrated, as described above.
- the source memory card determines the backup memory card 101-C, and the memory controller 102-A indicating the source memory card writes the memory data of the source memory card 101-A to the backup memory card 101-C, and the computer does not In the case of power, the memory data of the source memory card 101-A can be migrated, and the online maintenance of the faulty memory card is realized, which solves the problem that the entire system needs to be powered off before the faulty memory card can be replaced. Or maintenance issues.
- the backup memory card in order to ensure that the OS 103 smoothly performs the migration of the memory data, the backup memory card needs to be configured in the computer, and the backup memory card is used as the target device of the memory data to be migrated, and has a certain memory card with other memory cards in the computer.
- the difference is, for example, invisible to the OS 103 before the memory data migration is completed, that is, the OS 103 cannot read or write the operation; the processor 105 can execute the instruction of the BIOS 104 to perform the backup memory card 101-C.
- the backup memory card 101-c performs any read and write operations, so that the memory data of the source memory card can be completely migrated to the backup card, and the data that has been migrated during the migration process is not overwritten with other data, so that the migrated memory is made. The data was destroyed.
- Configuring the backup memory card may include:
- the identifier of the backup memory card is sent to the OS 103, and the OS 103 can obtain the identifier of the designated backup memory card and record it in the storage module.
- the specified The memory card is already in the computer as a backup memory card; or the user does not insert the backup memory card into the hardware slot, but specifies the slot number of the hardware slot to be inserted later by the backup memory card, the specified slot
- the bit number is recorded as the identifier of the backup memory card. In this case, it is specified that there is no hardware in the computer and the memory card is the backup memory card.
- the OS 103 can subsequently query the recorded identifier of the memory card to determine the backup memory card.
- the backup memory card can be specially initialized so that the backup memory card is ready, and the computer can write the memory data of the source memory card to the backup memory card.
- Initializing the backup memory card requires that the memory card has been inserted into the hardware slot. In fact, when you insert the backup memory card into the hardware slot, you can be very flexible. You can insert it before specifying the backup memory card, or you can specify the backup. After the memory card, and any time before the migration of the memory data is performed. Specifically, the initialized scene can be divided into three types.
- Initialization one is to start the memory data migration, when the computer is booted up, the user specifies the backup memory card 101-C in the system through the start menu of the BIOS 104, so that the BIOS 104 restarts the computer. A special initialization operation is performed on the backup memory card 101-C. After the migration of the memory data is started, if the BIOS detects that the backup memory card has not been initialized, the initialization of the backup memory card may be temporarily started.
- the special initialization of the backup memory card means that the initialization process of the backup memory card includes various behaviors of normal initialization, except that during the initialization process, the system address is not assigned to the backup memory card, for example.
- the initializing the backup memory card may include supplying power to the backup memory card, configuring related performance parameters, configuring a communication connection between the backup memory card and a processor in the computer, and detecting whether the backup memory card is Ability to perform normal read and write operations, etc.
- the system memory address is not allocated to the backup memory card, so that the OS 103 cannot obtain the system address of the backup memory card, and cannot perform any read/write operations on the backup memory card. That is, although the backup memory card is ready, but not visible to the OS, the OS cannot use the backup memory card at this time. Trigger on triggering memory data migration
- the startup of the migration of the memory data is triggered and started according to the fault condition of the source memory card or the user's requirement, that is, after the computer is booted, the normal execution is performed.
- the OS103 instruction suspends the task being executed according to the trigger instruction of the received or generated memory data migration, and starts the migration of the memory data. After acquiring the triggering instruction of the memory data migration, the OS 103 may immediately suspend the currently executing task, perform the migration of the memory data, or may terminate the currently executing task when the computer is idle, and execute the memory data. For example, the user may pre-configure the OS 103 to configure the first trigger instruction as the processing instruction with the highest priority, so that the OS 103 immediately terminates the current execution after acquiring the first trigger instruction.
- the task of performing memory data migration ensures that the memory data of the failed memory card is migrated in time.
- the embodiment of the present invention when the OS 103 obtains the trigger instruction of the memory data migration, the memory data is migrated, that is, the memory data is performed for the source memory card specified by the user or the source memory card with a clear fault.
- the migration of the memory card does not need to be specified in advance, and the mirroring relationship between the source memory card and the backup memory card is not required to be pre-configured. Therefore, the embodiment of the present invention is directed to triggering the migration of the memory data by the explicit source memory card, that is, It ensures the timely processing of the fault, saves the resources of the computer, and ensures the high efficiency of the computer.
- the triggering instruction for memory data migration in the embodiment of the present invention is used to instruct the OS 103 to suspend the task being executed to initiate migration of the memory data.
- the embodiment of the present invention may implement a single migration of the memory data, and may also implement the multiple migration of the memory data. Therefore, in the embodiment of the present invention, the triggering instruction of the memory data migration may include the first triggering instruction and the second triggering instruction, and
- the triggering instruction for initiating the memory data migration of the first migration of the memory data is referred to as a first triggering instruction
- the triggering instruction for the memory data migration that triggers the subsequent migration of the memory data is referred to as a second triggering instruction.
- the first triggering instruction is used to instruct the OS 103 to perform the migration of the memory data, and the triggering of the first triggering instruction may be more flexible, and the triggering of the first triggering instruction may be more flexible, for example,
- the first triggering instruction may be generated according to an instruction of the user, and the first triggering instruction may also be triggered by the memory controller 102-A of the source memory card.
- the memory controller 102-A of the source memory card may further monitor error data of the source memory card, and if the error data exceeds a threshold, trigger the first trigger instruction;
- the OS 103 determines, according to the first triggering command triggered by the memory controller 102-A of the source memory card, that the memory card whose erroneous data exceeds the threshold is the source memory card 101-A, and according to the pre-acquired
- the identifier of the backup memory card is determined, and the backup memory card 101-C is determined.
- the first triggering instruction may be generated by the OS according to a startup instruction of the migration of the memory data sent by the user, or may be generated by the OS according to a startup policy of the migration of the memory data preset by the user in the OS.
- the user directly sends a boot instruction of the migration of the memory data to the OS, and the OS generates the first trigger instruction according to the startup instruction of the user, or starts the memory data according to the time or the running state of the processor configured by the user in advance in the OS, for example.
- the booting policy of the migration when the startup policy is met, the OS generates the first triggering instruction.
- the OS suspends the task being executed according to the first trigger instruction, and starts a migration instruction of the memory data.
- the migration of the memory data is performed multiple times. Since the OS1 03 aborts the task currently being executed during the process of performing the memory data migration, the OS 103 can continue to perform the suspended task or other after the memory data migration is completed. The task, if there is too much data to be migrated, the OS 103 will suspend the service of the system for a long time, affecting the normal operation of the computer. Therefore, the memory data of the source memory card can be migrated to the backup multiple times.
- the memory card after completing a memory data migration, the OS 103 may suspend the execution of the migration of the memory data, continue to perform the aborted task or other tasks, and until the next memory data migration, the OS 103 re-executes the current execution.
- the task continue to perform the migration of memory data, avoiding the long interruption of computer business and ensuring the normal operation of the computer.
- the OS 103 may be further improved, and the OS 103 may also obtain a split migration policy according to the split migration.
- the policy indicates that the memory controller 102-A of the source memory card performs the migration of the memory data multiple times.
- the split migration policy can be configured by the user. For example, the user can specify the amount of data to be migrated each time or each migration according to requirements. For the duration of time, the OS 103 is configured to perform the following operations a)-d) according to the specified amount of data per migration or the duration of each migration, until the memory data of the source memory card 101-A is all Migrating to the backup memory card 101-C, the operations a)-d) include:
- the length of time indicates that the memory controller 102-A of the source memory card performs the migration of the memory data during the duration of the current migration, or the memory controller 102 that indicates the source memory card according to the operating state of the processor.
- A performs a memory data migration in a period in which the operating state of the processor is idle, wherein the operating state of the processor is an idle state, that is, the occupancy rate of the processor is less than a set threshold;
- the OS aborts execution of migration of memory data
- step a) receiving a second trigger instruction, the second trigger instruction is used to instruct the OS to continue the migration of the memory data; d) Return to step a).
- the OS 103 realizes that the data of the source memory card 101-A is migrated to the backup memory card 101-C in multiple times by the above operations a)-d).
- the second triggering command in the operation c) can be triggered not only by the user but also by the triggering condition of the second triggering command.
- the second trigger can be configured in the migration policy.
- a triggering condition of the instruction may include an interval duration of each migration or an operating state of the processor, and the OS 103 may set an in-memory data migration timer, where the in-memory data migration timer is The interval time of the secondary migration is triggered, the second triggering instruction is triggered, or the running state of the processor is monitored in real time, and the second triggering instruction is triggered when the running state of the central processing is idle.
- the OS 103 may instruct the memory controller 102-A of the source memory card to migrate the memory data of the source memory card to the backup multiple times according to the split migration policy.
- the memory card enables the OS 103 to suspend and resume the executed tasks according to requirements during the process of performing the memory data migration, so that the OS can process the services in the computer in time, and avoid the system caused when a large amount of memory data is migrated.
- the long interruption of the business guarantees the normal operation of the computer.
- the OS 103 may further set the source memory card and the backup memory card to a mirror mode before the migration of the memory data, so that the memory control 102-A of the source memory card may be according to the OS 103. And the mirroring module writes the memory data of the source memory card to the backup memory card.
- the OS 103 may configure the backup memory card in the memory controller 102-A of the source memory card.
- the identifier of the source memory card is configured in the memory controller 102-C of the backup memory card, so that the source memory card 101-A and the backup memory card 101-C are set to a mirror mode. .
- the OS 103 can also send a data read command to the memory controller of the source memory card.
- the data read command is used to instruct the memory controller 102-A of the source memory card to read the data of the source memory card 101A, and receive the data read command sent by the memory controller 102-A of the source memory card.
- a response message to the memory controller 102-A of the source memory card where the data write command is used to instruct the memory controller of the source memory card to write the read data back to the a source memory card, such that the memory controller 102-A of the source memory card can read data of the source memory card 101-A according to the data read command sent by the OS 103, according to the data sent by the OS 103 a write command writes the read data back to the source memory card 101-A, and reads the read according to an identifier of the backup memory card configured in the memory controller 102-A of the source memory card The data is written to the backup memory card 101-C, thereby realizing the migration of data of the source memory card 101-A to the backup memory card 101-C.
- the OS 103 may migrate all the data of the source memory card 101-A to the backup memory card 101-C instead of only migrating after the boot memory data migration, to the source memory card 101. -A new data for write operations, ensuring a complete migration of memory data. Moreover, since the source memory card and the backup memory card are set to the mirror mode, when the OS continues to execute the suspended task or other tasks, any write operation of the source memory card by the OS is simultaneously written to the backup memory card. The accuracy of the migrated memory data on the backup memory card is guaranteed.
- the OS 103 may further instruct the memory controller 102-A of the source memory card to determine non-error data in the source memory card 101-A and determine the memory controller 102-A according to the source memory card.
- the non-error data tag indicates that the memory controller 102-A of the source memory card migrates the non-error data to avoid migrating the error data in the source memory card 101-A to the backup memory.
- the card 101-C may cause a computer restart or may cause the backup memory card 101-C to malfunction.
- the memory controller 102-A of the source memory card may determine according to the indication of the OS 103.
- Non-error data in the source memory card 101-A, and marking the non-error data for example, recording the system address of the non-error data or the error data, so that the OS 103 can be based on the non-error data or the error data.
- a system address indicating that the memory controller of the source memory card migrates the non-error data to avoid a computer restart caused by migrating the error data in the source memory card to the backup memory card.
- the OS 103 can check whether the backup memory card 101-C satisfies the migration condition before the memory data migration, that is, whether the data can be migrated as the source memory card 101-A.
- the target device avoids data migration failure due to the fact that the backup memory card 101-C is not initialized or the memory capacity is insufficient.
- the BIOS 104 may further determine whether the backup memory card 101-C completes special initialization before performing the memory data migration. If the backup memory card 101-C completes special initialization, the backup is indicated.
- the memory card 101-C can be used normally, thereby setting the source memory card 101-A and the backup memory card 101-C to a mirror mode for subsequent migration of memory data.
- the OS 103 may further determine whether the memory capacity of the backup board is greater than the memory capacity of the source memory card 101-A. If the memory capacity of the backup board is greater than the memory capacity of the source memory card 101-A, Then, it is determined that the migration condition is met, and the memory data of the source memory card may be subsequently migrated to the backup memory card.
- the OS 103 can also determine whether the source memory card 101-A and the backup memory card 101-C belong to the same processor control, and if not, indicate that the data of the source memory card 101-A can be migrated.
- the backup memory card is set to set the source memory card 106 and the backup memory card 107 to a mirror mode for subsequent migration of memory data.
- the OS 103 may obtain, from the BIOS 104, whether the backup memory card completes initialization, the memory capacity of the backup memory card, and the like, thereby determining whether the backup memory card meets a migration condition. Regarding the replacement of the memory card and the source memory card after the completion of the memory data migration, when the memory controller 102-A of the source memory card migrates the data of the source memory card 101-A to the backup memory card 101- After the C, the OS 103 can also establish a mapping relationship between the system address of the source memory card 101-A and the backup memory card 101-C, and change the target memory card pointed to by the system address of the source memory card to The backup memory card enables the backup memory card 101-C to replace the source memory card 101-A and take over all read and write operations of the source memory card 101-A by the OS 103.
- the OS 103 can also perform a power-off operation on the source memory card 101-A, for example, the memory controller 102 of the source memory card.
- the register of A is configured to power off the source memory card 101-A, so that the source memory card 101-A can be removed or replaced without the computer being powered off, thereby solving the prior art. There is a need to power down the entire computer to replace or maintain the failed memory card.
- the embodiment of the present invention provides a method for migrating memory data, as shown in FIG. 2, for migrating memory data in a computer, where the method includes:
- S201 The OS of the computer acquires a first trigger instruction, where the first trigger instruction is used to indicate that the 0S performs memory data migration.
- the first triggering command may be triggered by a memory controller of the source memory card. For example, when the memory controller of the source memory card detects that a source memory card has multiple errors, the preset threshold is reached.
- the first triggering instruction instructs the OS to initiate migration of the memory data to the source memory card that has multiple errors; the first triggering instruction may be generated by the OS according to an instruction of the user, for example, when the user finds a certain memory card If the performance is unstable or other needs to be replaced, a booting instruction of the migration of the memory data that can be sent to the OS, so that the OS generates the first triggering instruction to perform the migration of the memory data according to the startup instruction, For example, a user may pre-configure a boot policy of migration of memory data in an operating system, when the startup policy is satisfied, The OS generates the first trigger instruction.
- S202 The OS aborts a task currently being executed to initiate migration of the memory data.
- the OS may suspend the currently executing task and perform memory data migration.
- S203 The OS determines a source memory card of the memory data to be migrated.
- the OS needs to determine a source memory card of the memory data to be migrated, and the OS may determine, by querying a memory controller of the computer, a memory card corresponding to the memory controller that triggers the first trigger instruction. As the source memory card, or according to the user's instructions, determine the memory card that needs to migrate the memory data as the source memory card.
- S204 The OS determines a backup memory card for the source memory card.
- the OS also needs to determine a backup memory card for the source memory card to migrate memory data of the source memory card to the backup memory card.
- the backup memory card may be a memory card that does not temporarily allocate a system address, and is invisible to the OS, and the OS temporarily does not perform a write operation on the backup memory card.
- the backup memory card may be pre-configured, or may be temporarily inserted and assigned, and the specific embodiments will be described in detail.
- S205 The OS indicates that the memory controller of the source memory card performs the migration of the memory data, so that the memory controller of the source memory card migrates the memory data of the source memory card according to the instruction of the operating system to The backup memory card.
- the OS may instruct the memory controller of the source memory card to start migration of memory data, for example, the OS may indicate the source memory card.
- the memory controller reads the memory data of the source memory card, and then instructs the memory controller of the source memory card to write the memory data of the read source memory card to the backup memory card, thereby realizing the migration of the memory data.
- the OS may migrate all the memory data of the source memory card to the backup memory card by using the foregoing reading and writing the memory data of the source memory card, instead of merely migrating the boot memory data after migration. , the newly written data in the source memory card.
- the OS may receive a first triggering instruction, determine a source memory card of the memory data to be migrated, determine a backup memory card for the source memory card, and thereby indicate that the memory controller of the source memory card is The memory data of the source memory card is written into the backup memory card, and the memory data of the source memory card can be migrated when the computer is not powered off, thereby realizing online maintenance of the faulty memory card, and solving the present problem There is a problem in the art that the entire computer needs to be powered off to replace or maintain the faulty memory card.
- the OS performs the migration of the memory data when the first trigger command is received when the memory data needs to be migrated, thereby ensuring timely processing of the memory card failure, and Save system resources.
- the embodiment of the present invention provides a method for migrating memory data, as shown in FIG. 3, for migrating memory data in a computer, for example, capable of migrating memory data of a source memory card to a backup memory.
- the memory card is a memory card that is visible to the OS 103, that is, a memory card that the OS 103 can read and write, that is, a memory card that may generate a fault to migrate data, such as the memory card 101 in this embodiment.
- the backup memory card is a memory card that is invisible to the OS 103, that is, a memory card that the OS 103 is temporarily incapable of reading and writing, and may serve as a target device for data to be migrated, such as the memory in this embodiment.
- Card 101-C after the memory data migration is completed, the configuration information of the backup memory card can be changed, for example, a system address is assigned thereto, so that the OS 103 can read and write the backup memory card.
- the backup memory card 101-C may be a memory card that has been inserted into the hardware slot before the computer is powered on, or may be a memory card temporarily added after the computer is booted, before the memory data migration. , special initialization of the backup memory card (no system address is assigned, detailed in the following embodiments).
- the BIOS acquires the identifier of the specified backup memory card and configures it into the ACPI list.
- the user can specify the specified time through the BIOS start menu when the computer is booted up.
- the identifier of the memory card is backed up, and the BIOS can obtain the identifier of the backup memory card configured by the user and write it into the advanced configuration and power management interface (ACPI) list, so that the subsequent OS can query the location.
- the ACPI list is obtained, and information about the backup memory card is obtained.
- the ACPI list is a set of information tables that the OS interacts with the BIOS, and the OS and the BIOS can be accessed.
- the identifier of the backup memory card does not have to be configured in the ACPI list.
- the configuration of the backup memory card can be obtained by the OS after the BIOS sets the identifier of the backup memory card.
- the embodiments of the invention are not limited herein.
- the identifier of the backup unit may be a slot number of a slot in which the backup memory card is inserted or a number related to the slot.
- the identifier of the backup memory card when the identifier of the memory card is specified, if the backup memory card is inserted into the slot, the identifier of the backup memory card may be the slot number of the currently inserted slot.
- the backup memory card is not inserted into the slot, and the identifier of the backup memory card may be a slot number of a slot specified by the user, and the backup memory card may be directly inserted into the user specified when needed later. Slot.
- Step 301 is an optional step.
- the user does not have to provide the identifier of the backup memory card to the BIOS when the computer is powered on, and the identifier of the backup memory card can be directly provided to the OS after the computer is booted.
- the identifier of the backup memory card is recorded, and the identifier of the backup memory card recorded by itself is obtained in the subsequent use, which is not limited herein.
- BIOS initializes the backup memory card, and the initialization process avoids allocating a system address to the backup memory card.
- the computer may be restarted to perform special initialization on the backup memory card, that is, the initialization process avoids assigning a system address to the backup memory card.
- the BIOS may determine, according to the identifier of the backup memory card, whether the backup memory card has been inserted into a slot, and if the slot has been inserted, determine that the backup memory card has been hardware. If yes, the backup memory card may be initialized at this time, so that the backup memory card is ready, but the OS temporarily cannot read or write the backup memory card.
- the initializing the backup memory card means configuring the backup memory card so that the backup memory card is ready for normal use.
- initializing the backup memory card may include the backup. Powering on the memory card, configuring related performance parameters, configuring a communication connection between the backup memory card and a processor in the computer, and detecting whether the backup memory card can perform normal read and write operations, etc.
- the backup memory card is initialized, the system address is not allocated to the backup memory card, so that the OS cannot obtain the system address of the backup memory card, and cannot perform any read or write operation on the backup memory card, that is, Although the backup memory card is ready, it is not visible to the OS, and the OS cannot use the backup memory card at this time.
- special initialization of the backup memory card refers to the initialization process.
- the step is an optional step.
- the BIOS may further perform special initialization on the backup memory card when the backup backup memory card is obtained.
- the memory controller of the source memory card monitors the error data of the source memory card, determines whether the error data exceeds a threshold, and if the error data exceeds a threshold, the memory controller of the source memory card triggers A trigger instruction.
- the memory card When the error data in the memory card exceeds a certain value, the memory card may be faulty, or even cause the computer to restart. Therefore, the source memory card may be monitored. When there is too much error data in the source memory card, The OS performs the migration of memory data to ensure that the problem is solved.
- the user can configure the memory controller of the source memory card through the start menu of the BIOS, so that the memory controller of the source memory card can be used for the source memory card.
- the erroneous data is monitored, and when the erroneous data of the source memory card exceeds the threshold, the first triggering instruction is triggered, where the first triggering instruction is used to instruct the OS to start the memory data.
- Migration wherein the threshold may be specified by a user, and may also be a default value of the system.
- the error data of each source memory card may be monitored, and when the error data of any one of the source memory cards is monitored to exceed the threshold, the first trigger instruction is triggered.
- the first triggering instruction instructs the OS to initiate memory data migration to the memory card.
- the memory controller of the source memory card may record, in its own register, that the number of erroneous data of the source memory card exceeds a threshold, so as to subsequently instruct the OS to determine the memory card of the problem, that is, the source memory card.
- the source memory card in the computer can be monitored, and the first trigger instruction is triggered for the faulty source memory card to perform memory data migration, and the fault can be resolved in time, and only in the source memory. Memory data migration occurs when the card fails, saving system resources.
- S304 The OS receives the first trigger instruction, and suspends a task currently being executed to start migration of the memory data.
- the OS may immediately suspend the task currently being executed, perform the migration of the memory data, or may abort the task currently being executed when the computer is idle, and perform the migration of the memory data.
- the OS may be pre-configured, and the first triggering instruction is configured as a processing instruction with the highest priority, so that the OS immediately terminates the currently executing task after acquiring the first triggering instruction.
- Performing the migration of memory data ensures that the memory data of the failed memory card is migrated in time, and the problem of memory card failure in the computer is handled and solved in time.
- the OS queries the memory controller of the source memory card to determine the source memory card. After the OS stops the task currently being executed, after starting the migration of the memory data, the memory card to be migrated, that is, the source memory card, is determined, and the OS may determine that the source memory controller that triggers the first trigger instruction corresponds to Memory card is the source memory card, for example, querying the computer
- the memory controller's register determines the source memory card through information recorded in a register of the memory controller of the source memory card.
- the OS queries the ACPI list to determine an identifier of the backup memory card.
- the identifier of the backup memory card is pre-recorded in the ACPI list, and the OS may obtain the identifier of the backup memory card from the ACPI list after determining that the memory data migration is performed, and the identifier of the backup memory card may be one.
- the OS may obtain identifiers of the plurality of backup memory cards from the ACPI list, and according to the information of the source memory card, Selecting, from the identifiers of the plurality of backup memory cards, an identifier of the backup memory card, for example, selecting a memory capacity from the plurality of backup memory cards to be greater than the source according to a memory capacity of the source memory card.
- a memory card of a memory card determining an identifier of the memory card as an identifier of the backup memory card, and, for example, according to information of a processor to which the source memory card belongs, from the plurality of backup memory cards Selecting a memory card that is not controlled by the same processor as the source memory card, and determining the identifier of the memory card as the backup memory card Logo.
- S307 The OS determines whether the backup memory card meets a migration condition.
- the BIOS Before performing the migration of the memory data of the source memory card, the BIOS needs to determine whether the backup memory card meets the migration condition, and if the migration condition is met, the memory data is migrated to the source memory card to ensure the memory.
- the data migration is smoothly carried out to avoid data migration failure due to problems such as insufficient memory capacity of the backup memory card.
- Determining whether the backup memory card meets the migration condition may be: determining whether the backup memory card is initialized, and if the backup memory card is initialized, indicating that the backup memory card is ready to meet the migration condition; Before the step, the step S302 is not performed, that is, if the backup memory card does not complete special initialization, the OS can prepare the backup memory card by triggering, and meet the migration condition.
- determining whether the backup memory card meets the migration condition may also be: determining the standby Whether the memory capacity of the memory card is greater than the memory capacity of the source memory card, and if it is greater than the memory capacity of the source memory card, it indicates that the memory data of the source memory card can be migrated to the backup memory card, The backup memory board meets the migration conditions; or,
- the OS may obtain information about the backup memory card from the BIOS, for example, whether the backup memory card completes initialization, the memory capacity of the backup memory card, and whether the backup memory card meets a migration condition.
- the OS may instruct the memory controller of the source memory card to perform a memory patrol operation to determine non-error data in the source memory card, and mark the detection result according to the detection result, so as to follow
- the memory data of the source memory card is migrated to the backup memory card
- only non-error data in the source memory card may be migrated according to the detection flag, thereby avoiding migration of the error data to the backup memory card. Problems such as computer restart.
- the memory controller of the source memory card can start a memory patrol operation according to the instruction of the OS, where the memory patrol operation may be: a memory of the source memory card according to a set error detection mechanism.
- the data is detected to determine which data in the source memory card is erroneous data, and the system address of the erroneous data is recorded, that is, the detection flag is marked according to the detection result, so that when the memory data migration is performed subsequently, the OS can be recorded according to the record.
- the memory controller of the source memory card may configure its own register after performing the patrol operation, and the OS may query the register to determine whether the patrol operation is completed, when the patrol operation is completed. Thereafter, the OS may set the source memory card and the backup memory card to a mirror mode to perform migration of memory data. This step is an optional step, and the OS does not necessarily indicate that the source memory controller performs a memory patrol operation.
- the OS may set the source memory card and the backup memory card to a mirror mode, and after the mirror mode is set, the memory control of the source memory card can be according to the OS. Instructing to write the memory data of the source memory card to the backup memory card.
- the OS may configure an identifier of the backup memory card in a memory controller of the source memory card, and configure an identifier of the source memory card in a memory controller of the backup memory card, so that Setting a source mode between the source memory card and the backup memory card, so that the source memory card can send the memory data of the source memory card to the memory control of the backup memory card according to the indication of the OS And causing the memory controller of the backup memory card to write the memory data of the source memory card to the backup memory card.
- setting the source memory card and the backup memory card to the mirroring mode may further include: the OS copying address configuration information of the memory controller of the source memory card to a memory controller of the backup memory card And causing the backup memory card to allocate a system address to the backup memory card according to an address allocation manner of the source memory card.
- S310 The OS instructs a memory controller of the source memory card to perform migration of memory data. After configuring the mirroring mode between the source memory card and the backup memory card, the OS may instruct the memory controller of the source memory card to perform memory data migration on the source memory card.
- the OS may send a data read command to the memory controller of the source memory card, where the data read command is used to instruct the memory controller of the source memory card to read the memory data of the source memory card.
- the OS may send a data write command to a memory controller of the source memory card, where the data write command is used to indicate the source memory
- the memory controller of the card writes the read data back to the source memory card, So that the memory controller of the source memory card can read the memory data of the source memory card according to the data read command, and then write the read data according to the data write command.
- the backup memory card realizes migration of memory data, and can migrate all memory data of the source memory card to the backup memory card, and not only migrate the boot memory data after migration, the source memory card is new The data written.
- the operating system suspends the currently executing task before the memory controller of the source memory card performs the memory data migration. After the memory data migration is completed, the OS can continue to perform the suspended task or other tasks. If there is too much data to be migrated, the OS will suspend the service of the system for a long time, which affects the normal operation of the computer. Therefore, the memory data of the source memory card may be migrated to the backup memory card multiple times. After completing the memory data migration, the OS may suspend the execution of the migration of the memory data, and continue to execute the suspended task or other tasks until the next memory data migration, the OS restarts the currently executing task and continues to execute.
- the migration of memory data avoids long-term interruption of computer business and ensures the normal operation of the computer.
- the user in order to implement the method for migrating the memory data in multiple times, may configure the amount of data to be migrated each time or the duration of each migration in the OS, that is, configure a split migration policy, so that The OS may instruct the memory controller of the source memory card to perform the migration of the memory data multiple times according to the split migration policy.
- the OS may indicate the memory of the source memory card by using the following steps:
- the controller performs the migration of the memory data in multiple times: a) the OS determines the amount of data to be migrated according to the amount of data specified by each migration, and indicates that the memory controller of the source memory card migrates the current memory The amount of data migrated to the time of the secondary migration of the backup, indicating that the memory controller of the source memory card performs the migration of the memory data during the duration of the current migration; b) after determining that the memory controller of the source memory card completes the current migration, the OS aborts execution of migration of memory data;
- the second trigger instruction is used to instruct the OS to continue the migration of the memory data
- step d) returning to step a) until the memory data of the source memory card is completely migrated to the backup memory card.
- step b) when the computer suspends the execution of the migration of the memory data, the OS may perform a read and write operation on the source memory board even if the OS pairs the data block A that has been migrated in the source memory card.
- the memory controller of the source memory card can also write the data of the write operation to the data block A of the backup memory card, thereby avoiding the number, and the user can also
- the triggering condition of the second triggering instruction is configured in the split-migration policy, and the triggering condition of the second triggering command may be an interval duration of each migration, where the OS may obtain the Configuring a memory data migration timer according to the interval duration of each migration, so that the memory data migration timer triggers the second trigger instruction according to the interval duration of each migration
- the OS continues to perform migration of memory data, and the memory data migration timer may be set in the OS, when the memory data is migrated When the timing time arrives, into the interrupt handler, suspend the currently executing task to continue the migration of data memory.
- the second triggering instruction may also be triggered according to an operating state of the processor, the OS may monitor an operating state of the processor, and determine, according to an operating state of the processor, whether to trigger the second triggering instruction, The migration of the memory data is performed.
- the OS may trigger its own interrupt when the CPU is in an idle state, or the CPU usage is less than a certain threshold, so that the OS suspends the currently executed task and continues the migration of the memory data.
- the OS may refer to the address of the error data recorded by the memory controller of the source memory card. Having the memory controller of the source memory card migrate non-error data in the source memory card to the backup memory card to avoid migrating incorrect data in the source memory card to the backup memory card, which may result in The computer restarts.
- S311 The OS changes a target memory card pointed to by the system address of the source memory card to the backup memory card.
- the OS may map the system address of the source memory card to the backup memory card, so that the target memory card pointed to by the system address of the source memory card is changed to the backup memory card,
- the backup memory card can replace the source memory card and take over all read and write operations of the source memory card by the OS.
- the OS may map the system address of the source memory card to the backup memory card by configuring a CPU of the computer.
- S312 The OS performs a power-off operation on the source memory card.
- the OS may perform a power-off operation on the source memory card, for example, configuring a memory controller of the source memory card to the source memory card.
- the power supply is powered off, so that the source memory card can be removed or replaced when the computer is not powered off, which solves the problem in the prior art that the entire computer needs to be powered off to replace or maintain the faulty memory card.
- the OS may receive the first triggering instruction to determine the source memory card and the backup memory card, and after determining that the backup memory card meets the migration condition, the source memory card and the backup
- the memory card is set to the mirroring mode, so that the memory controller of the source memory card can be instructed to write the memory data of the source memory card to the backup memory card according to the mirroring mode, if the computer is not powered off,
- the memory data of the source memory card can be migrated, and online maintenance of the faulty memory card is realized, which solves the problem in the prior art that the entire computer needs to be powered off to replace or maintain the faulty memory card.
- the OS triggers the migration of the memory data for the first trigger instruction triggered by the memory controller of the faulty source memory card, so that the fault can be resolved in time, and only the source memory card fails.
- Memory data only Migration saves system resources.
- the OS may obtain a split migration policy, and according to the split migration policy, the memory controller that instructs the source memory card migrates the memory data of the source memory card to the backup memory card multiple times.
- the OS can be suspended and resumed according to requirements, so that the OS can process the services in the computer in time, and avoid the system service caused by the large amount of memory data migration. The time is interrupted to ensure the normal operation of the computer.
- the OS can instruct the memory controller of the source memory card to determine non-error data in the source memory card, and instruct the memory controller of the source memory card to migrate the non-error data to the backup A memory card that avoids migrating incorrect data from the source memory card to the backup memory card and may cause a computer restart.
- the OS may determine whether the backup memory card meets the migration condition, and if the migration condition is met, the memory data is migrated to the source memory card to ensure the memory.
- the data migration is smoothly carried out to avoid data migration failure due to problems such as insufficient memory capacity of the backup memory card.
- the embodiment of the present invention provides a method for migrating memory data, as shown in FIG. 4, for migrating memory data in a computer, for example, capable of migrating memory data of a source memory card of a computer to a backup.
- the memory card, the source memory card may be a memory card 101-A
- the backup memory card may be a memory card 101-C
- the memory card 101-C may be a memory card that has been inserted into a hardware slot before the computer is turned on.
- the memory card 101-C may be configured in the ACPI list and the initialization process may be performed before the migration is performed.
- the memory of the embodiment of the present invention may be used.
- the data migration method may include: S401: The OS acquires and records the identifier of the specified backup memory card.
- the identifier of the backup unit may be the slot number of the slot in which the backup memory card is inserted or the number associated with the slot.
- the backup memory card may be before the computer is booted. It has been inserted into the slot, or it can be inserted into the slot after the computer is booted.
- the user may provide the OS with the identifier of the designated backup memory card, and the OS may acquire and record the identifier of the specified backup memory card, so that the OS subsequently determines to perform the migration of the memory data.
- the information of the backup memory card may be obtained, and the identifier of the backup memory card may be recorded in the OS, or may be recorded in an ACPI list or other storage unit, which is not limited herein.
- This step is a step, and the user may further provide the identifier of the backup memory card to the
- the BIOS obtains the identifier of the backup memory card recorded by the BIOS before the memory data is migrated, and determines the backup memory card.
- the embodiment of the present invention is not limited herein.
- the backup memory card is a target device for data to be migrated, and is a memory card that is invisible to the OS, and needs to perform special initialization on the backup memory card to ensure the backup.
- the memory card is ready, but avoids assigning a system address such that the backup memory card is not visible to the OS.
- the BIOS may be triggered by the trigger button on the backup memory card when the backup memory card is inserted into the slot.
- the backup memory card is specially initialized. Of course, the backup memory card may be initialized when the backup memory card is needed later.
- the computer runs the BIOS when the computer is powered on, and the user also needs to set the identifier of the backup memory card through the BIOS start menu. And causing the BIOS to perform special initialization on the backup memory card when determining that the backup memory card already has hardware.
- the special initialization of the backup memory card means that the backup memory card is configured to be ready for use, for example, within the backup. Setting a communication connection between the backup memory card and a processor in the computer, detecting whether the backup memory card can perform normal read and write operations, etc., it should be noted that when the backup memory card is initialized, A system address is not allocated to the backup memory card, so that the OS cannot obtain the system address of the backup memory card, and cannot perform any read or write operation on the backup memory card, that is, the backup memory card is ready. However, it is not visible to the OS, and the OS cannot use the backup memory card at this time.
- special initialization of the backup memory card refers to the initial initialization process.
- S402 The OS acquires and records an identifier of the specified source memory card.
- the memory card After the computer is powered on, when the user finds that the performance of a memory card is unstable or the working time is too long or other needs to be replaced, the memory card can be designated as the memory card to be migrated, that is, the source memory card.
- the OS may be information, and the identifier of the backup memory card may be recorded in an OS, or may be recorded in an ACPI list or other storage unit, in the embodiment of the present invention. This is not limited here.
- S403 The OS receives a first trigger instruction according to an instruction of the user, and suspends a task currently being executed according to the first trigger instruction to start migration of the memory data.
- the booting instruction of the migration of the memory data may be sent to the OS, the OS generates the first triggering instruction according to the startup instruction, and suspends the currently executing according to the first triggering instruction.
- Task enter the interrupt handler, perform the migration of memory data.
- the identifiers of the source memory card and the backup memory card may be respectively specified by using multiple instructions, and the OS is instructed to execute the memory data.
- the migration may be performed by using an instruction to instruct the OS to perform the migration of the memory data, where the instruction carries the identifier of the source memory card and the backup memory card, which is not limited herein.
- S404 The OS acquires the identifier of the source memory card and the backup memory card that are recorded. After the OS acquires the first triggering command triggered by the user, the OS enters an interrupt processing function, initiates migration of the memory data, and obtains the identifier of the source memory card and the backup memory card recorded by itself. That is, the source memory card and the backup memory card are determined.
- the OS may select one of the identifiers of the backup memory card as the identifier of the backup memory card according to the information of the source memory card, for example, according to the Determining, by the memory capacity of the source memory card, a memory card having a memory capacity greater than a memory capacity of the source memory card, determining an identifier of the memory card as an identifier of the backup memory card, and For example, a memory card that is not controlled by the same processor as the source memory card may be selected from the plurality of backup memory cards according to the information of the processor to which the source memory card belongs, and the identifier of the memory card is determined. As the identifier of the backup memory card.
- S405 The OS determines whether the backup memory card meets a migration condition.
- S408 The OS instructs a memory controller of the source memory card to perform migration of memory data.
- S409 The OS changes a target memory card pointed to by the system address of the source memory card to the backup memory card.
- S410 The OS performs a power-off operation on the source memory card.
- the OS may receive the user first trigger instruction to determine the source memory card and the backup memory card, and after determining that the backup memory card meets the migration condition, the source memory card and the The backup memory card is set to the mirror mode, so that the memory controller of the source memory card can be instructed to write the memory data of the source memory card to the backup memory according to the mirror mode.
- the card can be used to migrate the memory data of the source memory card when the computer is not powered off, thereby realizing online maintenance of the faulty memory card, and solving the problem that the prior art needs to power off the entire computer to perform a faulty memory card. The problem of replacement or maintenance.
- the OS may perform memory data migration according to the first trigger instruction triggered by the user, which can ensure that the fault is solved in time, and only when the source memory card fails. Perform memory data migration, which effectively saves system resources.
- the OS may obtain a split migration policy, and according to the split migration policy, the memory controller that instructs the source memory card migrates the memory data of the source memory card to the backup memory card multiple times.
- the OS can be suspended and resumed according to requirements, so that the OS can process the services in the computer in time, and avoid the system service caused by the large amount of memory data migration. The time is interrupted to ensure the normal operation of the computer.
- the OS can instruct the memory controller of the source memory card to determine non-error data in the source memory card, and instruct the memory controller of the source memory card to migrate the non-error data to the backup A memory card that avoids migrating incorrect data from the source memory card to the backup memory card and may cause a computer restart.
- the OS may determine whether the backup memory card meets the migration condition, and if the migration condition is met, the memory data is migrated to the source memory card to ensure the memory.
- the data migration is smoothly carried out to avoid data migration failure due to problems such as insufficient memory capacity of the backup memory card.
- the embodiment of the present invention provides an in-memory data migration device, as shown in FIG. 6, for migrating memory data in a computer, for example, capable of migrating memory data of a source memory card of a computer to a backup memory.
- the card may be a memory card 101-A
- the backup memory card may be a memory card 101-C.
- the memory card 101-C may be a memory card that has been configured in the computer before the computer is turned on. Can be a temporary new memory card, in the memory data migration Before the shift, the backup memory card can complete the initialization process.
- the memory data migration apparatus of the embodiment of the present invention may be an OS, and the apparatus may include an access obtaining unit 501, a determining unit 502, a mirroring unit 503, and a migration unit 504.
- the obtaining unit 501 is configured to acquire a first triggering instruction, where the first triggering instruction is used to instruct the operating system to perform the migration of the memory data.
- the triggering the first triggering instruction is relatively flexible, and may include The method is as follows: In the first mode, the memory controller of the source memory card can monitor the error data of the source memory card, and if the error data exceeds the threshold, triggering the first trigger instruction, the acquiring unit The 501 is specifically configured to receive the first triggering command triggered by the memory controller of the source memory card. In the second manner, the acquiring unit 501 is configured according to a startup instruction of the migration of the memory data sent by the user or the memory data preset by the user. The migrated launch policy generates the first trigger instruction.
- the determining unit 502 is configured to: after the acquiring unit acquires the first triggering instruction, suspend a task currently being executed to initiate migration of memory data, determine a source memory card of the memory data to be migrated, and serve as the source The memory card determines the backup memory card.
- the determining unit 502 determines the manner of the source memory card to be flexible. For example, when the first triggering instruction is triggered by the memory controller of the source memory card, the determining unit 502 may query the source.
- a memory controller of the memory card determining that the memory card corresponding to the memory controller that triggered the first trigger instruction is the source memory card, and the memory controller of the source memory card monitors the source memory card
- the number of erroneous data exceeds the threshold the number of erroneous data of the source memory card may be recorded in its own register exceeding a threshold; for example, if the first triggering instruction is generated according to an instruction of the user, the acquiring unit
- the 501 may further receive the identifier of the source memory card sent by the user, and the device may further include a recording unit 505, configured to record the identifier of the source memory card, so that the identifier of the source memory card can be acquired at any time.
- the determining unit 502 may determine the source memory card according to the identifier of the source memory card recorded by the recording unit 505. .
- the backup memory card can also be provided in two ways.
- the user can provide the identifier of the backup memory card to the OS, and the obtaining unit 501 can also obtain the backup specified by the user.
- the identifier of the memory card, the recording unit 505 is further configured to record the identifier of the backup memory card, and the determining unit 502 may determine the backup memory card according to the identifier of the backup memory card recorded by the recording unit;
- the user can provide the identifier of the backup memory card to the BIOS, and the recording unit 505 can also obtain the identifier of the backup memory card recorded by the BIOS, and determine the backup memory card.
- the mirroring unit 503 is configured to set the source memory card and the backup memory card to a mirroring mode.
- the mirroring unit 503 can configure the backup memory card in a memory controller of the source memory card.
- the identifier of the source memory card is configured in the memory controller of the backup memory card, and the source memory list and the backup memory card are set to a mirror mode. After the mirror mode is set, The memory control of the source memory card can write the memory data of the source memory card to the backup memory card according to the identifier of the backup memory card.
- the migration unit 504 is configured to instruct the memory controller of the source memory card to perform migration of the memory data, so that the memory controller of the source memory card utilizes the mirror mode set by the mirroring unit 503 to The memory data of the memory card is written to the backup memory card. Specifically, the migration unit 504 can send a data read command to the memory controller of the source memory card, where the data read command is used to indicate the source memory.
- the memory controller of the card reads the memory data of the source memory card, and sends a data write command to the memory controller of the source memory card, where the data write command is used to indicate that the memory controller of the source memory card will Writing the read data back to the source memory card, so that the memory controller of the source memory card writes the read data to the backup memory card according to the mirror mode, The memory data of the source memory card is migrated to the backup memory card.
- the migration unit 504 is further configured to obtain a split migration policy, and the memory controller of the source memory card is instructed to perform the migration of the memory data multiple times according to the split migration policy, so that the computer performs the memory data.
- the system can be processed in a timely manner according to the requirements of suspending and restoring the execution of the system, so as to avoid long-term interruption of system services caused by a large amount of memory data migration, and ensure the normal operation of the system.
- the fractional migration policy may include the amount of data per migration or the time of each migration.
- the operation unit a)-d) includes: a Determining, according to the amount of data specified by the each migration, the amount of data to be migrated, indicating that the memory controller 102-A of the source memory card migrates the data amount of the current migration to the migration time in the backup Instructing the memory controller 102-A of the source memory card to perform memory data migration during the duration of the current migration, or instructing the memory controller 102-A of the source memory card according to an operating state of the processor The memory data is migrated during a period in which the operating state of the processor is idle, wherein the operating state of the processor is an idle state, that is, the occupancy rate of the processor is less than a set threshold;
- the second trigger instruction is used to instruct the OS to continue the migration of the memory data
- the second triggering command may be triggered by a trigger condition of the preset second triggering command
- the split migration policy may further include a triggering condition of the second triggering instruction, where the triggering of the second triggering instruction is triggered.
- the condition may include an interval duration of each migration or an operating state of the processor, and the migration unit 504 is further configured to configure an in-memory data migration timer according to the interval duration of each migration, so that the memory data migration timer
- the second triggering instruction is triggered according to the interval duration of each migration; or, according to an operating state of the processor, configuring an in-memory data migration triggering module, so that the memory data migration triggering module is configured according to the processor
- the operating state triggers the second triggering instruction.
- the device may further include:
- the error detection unit 506 is configured to instruct the memory controller of the source memory card to determine non-error data in the source memory card.
- the migration unit 504 is specifically configured to perform memory control according to the source memory card. The information of the non-error data determined by the controller indicates that the memory controller of the source memory card migrates the non-error data.
- the migration unit 504 is further configured to: after determining that the memory controller of the source memory card completes the memory data migration of the source memory card, establish a mapping between a system address of the source memory card and the backup memory card Relationship, changing a target memory card pointed to by the system address of the source memory card to the backup memory card, so that the backup memory card can replace the source memory card, and take over all of the source memory card of the OS Read and write operations.
- the acquiring unit 501 may receive the first triggering instruction, and the determining unit 502 may suspend the currently executing task to start the memory data after the acquiring unit 501 receives the first triggering instruction.
- Migration, determining the source memory card and the backup memory card, the mirroring unit 506 can set the source memory card and the backup memory card to a mirror mode, so that the migration unit 504 can indicate the source
- the memory controller of the memory card writes the memory data of the source memory card to the backup memory card according to the mirroring mode, thereby realizing the migration of the memory data of the source memory card when the computer is in normal operation.
- the device performs the migration of the memory data for the first trigger instruction triggered by the memory controller of the faulty source memory card, thereby ensuring that the fault is solved in time, and only the source memory card is faulty. Memory data migration is performed at a time, which effectively saves system resources.
- the migration unit 504 may further obtain a split migration policy, and according to the split migration policy, instruct the memory controller of the source memory card to migrate the memory data of the source memory card to the backup multiple times.
- the memory card enables the execution of the memory data to be suspended and resumed according to the requirements, avoiding the long interruption of the computer business caused by the large amount of memory data migration, and ensuring the normal operation of the computer.
- the error detecting unit 506 may instruct the memory controller of the source memory card to determine non-error data in the source memory card, so that the migration unit may indicate the memory of the source memory card.
- the controller migrates the non-error data to the backup memory card to avoid a computer restart caused by migrating the error data in the source memory card to the backup memory card.
- FIG. 6 is a schematic structural diagram of a memory data migration apparatus according to an embodiment of the present invention.
- the memory data migration apparatus provided by the embodiment of the present invention may include:
- the processor 601, the memory 602, and the communication interface 605 are connected by the system bus 604 and complete communication with each other.
- Processor 601 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
- the memory 602 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
- Memory 602 is used by computer to execute instructions 603. Specifically, the program code may be included in the computer execution instruction 603.
- the processor 601 runs the computer execution instruction 603, and the method flow described in any one of FIG. 2 to FIG. 4 may be performed.
- aspects of the present invention, or possible implementations of various aspects can be embodied as a system, method, or computer program product.
- aspects of the invention, or possible implementations of various aspects may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
- aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored in a computer readable medium.
- the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
- the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM).
- the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
- the computer readable program code can execute entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or server.
- the functions noted in the various steps of the flowchart, or in the blocks in the block diagrams may not occur in the order noted. For example, two steps, or two blocks shown in succession may be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
在本发明实施例提供了一种内存数据的迁移方法、计算机和装置,用于迁移计算机中内存数据,所述计算机的操作系统能够在获取到第一触发指令后中止当前执行的任务,以执行内存数据的迁移,确定待迁移内存数据的源内存卡,为所述源内存卡确定备份内存卡,指示所述源内存卡的内存控制器进行内存数据的迁移,以使得所述源内存卡的内存控制器根据所述操作系统的指示读取所述源内存卡的内存数据,将所读取的所述源内存卡的内存数据写入到所述备份内存卡,在计算机不下电的情况下,能够对所述源内存卡的内存数据进行迁移,实现了对故障内存卡的在线维护,解决了现有技术中需要对整个计算机下电才能进行故障内存卡的更换或维护的问题。
Description
一种内存数据的迁移方法、 计算机和装置 技术领域
本发明涉及计算机技术, 特别是一种内存数据的迁移方法、 计算机和装 置。
背景技术
内存(Memory )也被称为主存储器, 是计算机中重要的部件之一。 计 算机中所有程序的运行都是在内存中进行, 因此内存的性能对计算机的影响 非常大。 内存能够用于暂时存放处理器中的运算数据, 以及与硬盘等外部存 储器交换的数据。 只要计算机在运行中, 处理器就会把需要运算的数据调到 内存中进行运算, 当运算完成后处理器再将结果传送出来, 内存的运行也决 定了计算机的稳定运行。
在 X86架构下, 服务器支持的内存数量越来越多, 最新的 Intel E7 V2处 理器, 单颗处理器最多可以支持 2块内存板, 每块内存板最多可以支持 12根 内存条, 在一个 8P系统中内存条数量可以达到 192根。 然而, 目前系统中内 存的故障率能够高达 0.1%, 内存故障不仅可能引起系统运行不稳定, 还可能 引起系统的死机。
现有技术无法实现计算机中内存数据的迁移, 当系统中出现内存故障 时, 无法在计算机正常运行的情况下实现故障内存板或者故障内存条中的数 据的迁移, 因此无法对故障内存进行在线维护, 只能先对该计算机下电后才 能更换故障内存板或故障内存条。
发明内容
本发明实施例提供了一种内存数据的迁移方法、 计算机和装置, 能够在 计算机不下电的情况下进行内存数据的迁移。
第一方面, 本发明实施例提供了一种计算机, 该计算机包括: 处理器;
主存储器, 用于加载所述计算机的操作系统的指令, 所述主存储器包括 一个或多个内存卡;
内存控制器, 每个内存卡配置对应的内存控制器;
所述操作系统用于获取第一触发指令, 根据所述第一触发指令中止当前 正在执行的任务, 确定待迁移内存数据的源内存卡, 为所述源内存卡确定备 份内存卡, 指示所述源内存卡的内存控制器进行内存数据的迁移;
所述源内存卡的内存控制器用于才艮据所述操作系统的指示, 将所述源内 存卡的内存数据迁移到所述备份内存卡。
结合第一方面, 在第一种可能的实现方式中, 所述操作系统具体用于将 所述源内存卡和所述备份内存卡设置为镜像模式, 向所述源内存卡的内存控 制器发送数据读指令, 所述数据读指令用于指示所述源内存卡的内存控制器 读取所述源内存卡的内存数据, 向所述源内存卡的内存控制器发送数据写指 令, 所述数据写指令用于指示所述源内存卡的内存控制器将所述读取的数据 写回所述源内存卡; 所述源内存卡的内存控制器具体用于根据所述操作系统 的数据读指令读取所述源内存卡的内存数据,接收所述操作系统发送的所述 数据写指令, 根据所述源内存卡和所述备份内存卡之间的镜像模式, 将所读 取的所述源内存卡的内存数据发送给所述备份内存卡的内存控制器; 所述备 份内存卡的内存控制器用于将接收到的所述源内存卡的内存数据写入到所 述备份内存卡。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述操作系统具体用于获取分次迁移策略, 根据所述分次迁移策略, 指示所 述源内存卡的内存控制器分多次进行内存数据的迁移。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述操作系统具体用于根据所述分次迁移策略循环执行如下操作 a ) -d ) , 直至将所述源内存卡的内存数据全部迁移到所述备份内存卡, 所述操作 a )
-d )包括: a )确定当次迁移的数据量, 指示所述源内存卡的内存控制器将所
述当次迁移的数据量迁移到所述备份内存卡, 或者, 确定当次迁移的时长, 指示所述源内存卡的内存控制器在所述当次迁移的时长内进行内存数据的 迁移; b )在确定所述源内存卡的内存控制器完成所述当次迁移之后, 中止 执行内存数据的迁移; C )接收第二触发指令, 所述第二触发指令用于指示 所述操作系统继续进行内存数据的迁移; d )返回执行步骤 a ) , 直至所述 源内存卡的内存数据全部迁移到所述备份内存卡。
结合第一方面或者第一方面的第一种可能的实现方式或者第二种可能 的实现方式或者第三种可能的实现方式, 在第四中可能的实现方式中, 所述 操作系统还用于在确定所述源内存卡的内存数据全部迁移到所述备份内存 卡之后,将所述源内存卡的系统地址指向的目标内存卡更改为所述备份内存 卡。
第二方面, 本发明实施例提供了一种内存数据的迁移方法, 用于迁移计 算机中内存数据, 该方法包括:
所述计算机的操作系统获取第一触发指令, 所述第一触发指令用于指示 所述操作系统执行内存数据的迁移;
所述操作系统中止当前正在执行的任务以启动内存数据的迁移; 所述操作系统确定待迁移内存数据的源内存卡;
所述操作系统为所述源内存卡确定备份内存卡;
所述操作系统指示所述源内存卡的内存控制器进行内存数据的迁移, 以 使得所述源内存卡的内存控制器根据所述操作系统的指示将所述源内存卡 的内存数据迁移到所述备份内存卡。
结合第二方面, 在第一种可能的实现方式中, 该方法还包括: 所述操作 系统将所述源内存卡和所述备份内存卡设置为镜像模式; 所述操作系统指示 所述源内存卡的内存控制器进行内存数据的迁移, 以使得所述源内存卡的内 存控制器根据所述处理器的指示读取所述源内存卡的内存数据,将所读取的 所述源内存卡的内存数据写入到所述备份内存卡, 包括: 所述操作系统指示
所述源内存卡的内存控制器进行内存数据的迁移, 以使得所述源内存卡的内 存控制器根据所述操作系统的指示读取所述源内存卡的内存数据,将所读取 的所述源内存卡的内存数据写入到所述备份内存卡, 包括:
所述操作系统向所述源内存卡的内存控制器发送数据读指令, 所述数据 读指令用于指示所述源内存卡的内存控制器读取所述源内存卡的内存数据; 所述源内存卡的内存控制器根据所述操作系统的数据读指令读取所述 源内存卡的内存数据;
所述操作系统向所述源内存卡的内存控制器发送数据写指令, 所述数据 写指令用于指示所述源内存卡的内存控制器将所述读取的数据写回所述源 内存卡;
所述源内存卡的内存控制器接收所述操作系统发送的所述数据写指令, 根据所述源内存卡和所述备份内存卡之间的镜像模式,将所读取的所述源内 存卡的内存数据发送给所述备份内存卡的内存控制器, 以使得所述备份内存 卡的内存控制器将接收到的所述源内存卡的内存数据写入到所述备份内存 卡。
结合第二方面的第一种可能的实现方式, 在第二可能的实现方式中, 在 所述操作系统指示所述源内存卡的内存控制器进行内存数据的迁移之前,还 包括: 所述操作系统获取分次迁移策略; 则, 所述操作系统根据所述分次迁 移策略, 指示所述源内存卡的内存控制器分多次进行内存数据的迁移。
结合第二方面的第二种可能的实现方式, 在第三可能的实现方式中, 所 述操作系统根据所述分次迁移策略指示所述源内存卡的内存控制器分多次 进行内存数据的迁移, 包括: a )所述操作系统确定当次迁移的数据量, 指 示所述源内存卡的内存控制器将所述当次迁移的数据量迁移到所述备份内 存卡, 或者, 所述操作系统确定当次迁移的时长, 指示所述源内存卡的内存 控制器在所述当次迁移的时长内进行内存数据的迁移; b )在确定所述源内 存卡的内存控制器完成所述当次迁移之后, 所述操作系统中止执行内存数据
的迁移; C )所述操作系统接收第二触发指令, 所述第二触发指令用于指示 所述操作系统继续进行内存数据的迁移; d )所述操作系统返回执行步骤 a ), 直至所述源内存卡的内存数据全部迁移到所述备份内存卡。
结合第二方面或者第二方面的第一种可能的实现方式或者第二种可能 的实现方式或者第三种可能的实现方式, 在第四种可能的实现方式中, 在所 述源内存卡的内存数据全部迁移到所述备份内存卡之后, 还包括: 所述操作 系统将所述源内存卡的系统地址指向的目标内存卡更改为所述备份内存卡。
第三方面, 本发明实施例提供了一种内存数据的迁移装置, 用于迁移计 算机中内存数据, 所述装置包括:
获取单元, 用于获取第一触发指令, 所述第一触发指令用于指示操作系 统执行内存数据的迁移;
确定单元, 用于在所述获取单元获取所述第一触发指令之后, 中止当前 正在执行的任务以启动内存数据的迁移, 确定待迁移内存数据的源内存卡, 以及为所述源内存卡确定备份内存卡;
迁移单元, 用于指示所述源内存卡的内存控制器进行内存数据的迁移, 以使得所述源内存卡的内存控制器根据所述操作系统的指示将所述源内存 卡的内存数据迁移到所述备份内存卡。
结合第三方面,在第一种可能的实现方式中,该装置还包括:镜像单元, 用于将所述源内存卡和所述备份内存卡设置为镜像模式; 所述迁移单元具体 用于向所述源内存卡的内存控制器发送数据读指令, 所述数据读指令用于指 示所述源内存卡的内存控制器读取所述源内存卡的内存数据, 以及向所述源 内存卡的内存控制器发送数据写指令, 所述数据写指令用于指示所述源内存 卡的内存控制器将所述读取的数据写回所述源内存卡, 以使得所述源内存卡 的内存控制器根据所述源内存卡和所述备份内存卡之间的镜像模式,将所读 取的所述源内存卡的内存数据写入到所述备份内存卡源内存卡的内存数据。
结合第三方面的第一种可能的实现方式, 在第二种可能的实现方式中,
在所述迁移单元具体用于获取分次迁移策略, 根据所述分次迁移策略, 指示 所述源内存卡的内存控制器分多次进行内存数据的迁移。
结合第三方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述迁移单元具体用于循环执行如下操作 a ) -d ) , 直至将所述源内存卡的 内存数据全部迁移到所述备份内存卡, 所述操作 a ) -d ) 包括: a )确定当 次迁移的数据量,指示所述源内存卡的内存控制器将所述当次迁移的数据量 迁移到所述备份内存卡, 或者, 确定当次迁移的时长, 指示所述源内存卡的 内存控制器在所述当次迁移的时长内进行内存数据的迁移; b )在确定所述 源内存卡的内存控制器完成所述当次迁移之后, 中止执行内存数据的迁移; c )接收第二触发指令, 所述第二触发指令用于指示所述操作系统继续进行 内存数据的迁移; d )返回执行步骤 a ) , 直至所述源内存卡的内存数据全 部迁移到所述备份内存卡。
结合第三方面或者第三方面的第一种可能的实现方式或者第二种可能 的实现方式或者第三种可能的实现方式, 在第四种可能的实现方式中, 所述 迁移单元还用于确定所述源内存卡的内存控制器完成所述源内存卡的内存 数据迁移之后,将所述源内存卡的系统地址指向的目标内存卡更改为所述备 份内存卡。
在本发明实施例中,操作系统能够在接收到第一触发指令后中止当前正 在执行的任务以启动内存数据的迁移, 确定待迁移内存数据的源内存卡, 为 所述源内存卡确定备份内存卡, 指示所述源内存卡的内存控制器读取所述源 内存卡, 从而在计算机不下电的情况下, 能够对所述源内存卡的内存数据进 行迁移, 实现了对故障内存卡的在线维护, 解决了现有技术中需要对整个计 算机下电才能进行故障内存卡的更换或维护的问题。
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实施
例中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动的前提下, 还可以根据这些附图获得其它的附图。
图 1为本发明实施例提供的计算机的系统框图;
图 2为本发明实施例提供的内存数据的迁移方法流程图;
图 3为本发明实施例提供的又一种内存数据的迁移方法流程图; 图 4为本发明实施例提供的又一种内存数据的迁移方法流程图; 图 5为本发明实施例提供的内存数据迁移装置的组成图;
图 6为本发明实施例提供的又一种内存数据迁移装置的组成图。 具体实施方式
本发明实施例提供了一种内存数据的迁移方法、 计算机和系统, 能够在 计算机正常运行的情况下进行内存数据的迁移。
一种实现内存数据迁移的计算机
如图 1所示, 为实施本发明实施例的计算机的一个示例, 该计算机包括 主存储器 101、 内存控制器 102、处理器 105、基本输入输出系统(Basic Input Output System, BIOS ) 104和硬盘(图 1未示出 ) 。 所述主存储器 101包括 至少一个内存卡, 图 1中以 3个内存卡为例, 内存卡 101-A、 101-B、 101-Co 所述内存控制器 102用于控制所述主存储器 101 , 可以为所述主存储器 101 的每个内存卡配置对应的内存控制器 102 , 例如内存卡 101-A的内存控制器 102-A, 内存卡 101-B 的内存控制器 102-B, 内存卡 101-C 的内存控制器 内存的存储介质, 一个内存卡可以指一根内存条或一个内存板, 也可以指多 根内存条的集合或多个内存板的集合。每个内存卡都配置有对应的内存控制 器, 内存卡和内存控制器的对应关系可以是一对一, 也可以是一对多或者多 对一, 图 1只是本发明实施示例之一。
在所述计算机系统开机后,所述主存储器 101可以在计算机开机启动时, 加载所述 BIOS104 中的指令以及存储在硬盘中的计算机的操作系统 ( Operating System, OS )103的指令,所述处理器 105可以执行所述 BIOS 104 的指令或所述计算机的操作系统(Operating System, OS ) 103的指令, 例如 所述处理器 105可以执行 BIOS104的指令对所述计算机中的设备进行初始 化, 以及执行所述 OS103的指令对所述内存卡进行读写操作, 其中, 所述处 理器 105主要指 CPU内核部分, 可以是一个 CPU内核, 也可以是多个 CPU 内核的集合, 在本发明实施例中, 所述处理器 105是多个 CPU内核的集合。 所述 BIOS104可以是一个处理芯片, 在该处理芯片内注册了多个处理指令, 所述处理器 105可以执行这些处理指令。
本实施例中为了实现内存数据的迁移, 需要在计算机中配置备份内存 据迁移的内存卡在本实施例中被称为源内存卡。 在图 1所示的实施例中, 内 存卡 101-A和 101-B可以是源内存卡, 内存卡 101-C是本发明实施例配置的 备份内存卡。 本实施例中, 以为计算机指定一个备份内存卡 101-C为例, 实 际上, 也可以为计算机指定多个备份内存卡。 本发明实施例所说的内存数据 的迁移的目的是使得备份内存卡能够获得源内存卡中的内存数据, 为了实现 上述迁移的目的, 在具体实现中, 可以采用内存数据的复制、 拷贝或者搬迁 等方式, 只要实现了备份内存卡能够获得源内存卡中的内存数据的迁移目 的, 上述各种具体实现方式都在本发明实施例的 "迁移" 范畴之类。
本发明实施例对 OS 103进行功能改进来实现不下电计算机, 进行内存 数据的迁移, 举例来说, 可以使得改进后的 OS 103可以获取第一触发指令, 根据所述第一触发指令中止当前正在执行的任务, 启动内存数据的迁移, 例 如确定待迁移内存数据的源内存卡, 为所述源内存卡确定备份内存卡, 指示 所述源内存卡的内存控制器进行内存数据的迁移,使得该源内存卡的内存控 制器能够根据所述 OS 103的指示, 将所述源内存卡的内存数据迁移到所述
备份内存卡。
本发明实施例的计算机的各组成可以执行如下操作:
所述 OS 103用于获取第一触发指令, 根据所述第一触发指令中止当前 正在执行的任务以启动内存数据的迁移, 确定待迁移数据的内存卡, 例如所 述源内存卡 101-A, 为所述源内存卡确定备份内存卡, 例如所述源内存卡 101-A确定备份内存卡 101-C , 以及指示所述源内存卡的内存控制器 102-A 进行内存数据的迁移。
所述源内存卡的内存控制器 102-A用于根据所述 OS 103的指示, 读取 所述源内存卡 101-A的内存数据,将所读取的所述源内存卡 101-A的内存数 据写入到所述备份内存卡 101-C。
在本发明实施例中, 由于所述 OS 103能够在获取到第一触发指令后中 止当前正在执行的任务, 执行内存数据的迁移, 确定待迁移内存数据的源内 存卡 101-A, 为所述源内存卡确定备份内存卡 101-C, 指示所述源内存卡的 内存控制器 102-A将所述源内存卡 101-A的内存数据写入所述备份内存卡 101-C, 在计算机不下电的情况下, 能够对所述源内存卡 101-A的内存数据 进行迁移, 实现了对故障内存卡的在线维护, 解决了现有技术中需要对整个 计算机下电才能进行故障内存卡的更换或维护的问题。
下面对本发明实施例各组成的功能进行展开进行详细地介绍。
关于配置备份内存卡
本实施例中, 为了保证 OS 103顺利的进行内存数据的迁移, 需要要计 算机中配置备份内存卡, 所述备份内存卡作为待迁移的内存数据的目标设 备, 与计算机中的其他内存卡具有一定的不同之处, 例如在内存数据迁移完 成之前对 OS 103不可见, 即 OS 103无法对其进行读写操作; 所述处理器 105可以执行 BIOS 104的指令对所述备份内存卡 101-C进行特殊初始化,使 得所述备份内存卡 101-C准备就绪并可以正常使用,但是所述初始化过程避 免为所述备份内存卡 101-C分配系统地址, 从而使得所述 OS 103无法对所
述备份内存卡 101 -c进行任何读写操作, 这样可以保证将源内存卡的内存数 据完整迁移到备份卡,保证迁移过程中已经迁移的数据不会被覆盖上其他的 数据, 使得迁移的内存数据受到破坏。
配置所述备份内存卡可以包括:
1、 指定并记录备份内存卡的标识。 可以是由用户将备份内存卡插入硬 件插槽之后, 将该备份内存卡的标识发送给 OS 103 , OS103可以获取指定 的备份内存卡的标识并记录在存储模块中, 此种情况下, 即指定在计算机中 已经硬件存在内存卡为备份内存卡; 也可以是用户并不将备份内存卡插入硬 件插槽, 而是指定备份内存卡后续将要插入的硬件插槽的槽位号, 将指定的 槽位号作为备份内存卡的标识进行记录, 此种情况下, 即指定在计算机中还 没有硬件存在内存卡为备份内存卡。
指定并记录备份内存卡的标识之后, OS 103后续可以查询记录的所述内 存内存卡的标识, 以确定备份内存卡。
2、 对备份内存卡执行特殊的初始化。 在指定了备份内存卡之后, 可以 对该备份内存卡进行特殊的初始化, 以使得该备份内存卡准备就绪, 计算机 可以将源内存卡的内存数据写入所述备份内存卡。 对备份内存卡初始化, 需 要该内存卡已经插入硬件插槽, 而实际上, 何时将备份内存卡插入硬件插槽 可以非常灵活, 可以是指定备份内存卡之前即插入, 也可以是在指定备份内 存卡之后, 以及执行内存数据的迁移之前的任何时间。 具体来说初始化的场 景可以分为三种, 一种是内存数据的迁移启动之前, 由用户按下备份单元上 的按鈕,该按鈕产生初始化中断,使得计算机执行 BIOS 104对该备份内存卡 的特殊初始化, 一种是在启动内存数据迁移之前, 计算机开机启动时, 用户 通过所述 BIOS 104的起始菜单,指定系统中的备份内存卡 101-C,使得所述 BIOS 104重新启动所述计算机,对所述备份内存卡 101-C进行特殊的初始化 操作, 一种是内存数据的迁移启动之后, 如果 BIOS检测到备份内存卡还没 有完成初始化, 可以临时启动对备份内存卡的初始化。
其中,对所述备份内存卡进行特殊初始化是指对所述备份内存卡进行配 所述初始化的过程包含正常初始化的各种行为, 除了在初始化过程中避免为 该备份内存卡分配系统地址, 例如, 对所述备份内存卡进行初始化可以包括 为所述备份内存卡供电, 配置相关性能等参数, 配置所述备份内存卡与计算 机中的处理器之间的通信连接,检测所述备份内存卡是否能够进行正常的读 写操作等。 在对所述备份内存卡进行初始化时, 避免为所述备份内存卡分配 系统地址,从而所述 OS 103无法获取所述备份内存卡的系统地址,不能对所 述备份内存卡进行任何读写操作, 即所述备份内存卡虽然已经准备就绪, 但 对所述 OS不可见, 此时所述 OS不能使用所述备份内存卡。 关于触发内存数据迁移的触发
在本发明实施例中, 内存数据的迁移的启动是根据源内存卡的故障情况 或者用户的需求而触发并启动的, 也就是说, 计算机开机启动后, 正常执行
OS103的指令,根据接收或生成的内存数据迁移的触发指令中止正在执行的 任务,启动内存数据的迁移。所述 OS 103在获取到所述内存数据迁移的触发 指令之后, 可以是立即中止当前正在执行的任务, 执行内存数据的迁移, 还 可以是在计算机空闲时中止当前正在执行的任务, 执行内存数据的迁移, 例 如,用户可以对 OS103进行预先配置,将所述第一触发指令配置为优先级别 最高的处理指令, 使得所述 OS 103在获取到所述第一触发指令之后, 立即终 止当前正在执行的任务, 执行内存数据的迁移, 保障及时对故障内存卡的内 存数据进行迁移。 在本发明实施例中, 所述 OS 103在获取到所述内存数据 迁移的触发指令时, 才进行内存数据的迁移, 即针对用户指定的源内存卡或 者有明确故障的源内存卡进行内存数据的迁移, 不需要预先指定固定的源内 存卡, 也不需要预先配置源内存卡和备份内存卡的镜像关系, 因此, 本发明 实施例针对明确地源内存卡实现内存数据的迁移的触发, 即保证了故障的及 时处理, 又节约了计算机的资源, 保证了计算机的高效率。
本发明实施例中内存数据迁移的触发指令用来指示 OS 103中止正在执 行的任务以启动内存数据的迁移。 由于本发明实施例可以实现内存数据的一 次迁移, 也可以实现内存数据的多次迁移, 因此, 在本发明实施例中内存数 据迁移的触发指令可以包括第一触发指令和第二触发指令,将启动内存数据 的第一次迁移的内存数据迁移的触发指令称为第一触发指令,将触发内存数 据的后续迁移的内存数据迁移的触发指令称为第二触发指令。
在本发明实施例中, 所述第一触发指令用于指示所述 OS 103执行内存 数据的迁移, 该第一触发指令的触发可以比较灵活, 所述第一触发指令的触 发可以比较灵活, 例如可以根据用户的指示生成所述第一触发指令, 还可以 由所述源内存卡的内存控制器 102-A触发所述第一触发指令。具体地,例如, ( 1 )所述源内存卡的内存控制器 102-A还可以对所述源内存卡的错误 数据进行监控, 若所述错误数据超过阈值, 触发所述第一触发指令; 所述 OS 103根据所述源内存卡的内存控制器 102-A触发的所述第一触发指令, 确定错误数据超过阈值的内存卡为所述源内存卡 101-A, 并根据预先获取的 所述备份内存卡的标识, 确定所述备份内存卡 101 -C。
( 2 )所述第一触发指令还可以由 OS根据用户发送的内存数据的迁移的 启动指令来生成, 也可以由 OS根据用户在所述 OS中预置的内存数据的迁 移的启动策略来产生。例如用户直接向 OS发送内存数据的迁移的启动指令, OS 根据用户的启动指令产生所述第一触发指令, 或者例如用户预先在 OS 中配置的按照时间或者处理器的运行状态来启动内存数据的迁移的启动策 略, 在该启动策略被满足时, OS产生所述第一触发指令。 所述 OS根据所 述第一触发指令, 中止正在执行的任务, 启动内存数据的迁移指令。
关于分多次实现内存数据的迁移
本发明实施例的一个较优的实施例中, 将分多次进行内存数据的迁移。 由于在进行内存数据迁移的过程中, 所述 0S 1 03 中止了当前正在执行的任 务, 当内存数据迁移完毕后, 所述 OS 103才能继续执行中止的任务或其它
任务, 如果待迁移的数据过多, 则所述 OS 103将长时间中止系统的业务, 影响了计算机的正常运行, 因此, 可以分多次将所述源内存卡的内存数据迁 移到所述备份内存卡, 在完成一次内存数据迁移之后, 所述 OS 103可以中 止执行内存数据的迁移, 继续执行中止的任务或其它任务, 直到进行下一次 内存数据迁移时, 所述 OS 103再中止当前正在执行的任务, 继续执行内存 数据的迁移, 避免了计算机业务的长时间中断, 保证了计算机的正常运行。
针对上述分多次进行内存数据迁移的方式, 在本发明的又一实施例中, 可以对所述 OS 103进行进一步改进,所述 OS 103还可以获取分次迁移策略, 根据所述分次迁移策略指示所述源内存卡的内存控制器 102-A分多次进行 内存数据的迁移, 所述分次迁移策略可以由用户配置, 例如用户可以根据需 求指定每次迁移的数据量或者每次迁移的时长, 所述 OS 103用于根据所述 指定的每次迁移的数据量或者每次迁移的时长, 执行如下操作 a)-d ) ,直到将 所述源内存卡 101-A的内存数据全部迁移到所述备份内存卡 101-C , 所述操 作 a ) -d ) 包括:
a )根据所述每次迁移指定的数据量确定当次迁移的数据量, 指示所述 源内存卡的内存控制器 102-A将所述当次迁移的数据量迁移到所述备份内 迁移的时长,指示所述源内存卡的内存控制器 102-A在所述当次迁移的时长 内进行内存数据的迁移, 或者根据处理器的运行状态, 指示所述源内存卡的 内存控制器 102-A在处理器的运行状态为空闲的时间段内进行内存数据的 迁移, 其中所述处理器的运行状态为空闲状态可以是处理器的占用率小于设 定阈值;
b )在确定所述源内存卡的内存控制器 102-A完成所述当次迁移之后, 所述 OS中止执行内存数据的迁移;
c )接收第二触发指令,所述第二触发指令用于指示所述 OS继续进行内 存数据的迁移;
d )返回执行步骤 a ) 。
所述 OS 103通过上述操作 a )-d ) ,实现了分多次将所述源内存卡 101-A 的数据迁移到了所述备份内存卡 101-C。
其中, 操作 c)中的第二触发指令, 不仅可以由用户手动触发, 还可以是 根据预先配置的第二触发指令的触发条件来触发, 例如可以在所述迁移策略 中配置所述第二触发指令的触发条件, 所述第二触发指令的触发条件可以包 括每次迁移的间隔时长或者处理器的运行状态, 所述 OS 103可以设置内存 数据迁移定时器, 所述内存数据迁移定时器根据每次迁移的间隔时长, 触发 所述第二触发指令, 或者对所述处理器的运行状态进行实时监控, 当所述中 央处理的运行状态为空闲时触发所述第二触发指令。
在本发明实施例中, 所述 OS 103可以根据所述分次迁移策略, 指示所 述源内存卡的内存控制器 102-A分多次将所述源内存卡的内存数据迁移到 所述备份内存卡, 使得在进行内存数据迁移的过程中, 所述 OS 103能够根 据需求中止和恢复执行的任务,使得所述 OS能够及时处理计算机中的业务, 避免在进行大量内存数据迁移时导致的系统业务的长时间中断,保障了该计 算机的正常运行。
关于将所述源内存卡和所述^^内存卡设置为镜 式
在进行内存数据的迁移之前, 所述 OS 103还可以将所述源内存卡和所 述备份内存卡设置为镜像模式,使得所述源内存卡的内存控制 102-A可以根 据所述 OS 103的指示以及所述镜像模块, 将所述源内存卡的内存数据写入 所述备份内存卡。
具体地, 在确定所述源内存卡 101-A和所述备份内存卡 101-C之后, 所 述 OS 103可以在所述源内存卡的内存控制器 102-A中配置所述备份内存卡 的标识,在所述备份内存卡的内存控制器 102-C中配置所述源内存卡的标识, 以使得所述源内存卡 101-A与所述备份内存卡 101-C之间设置为镜像模式。
所述 OS 103还可以向所述源内存卡的内存控制器发送数据读指令, 所
述数据读指令用于指示所述源内存卡的内存控制器 102-A读取所述源内存 卡 101A的数据, 接收所述源内存卡的内存控制器 102-A发送的所述数据读 指令的响应消息, 向所述源内存卡的内存控制器 102-A发送数据写指令, 所 述数据写指令用于指示所述源内存卡的内存控制器将所述读取的数据写回 所述源内存卡, 从而所述源内存卡的内存控制器 102-A 可以根据所述 OS 103发送的数据读指令,读取所述源内存卡 101-A的数据,根据所述 OS 103 发送的数据写指令将所述读取的数据写回所述源内存卡 101-A, 以及根据所 述源内存卡的内存控制器 102-A中配置的所述备份内存卡的标识,将所述读 取的数据写入所述备份内存卡 101-C, 从而实现了所述源内存卡 101-A的数 据迁移到所述备份内存卡 101-C。
通过上述方式, 所述 OS 103可以将所述源内存卡 101-A的所有数据迁 移到所述备份内存卡 101-C, 而不是只迁移在启动内存数据迁移之后, 对所 述源内存卡 101-A进行写操作的新数据,保证了内存数据的完整迁移。并且, 由于源内存卡和备份内存卡设置成了镜像模式, 在所述 OS继续执行中止的 任务或者其它任务时, 所述 OS对源内存卡的任何写操作都会同时写到备份 内存卡上, 保证了在备份内存卡上的已经迁移的内存数据的准确性。
关于对非错误数据进行迁移
当内存卡中的错误数据过多时, 可能导致内存卡故障甚至引起计算机的 重启, 因此,在进行内存数据迁移的过程中,可以只对非错误数据进行迁移。
所述 OS 103还可以指示所述源内存卡的内存控制器 102-A确定所述源 内存卡 101-A中的非错误数据,并根据所述源内存卡的内存控制器 102-A确 定的所述非错误数据的标记,指示所述源内存卡的内存控制器 102-A对所述 非错误数据进行迁移,避免将所述源内存卡 101-A中的错误数据迁移到所述 备份内存卡 101-C 而可能导致的计算机重启或可能导致的所述备份内存卡 101-C故障。
所述源内存卡的内存控制器 102-A可以才艮据所述 OS 103的指示, 确定
所述源内存卡 101-A中的非错误数据, 并标记所述非错误数据, 例如记录所 述非错误数据或者错误数据的系统地址,使得所述 OS103可以根据所述非错 误数据或者错误数据的系统地址,指示所述源内存卡的内存控制器对所述非 错误数据进行迁移,避免将所述源内存卡中的错误数据迁移到所述备份内存 卡而可能导致的计算机重启。 关于迁移条件
为了保证内存数据迁移的顺利进行,在进行内存数据迁移之前,所述 OS 103可以检查所述备份内存卡 101-C是否满足迁移条件, 即是否可以作为所 述源内存卡 101-A数据迁移数据的目标设备, 避免由于所述备份内存卡 101-C由于未完成初始化或者内存容量不够等情况而导致的数据迁移失败。
具体地, 所述 BIOS 104还可以在进行内存数据迁移之前, 确定所述备 份内存卡 101-C是否完成特殊的初始化, 若所述备份内存卡 101-C完成特殊 的初始化, 则表明所述备份内存卡 101-C可以正常使用, 从而将所述源内存 卡 101-A和所述备份内存卡 101-C设置为镜像模式, 以便后续进行内存数据 的迁移。
所述 OS 103还可以确定所述备份板的内存容量是否大于所述源内存卡 101-A的内存容量, 若所述备份板的内存容量是大于所述源内存卡 101-A的 内存容量, 则确定满足所述迁移条件, 可以后续将所述源内存卡的内存数据 迁移到所述备份内存卡。
所述 OS 103还可以确定所述源内存卡 101-A与所述备份内存卡 101 -C 是否属于同一个处理器控制, 如果不属于, 表示可以将所述源内存卡 101-A 的数据迁移到所述备份内存卡,从而将所述源内存卡 106和所述备份内存卡 107设置为镜像模式, 以便后续进行内存数据的迁移。
所述 OS 103可以从所述 BIOS 104获取所述备份内存卡是否完成初始 化, 所述备份内存卡的内存容量等信息, 从而判断所述备份内存卡是否满足 迁移条件。
关于内存数据迁移完成之后的^ 内存卡与源内存卡的替换 当所述源内存卡的内存控制器 102-A将所述源内存卡 101-A的数据全部 迁移到所述备份内存卡 101-C之后, 所述 OS 103还可以建立所述源内存卡 101-A的系统地址与所述备份内存卡 101-C的映射关系, 将所述源内存卡的 系统地址指向的目标内存卡更改为所述备份内存卡, 使得所述备份内存卡 101 -C可以替代所述源内存卡 101 -A ,接管所述 OS 103对所述源内存卡 101 -A 的所有读写操作。
在所述备份内存卡已经替换了所述源内存卡之后, 所述 OS 103还可以 对所述源内存卡 101-A执行下电操作, 例如, 对所述源内存卡的内存控制器 102-A的寄存器进行配置, 从而对所述源内存卡 101-A下电, 使得在所述计 算机在不下电的情况下, 可以移除或者更换所述源内存卡 101-A, 解决了现 有技术中需要对整个计算机下电才能进行故障内存卡的更换或维护的问题。 一种内存数据的迁移方法
结合图 1所示的计算机,本发明实施例提供了一种内存数据的迁移方法, 如图 2所示, 用于迁移计算机中内存数据, 所述方法包括:
S201 : 所述计算机的 OS获取第一触发指令, 所述第一触发指令用于指 示所述 0S执行内存数据的迁移
所述第一触发指令可以是由源内存卡的内存控制器触发的, 例如, 当源 内存卡的内存控制器监控到某一个源内存卡出现多次错误, 已经达到预设阈 值, 可以通过该第一触发指令指示 OS对所述出现多次错误的源内存卡启动 内存数据的迁移;该第一触发指令可以是由所述 OS根据用户的指示生成的, 例如, 当用户发现某个内存卡性能不稳定或是其它需要更换的情况, 可以向 所述 OS发送的内存数据的迁移的启动指令, 以使得所述 OS根据所述启动 指令生成所述第一触发指令执行内存数据的迁移, 又例如, 用户可以在操作 系统中预先配置内存数据的迁移的启动策略, 当所述启动策略被满足时, 所
述 OS生成所述第一触发指令。
S202: 所述 OS中止当前正在执行的任务以启动内存数据的迁移。
所述 OS在接收到所述第一触发指令后,可以中止当前正在执行的任务, 进行内存数据的迁移。
S203 : 所述 OS确定待迁移内存数据的源内存卡。
在启动内存数据的迁移之后, 所述 OS需要确定待迁移内存数据的源内 存卡, 所述 OS可以通过查询计算机的内存控制器, 确定触发所述第一触发 指令的内存控制器对应的内存卡为源内存卡,或者根据用户的指示确定需要 进行迁移内存数据的内存卡为源内存卡。
S204: 所述 OS为所述源内存卡确定备份内存卡。
所述 OS还需要为所述源内存卡确定备份内存卡, 以将所述源内存卡的 内存数据迁移到所述备份内存卡。 所述备份内存卡可以是暂时没有分配系统 地址的内存卡, 对所述 OS不可见, 所述 OS暂时不会对所述备份内存卡进 行写操作。
所述备份内存卡可以是预先配置的, 也可以临时插入并指配的, 具体实 现后续实施例会进行详细的说明。
S205: 所述 OS指示所述源内存卡的内存控制器进行内存数据的迁移, 以使得所述源内存卡的内存控制器根据所述操作系统的指示将所述源内存 卡的内存数据迁移到所述备份内存卡。
在确定了所述源内存卡和所述备份内存卡之后, 所述 OS可以指示所述 源内存卡的内存控制器开始进行内存数据的迁移, 例如, 所述 OS可以指示 所述源内存卡的内存控制器读取该源内存卡的内存数据, 然后指示所述源内 存卡的内存控制器将读取的源内存卡的内存数据写入所述备份内存卡,从而 实现了内存数据的迁移, 所述 OS通过上述读取和写入所述源内存卡的内存 数据的方式, 可以将所述源内存卡的所有内存数据迁移到所述备份内存卡, 而不是仅仅只迁移启动内存数据迁移后, 源内存卡中新写入的数据。
在本发明实施例中, 所述 OS可以接收第一触发指令, 确定待迁移内存 数据的源内存卡, 为所述源内存卡确定备份内存卡从而可以指示所述源内存 卡的内存控制器将所述源内存卡的内存数据写入所述备份内存卡,在计算机 不下电的情况下, 能够对所述源内存卡的内存数据进行迁移, 实现了对故障 内存卡的在线维护,解决了现有技术中需要对整个计算机下电才能进行故障 内存卡的更换或维护的问题。 此外, 在本发明实施例中, 所述 OS在有内存 数据迁移的需要时,即接收到所述第一触发指令时,才进行内存数据的迁移, 既保证了内存卡故障的及时处理, 又节约了系统资源。 方法具体实施例一
结合图 1所示的计算机,本发明实施例提供了一种内存数据的迁移方法, 如图 3所示, 用于迁移计算机中内存数据, 例如, 能够将源内存卡的内存数 据迁移到备份内存卡, 所述源内存卡为对 OS 103可见的内存卡, 即 OS 103 可以进行读写操作的内存卡, 也就是可能产生故障需要迁移数据的内存卡, 如本实施例中的内存卡 101-A和 102-B, 所述备份内存卡为对 OS 103不可 见的内存卡, 即 OS 103暂时不可进行读写操作的内存卡, 可能作为待迁移 数据的目标设备,如本实施例中的内存卡 101-C, 当内存数据迁移完毕之后, 可以更改所述备份内存卡的配置信息,例如为其分配系统地址,使得 OS 103 可以对所述备份内存卡进行读写操作。
在本发明实施例中, 所述备份内存卡 101-C可以是计算机开机之前已经 插入硬件插槽的内存卡, 也可以是在计算机开机启动后临时新增的内存卡, 在进行内存数据迁移之前, 对所述备份内存卡进行特殊初始化(不分配系统 地址, 后续实施例详细描述) 即可。
本发明实施例的内存数据的迁移方法可以包括:
S301 : BIOS获取指定的备份内存卡的标识, 并将其配置到 ACPI列表 中。
用户可以在所述计算机开机启动时, 通过 BIOS的起始菜单配置指定的
备份内存卡的标识, 所述 BIOS可以获得用户配置的备份内存卡的标识并写 入高级配置和电故障管理接口 ( Advanced Configuration and Power Management Interface, ACPI ) 列表中, 以使得后续 OS 可以通过查询所述 ACPI列表, 获取所述备份内存卡的信息。
其中,所述 ACPI列表为 OS与 BIOS交互的信息表的集合, OS和 BIOS 都可以进行访问, 当然, 在本发明实施例中, 所述备份内存卡的标识不一定 要配置在 ACPI列表中, 只需要配置在 BIOS和 OS都可以访问的一个存储 空间或列表中即可, 使得所述 BIOS在配置所述备份内存卡的标识之后, 所 述 OS可以获取到所述备份内存卡的标识, 本发明实施例在此不作限定。
所述备份单元的标识可以是所述备份内存卡所插入的槽位的槽位编号 或者所述槽位相关的号码。在本发明实施例中,在指定备份内存卡的标识时, 如果所述备份内存卡已经插入槽位中, 则所述备份内存卡的标识可以为当前 插入的槽位的槽位编号, 如果所述备份内存卡还未插入到槽位中, 则所述备 份内存卡的标识可以是用户指定的槽位的槽位编号, 所述备份内存卡可以在 后续需要使用时直接插入所述用户指定的槽位。
步骤 301为可选步骤, 用户并不一定要在计算机开机启动时将所述备份 内存卡的标识提供给 BIOS , 还可以在计算机开机启动后将所述备份内存卡 的标识直接提供给 OS, OS记录所述备份内存卡的标识, 并在后续使用时获 取自身记录的所述备份内存卡的标识, 本发明实施例在此不做限定。
S302: 所述 BIOS对所述备份内存卡进行初始化, 所述初始化过程避免 为所述备份内存卡分配系统地址。
在所述 BIOS获取用户指定的所述备份内存卡的标识之后, 可以重新启 动计算机, 以对所述备份内存卡进行特殊的初始化, 即初始化过程避免为所 述备份内存卡分配系统地址。
具体地, 所述 BIOS可以根据所述备份内存卡的标识确定所述备份内存 卡是否已经插入槽位, 如果已经插入槽位, 即确定所述备份内存卡已经硬件
存在, 则可以在此时对所述备份内存卡进行初始化, 使得所述备份内存卡已 经准备就绪, 但所述 OS暂时不可以对所述备份内存卡进行读写操作。
其中, 对所述备份内存卡进行初始化是指对所述备份内存卡进行配置, 使得所述备份内存卡准备就绪, 可以正常使用, 例如, 对所述备份内存卡进 行初始化可以包括为所述备份内存卡供电, 配置相关性能等参数, 配置所述 备份内存卡与计算机中的处理器之间的通信连接,检测所述备份内存卡是否 能够进行正常的读写操作等, 需要注意的是, 在对所述备份内存卡进行初始 化时, 避免为所述备份内存卡分配系统地址, 从而所述 OS无法获取所述备 份内存卡的系统地址, 不能对所述备份内存卡进行任何读写操作, 即所述备 份内存卡虽然已经准备就绪, 但对所述 OS不可见, 此时所述 OS不能使用 所述备份内存卡。
在本发明实施例中,对所述备份内存卡进行特殊初始化即指上述初始化 过程。
当然, 本步骤为可选步骤, 实际上, 所述 BIOS还可以在获取所述备份 该备份内存卡的时候再对所述备份内存卡进行特殊的初始化。
S303: 源内存卡的内存控制器对所述源内存卡的错误数据进行监控, 判 断所述错误数据是否超过阈值, 若所述错误数据超过阈值, 则所述源内存卡 的内存控制器触发第一触发指令。
由于当内存卡中的错误数据超过一定值时, 可能导致该内存卡发生故 障, 甚至引起计算机重启, 因此, 可以对所述源内存卡进行监测, 当所述源 内存卡中错误数据过多时, OS执行内存数据的迁移, 保证问题的解决。
具体地, 在计算机开机启动时, 用户可以通过所述 BIOS的起始菜单对 所述源内存卡的内存控制器进行配置,使得所述源内存卡的内存控制器可以 对所述源内存卡的错误数据进行监控, 当所述源内存卡的错误数据超过阈值 时, 触发第一触发指令, 所述第一触发指令用于指示所述 OS启动内存数据
的迁移, 其中, 所述阈值可以由用户指定, 还可以是系统的默认值。
如果计算机中的源内存卡有多个时, 可以对每个源内存卡的错误数据进 行监控, 当监控到其中任何一个源内存卡的错误数据超过所述阈值时, 触发 所述第一触发指令第一触发指令, 指示所述 OS启动对该内存卡的内存数据 迁移。
进一步, 所述源内存卡的内存控制器可以在自身的寄存器中记录所述源 内存卡的错误数据的数量超过阈值, 以便后续指示所述 OS确定出问题的内 存卡即源内存卡。
在本发明实施例中, 能够对计算机中的源内存卡进行监控, 针对有问题 的源内存卡触发所述第一触发指令, 进行内存数据的迁移, 能够保证故障及 时解决, 并且只在源内存卡出现故障时才进行内存数据迁移, 节省了系统资 源。
S304: 所述 OS接收到所述第一触发指令, 中止当前正在执行的任务以 启动内存数据的迁移。
在接收到所述第一触发指令之后, 所述 OS可以是立即中止当前正在执 行的任务, 执行内存数据的迁移, 还可以是在计算机空闲时中止当前正在执 行的任务, 执行内存数据的迁移。
进一步, 可以对所述 OS进行预先配置, 将所述第一触发指令配置为优 先级别最高的处理指令, 使得所述 OS在获取到所述第一触发指令之后, 立 即终止当前正在执行的任务, 执行内存数据的迁移, 保障及时对故障内存卡 的内存数据进行迁移, 以及时处理和解决所述计算机中的内存卡故障的问 题。
S305: 所述 OS查询所述源内存卡的内存控制器, 确定所述源内存卡。 在所述 OS中止当前正在执行的任务, 启动内存数据的迁移之后, 需要 确定待迁移数据的内存卡, 即源内存卡, 所述 OS可以确定触发所述第一触 发指令的源内存控制器对应的内存卡为源内存卡, 例如, 查询所述计算机中
的内存控制器的寄存器,通过所述源内存卡的内存控制器的寄存器中记录的 信息, 确定所述源内存卡。
S306: 所述 OS查询所述 ACPI列表, 确定所述备份内存卡的标识。 所述 ACPI列表中预先记录了备份内存卡的标识, 所述 OS在确定执行 内存数据迁移之后, 可以从所述 ACPI列表中获取备份内存卡的标识, 所述 备份内存卡的标识可能为一个, 还可能为多个, 如果为多个所述备份内存卡 的标识, 则所述 OS可以从所述 ACPI列表中获取多个所述备份内存卡的标 识, 并根据所述源内存卡的信息, 从多个所述备份内存卡的标识中挑选一个 作为所述备份内存卡的标识, 例如根据所述源内存卡的内存容量, 从所述多 个备份内存卡中挑选一个内存容量大于所述源内存卡的内存容量的内存卡, 确定该内存卡的标识作为所述备份内存卡的标识, 又例如, 可以根据所述源 内存卡归属的处理器的信息,从所述多个备份内存卡中挑选一个与所述源内 存卡不属于同一个处理器控制的内存卡,确定该内存卡的标识作为所述备份 内存卡的标识。
S307: 所述 OS确定所述备份内存卡是否满足迁移条件。
在进行所述源内存卡的内存数据的迁移之前, 所述 BIOS需要确定所述 备份内存卡是否满足迁移条件, 如果满足迁移条件, 才对所述源内存卡进行 内存数据的迁移, 保证了内存数据迁移的顺利进行, 避免由于所述备份内存 卡内存容量不够等问题而导致的数据迁移失败。
确定所述备份内存卡是否满足迁移条件具体可以是: 确定所述备份内存 卡是否完成初始化, 若所述备份内存卡完成初始化, 则表明所述备份内存卡 准备就绪, 满足迁移条件; 如果在执行本步骤之前, 所述步骤 S302并未执 行, 即如果所述备份内存卡没有完成特殊初始化, 所述 OS可以通过触发系 备份内存卡准备就绪, 满足迁移条件。
进一步, 确定所述备份内存卡是否满足迁移条件还可以是: 确定所述备
份内存卡的内存容量是否大于所述源内存卡的内存容量,如果大于所述源内 存卡的内存容量, 则表明可以将所述源内存卡的内存数据迁移到所述备份内 存卡, 所述备份内存板满足迁移条件; 或者,
确定所述源内存卡与所述备份内存卡是否属于同一个处理器控制,如果 确定不属于同一个处理器控制, 则表明可以将所述源内存卡的内存数据迁移 到所述备份内存卡, 所述备份内存板满足迁移条件。
所述 OS可以从所述 BIOS获取所述备份内存卡的信息, 例如所述备份 内存卡是否完成初始化, 所述备份内存卡的内存容量, 而且判断所述备份内 存卡是否满足迁移条件。
S308: 若所述备份内存卡满足迁移条件, 则所述 OS指示所述源内存卡 的内存控制器执行内存巡检操作, 以确定所述源内存卡中的非错误数据。
在进行内存数据迁移之前, 所述 OS可以指示所述源内存卡的内存控制 器执行内存巡检操作, 以确定所述源内存卡中的非错误数据, 并根据检测结 果打上检测标记,使得后续将所述源内存卡的内存数据迁移到所述备份内存 卡时, 可以根据检测标记只迁移所述源内存卡中的非错误数据, 避免了将错 误数据迁移到所述备份内存卡而导致的计算机重启等问题。
所述源内存卡的内存控制器, 能够根据所述 OS的指示, 启动内存巡检 操作, 所述内存巡检操作具体可以是, 根据设定的检错机制, 对所述源内存 卡的内存数据进行检测, 以判断所述源内存卡中哪些数据是错误数据, 并记 录所述错误数据的系统地址, 即根据检测结果打上检测标记, 使得后续进行 内存数据迁移时, 所述 OS能够根据记录的所述错误数据的系统地址, 迁移 所述源内存卡中的非错误数据。
所述源内存卡的内存控制器在执行完巡检操作之后, 可以对自身的寄存 器进行配置,所述 OS可以通过查询该寄存器,确定所述巡检操作是否完成, 当所述巡检操作完成之后, 所述 OS可以将所述源内存卡和所述备份内存卡 设置为镜像模式, 以进行内存数据的迁移。
此步骤为可选步骤, 所述 OS并不一定要指示所述源内存控制器进行内 存巡检操作。
S309: 若所述备份内存卡满足迁移条件, 则所述 OS将所述源内存卡和 所述备份内存卡设置为镜像模式。
为了实现内存数据的迁移, 所述 OS可以将所述源内存卡和所述备份内 存卡设置为镜像模式, 在设置了所述镜像模式之后, 所述源内存卡的内存控 制能够根据所述 OS的指示, 将所述源内存卡的内存数据写入所述备份内存 卡。
具体地, 所述 OS可以在所述源内存卡的内存控制器中配置所述备份内 存卡的标识, 在所述备份内存卡的内存控制器中配置所述源内存卡的标识, 以使得所述源内存卡与所述备份内存卡之间设置为镜像模式,从而所述源内 存卡能够根据所述 OS的指示, 将所述源内存卡的内存数据发送到所述备份 内存卡的内存控制器,使得所述备份内存卡的内存控制器将所述源内存卡的 内存数据写入所述备份内存卡。
此外, 将所述源内存卡和所述备份内存卡设置为镜像模式还可以包括, 所述 OS将所述源内存卡的内存控制器的地址配置信息复制到所述备份内存 卡的内存控制器, 使得所述备份内存卡按照所述源内存卡的地址分配方式, 为所述备份内存卡分配系统地址。
S310: 所述 OS指示所述源内存卡的内存控制器进行内存数据的迁移。 所述 OS在配置所述源内存卡与所述备份内存卡之间的镜像模式之后, 可以指示所述源内存卡的内存控制器对所述源内存卡进行内存数据的迁移。
具体地, 所述 OS可以向所述源内存卡的内存控制器发送数据读指令, 所述数据读指令用于指示所述源内存卡的内存控制器读取所述源内存卡的 内存数据, 在确定所述源内存卡的内存控制器完成所述数据读指令之后, 所 述 OS可以向所述源内存卡的内存控制器发送数据写指令, 所述数据写指令 用于指示所述源内存卡的内存控制器将所述读取的数据写回所述源内存卡,
从而使得所述源内存卡的内存控制器可以根据所述数据读指令,读取所述源 内存卡的内存数据, 然后再根据所述数据写指令, 将所述读取的数据写入所 述源内存卡, 以及根据所述镜像模式, 将所述读取的数据发送给所述备份内 存卡的内存控制器,使得所述备份内存卡的内存控制器能够将所述读取的数 据写入所述备份内存卡, 实现了内存数据的迁移, 能够将所述源内存卡的所 有内存数据迁移到所述备份内存卡, 而不仅仅只迁移启动内存数据迁移后, 所述源内存卡中新写入的数据。
由于在所述源内存卡的内存控制器在进行内存数据迁移前, 所述操作系 统中止了当前正在执行的任务, 当内存数据迁移完毕后, 所述 OS才能继续 执行中止的任务或其它任务, 如果待迁移的数据过多, 则所述 OS将长时间 中止系统的业务, 影响了计算机的正常运行, 因此, 可以分多次将所述源内 存卡的内存数据迁移到所述备份内存卡, 在完成一次内存数据迁移之后, 所 述 OS可以中止执行内存数据的迁移, 继续执行中止的任务或其它任务, 直 到进行下一次内存数据迁移时, 所述 OS再中止当前正在执行的任务, 继续 执行内存数据的迁移, 避免了计算机业务的长时间中断, 保证了计算机的正 常运行。
在本发明实施例中, 为了实现上述分多次进行内存数据的迁移方法, 用 户可以预先在所述 OS中配置每次迁移的数据量或每次迁移的时长, 即配置 分次迁移策略, 使得所述 OS可以按照所述分次迁移策略, 指示所述源内存 卡的内存控制器分多次进行内存数据的迁移, 具体地, 所述 OS可以, 通过 以下步骤指示所述源内存卡的内存控制器分多次进行内存数据的迁移: a )所述 OS根据所述每次迁移指定的数据量确定当次迁移的数据量,指 示所述源内存卡的内存控制器将所述当次迁移的数据量迁移到所述备份内 次迁移的时长,指示所述源内存卡的内存控制器在所述当次迁移的时长内进 行内存数据的迁移;
b )在确定所述源内存卡的内存控制器完成所述当次迁移之后, 所述 OS 中止执行内存数据的迁移;
c )接收第二触发指令,所述第二触发指令用于指示所述 OS继续进行内 存数据的迁移;
d )返回执行步骤 a ) , 直至所述源内存卡的内存数据全部迁移到所述备 份内存卡。
在步骤 b ) 中, 当所述计算机中止执行内存数据的迁移时, 所述 OS可 能对所述源内存板进行读写操作, 即使所述 OS对所述源内存卡中已经迁移 的数据块 A进行数据写操作, 由于设置了镜像模式, 所述源内存卡的内存控 制器也能够将所述写操作的数据写入所述备份内存卡的数据块 A, 避免了数 此外, 用户还可以在所述分次迁移策略中配置所述第二触发指令的触发 条件, 所述第二触发指令的触发条件可以是每次迁移的间隔时长, 则所述 OS 可以从所述迁移策略中获取所述每次迁移的间隔时长, 并根据所述每次 迁移的间隔时长配置内存数据迁移定时器, 以使得所述内存数据迁移定时器 根据所述每次迁移的间隔时长触发所述第二触发指令指示所述 OS继续进行 内存数据的迁移, 所述内存数据迁移定时器可以设置在所述 OS中, 当所述 内存数据迁移定时器定时时间到达时, 进入中断处理函数, 中止当前执行的 任务, 继续进行内存数据的迁移。
所述第二触发指令还可以根据处理器的运行状态被触发, 所述 OS可以 监控所述处理器的运行状态, 并根据所述处理器的运行状态, 确定是否触发 所述第二触发指令, 执行内存数据的迁移, 例如, 所述 OS可以在 CPU处于 空闲状态, 或者 CPU的占用率小于特定阈值时触发自身中断, 使得所述 OS 中止当前执行的任务, 继续进行内存数据的迁移。
进一步, 所述 OS在指示所述源内存卡的内存控制器进行内存数据的迁 移时, 可以根据所述源内存卡的内存控制器记录的所述错误数据的地址, 指
示所述源内存卡的内存控制器将所述源内存卡中的非错误数据迁移到所述 备份内存卡,避免将所述源内存卡中的错误数据迁移到所述备份内存卡而可 能导致的计算机重启。
S311: 所述 OS将所述源内存卡的系统地址指向的目标内存卡更改为所 述备份内存卡。
在内存数据迁移完成之后, 所述 OS可以将源内存卡的系统地址映射到 所述备份内存卡,使得所述源内存卡的系统地址指向的目标内存卡更改为所 述备份内存卡, 所述备份内存卡可以替代所述源内存卡, 接管所述 OS对所 述源内存卡的所有读写操作。
在本发明实施例中, 所述 OS可以通过配置所述计算机的 CPU, 将所述 源内存卡的系统地址映射到所述备份内存卡。
S312: 所述 OS对所述源内存卡执行下电操作。
在所述源内存卡的内存数据迁移完成之后, 所述 OS可以对所述源内存 卡执行下电操作, 例如, 对所述源内存卡的内存控制器进行配置, 以对所述 源内存卡下电, 使得在所述计算机不下电的情况下, 可以移除或者更换所述 源内存卡,解决了现有技术中需要对整个计算机下电才能进行故障内存卡的 更换或维护的问题。
在本发明实施例中, OS 可以接收第一触发指令确定所述源内存卡和所 述备份内存卡, 并在确定所述备份内存卡满足迁移条件后, 将所述源内存卡 和所述备份内存卡设置为镜像模式,从而可以指示所述源内存卡的内存控制 器根据所述镜像模式, 将所述源内存卡的内存数据写入所述备份内存卡, 在 计算机不下电的情况下, 能够对所述源内存卡的内存数据进行迁移, 实现了 对故障内存卡的在线维护,解决了现有技术中需要对整个计算机下电才能进 行故障内存卡的更换或维护的问题。 并且, 在本发明实施例中, 所述 OS针 对有问题的源内存卡的内存控制器触发的第一触发指令, 进行内存数据的迁 移, 能够保证故障及时解决, 并且只在源内存卡出现故障时才进行内存数据
迁移, 有效节约了系统资源。
进一步, 所述 OS可以获取分次迁移策略, 根据所述分次迁移策略, 指 示所述源内存卡的内存控制器分多次将所述源内存卡的内存数据迁移到所 述备份内存卡, 使得在进行内存数据迁移的过程中, 能够根据需求让所述 OS中止和恢复执行的任务, 使得所述 OS能够及时处理计算机中的业务, 避免在进行大量内存数据迁移时导致的系统业务的长时间中断,保障了该计 算机的正常运行。
此外, 所述 OS能够指示所述源内存卡的内存控制器确定所述源内存卡 中的非错误数据, 并指示所述源内存卡的内存控制器将所述非错误数据迁移 到所述备份内存卡,避免将所述源内存卡中的错误数据迁移到所述备份内存 卡而可能导致的计算机重启。
在本发明实施例中, 所述 OS在进行内存数据迁移之前, 可以确定所述 备份内存卡是否满足迁移条件, 如果满足迁移条件, 才对所述源内存卡进行 内存数据的迁移, 保证了内存数据迁移的顺利进行, 避免由于所述备份内存 卡内存容量不够等问题而导致的数据迁移失败。 具体实施例二
结合图 1所示的计算机,本发明实施例提供了一种内存数据的迁移方法, 如图 4所示, 用于迁移计算机中内存数据, 例如能够将计算机的源内存卡的 内存数据迁移到备份内存卡, 所述源内存卡可以是内存卡 101-A, 所述备份 内存卡可以是内存卡 101-C , 所述内存卡 101-C可以是计算机开机之前已经 插入硬件插槽的内存卡, 也可以是临时新增的内存卡, 在进行内存数据迁移 之前, 所述内存卡 101-C的标识被配置在 ACPI列表中并在执行迁移之前执 行完毕初始化过程即可, 本发明实施例的内存数据的迁移方法可以包括: S401 : OS获取并记录指定的备份内存卡的标识。
在 OS下, 可以配置每一个内存卡所插入的槽位的槽位编号或者所述槽
位相关的号码, 则所述备份单元的标识可以是所述备份内存卡所插入的槽位 的槽位编号或者所述槽位相关的号码, 所述备份内存卡可以是在计算机开机 启动前就已经插入槽位中, 也可以是在计算机开机启动后再插入到槽位中 的。
在所述计算机开机启动后, 用户可以向所述 OS提供指定的备份内存卡 的标识, 所述 OS可以获取并记录指定的备份内存卡的标识, 以使得 OS后 续在确定执行内存数据的迁移时, 可以获取所述备份内存卡的信息, 所述备 份内存卡的标识可以记录在 OS中, 也可以记录在 ACPI列表或者其他存储 单元中, 本发明实施例在此不作限定。
本步骤为可以步骤, 用户还可以将所述备份内存卡的标识提供给所述
BIOS, 所述 OS在进行内存数据迁移前获取所述 BIOS记录的所述备份内存 卡的标识, 确定所示备份内存卡即可, 本发明实施例在此不作限定。
进一步, 在本发明实施例中, 所述备份内存卡作为待迁移数据的目标设 备, 是对所述 OS不可见的内存卡, 需要对所述备份内存卡进行特殊的初始 化, 来保证所述备份内存卡准备就绪, 但避免分配系统地址, 使得所述备份 内存卡对所述 OS不可见。 当所述指定的备份内存卡是在计算机开机启动后 再插入到槽位中的, 则可以在所述备份内存卡插入槽位时, 通过所述备份内 存卡上的触发按鈕,触发 BIOS对所述备份内存卡进行特殊的初始化, 当然, 也可以在后续需要使用该备份内存卡的时候再对所述备份内存卡进行初始 化。 当所述指定的备份内存卡是在计算机开机启动前就已经插入槽位中, 则 在计算机开机启动时, 计算机运行 BIOS, 用户还需要通过 BIOS 的起始菜 单, 配置所述备份内存卡的标识, 使得 BIOS在确定所述备份内存卡已经硬 件存在时, 对所述备份内存卡进行特殊的初始化。
其中,对所述备份内存卡进行特殊的初始化是指对所述备份内存卡进行 配置, 使得所述备份内存卡准备就绪, 可以正常使用, 例如, 对所述备份内
置所述备份内存卡与计算机中的处理器之间的通信连接,检测所述备份内存 卡是否能够进行正常的读写操作等, 需要注意的是, 在对所述备份内存卡进 行初始化时, 避免为所述备份内存卡分配系统地址, 从而所述 OS无法获取 所述备份内存卡的系统地址, 不能对所述备份内存卡进行任何读写操作, 即 所述备份内存卡虽然已经准备就绪, 但对所述 OS不可见, 此时所述 OS不 能使用所述备份内存卡。
在本发明实施例中,对所述备份内存卡进行特殊的初始化即指上述初始 化过程。
S402: 所述 OS获取并记录指定的源内存卡的标识。
在所述计算机开机启动后, 当用户发现某个内存卡性能不稳定或是工作 时间太长时或者其他需要更换的情况, 可以指定该内存卡为待迁移数据的内 存卡, 即源内存卡, 并将所述源内存卡的标识提供给所述 OS , 所述 OS可 信息, 所述备份内存卡的标识可以记录在 OS中, 也可以记录在 ACPI列表 或者其他存储单元中, 本发明实施例在此不作限定。
S403: 所述 OS接收根据用户的指示生成第一触发指令, 根据所述第一 触发指令中止当前正在执行的任务, 以启动内存数据的迁移。
当用户需要进行内存数据迁移时, 可以向 OS发送内存数据的迁移的启 动指令, 所述 OS根据所述启动指令生成所述第一触发指令, 并根据所述第 一触发指令中止当前正在执行的任务, 进入中断处理函数, 执行内存数据的 迁移。
在本发明实施例中, 当用户需要对源内存卡进行内存数据迁移时, 可以 通过多条指令分别指定所述源内存卡和所述备份内存卡的标识, 以及指示所 述 OS执行内存数据的迁移; 还可以是通过一条指令指示所述 OS执行内存 数据的迁移, 所述指令携带所述源内存卡和所述备份内存卡的标识, 本发明 实施例在此不作限定。
S404: 所述 OS获取记录的所述源内存卡和所述备份内存卡的标识。 在所述 OS获取到用户触发的所述第一触发指令之后, 所述 OS进入中 断处理函数, 启动内存数据的迁移, 可以获取自身记录的所述源内存卡和所 述备份内存卡的标识, 即确定所述源内存卡和所述备份内存卡。
当所述备份内存卡有多个时,则所述 OS可以根据所述源内存卡的信息, 从多个所述备份内存卡的标识中挑选一个作为所述备份内存卡的标识, 例如 根据所述源内存卡的内存容量,从所述多个备份内存卡中挑选一个内存容量 大于所述源内存卡的内存容量的内存卡,确定该内存卡的标识作为所述备份 内存卡的标识, 又例如, 可以根据所述源内存卡归属的处理器的信息, 从所 述多个备份内存卡中挑选一个与所述源内存卡不属于同一个处理器控制的 内存卡, 确定该内存卡的标识作为所述备份内存卡的标识。
S405: 所述 OS确定所述备份内存卡是否满足迁移条件。
S406: 若所述备份内存卡满足迁移条件, 则所述 OS指示所述源内存卡 的内存控制器执行内存巡检操作, 以确定所述源内存卡中的非错误数据。
S407: 若所述备份内存卡满足迁移条件, 则所述 OS将所述源内存卡和 所述备份内存卡设置为镜像模式。
S408: 所述 OS指示所述源内存卡的内存控制器进行内存数据的迁移。 S409: 所述 OS将所述源内存卡的系统地址指向的目标内存卡更改为所 述备份内存卡。
S410: 所述 OS对所述源内存卡执行下电操作。
在本发明实施例中, 步骤 S405-S410的具体实施方式与步骤 S307-S312 类似, 在此不再赘述。
在本发明实施例中, OS 可以接收用户第一触发指令确定所述源内存卡 和所述备份内存卡, 并在确定所述备份内存卡满足迁移条件后, 将所述源内 存卡和所述备份内存卡设置为镜像模式,从而可以指示所述源内存卡的内存 控制器根据所述镜像模式, 将所述源内存卡的内存数据写入所述备份内存
卡, 在计算机不下电的情况下, 能够对所述源内存卡的内存数据进行迁移, 实现了对故障内存卡的在线维护,解决了现有技术中需要对整个计算机下电 才能进行故障内存卡的更换或维护的问题。 并且, 在本发明实施例中, 在计 算机运行过程中, 所述 OS可以根据用户触发的第一触发指令, 进行内存数 据的迁移, 能够保证故障及时解决, 并且只在源内存卡出现故障时才进行内 存数据迁移, 有效节约了系统资源。
进一步, 所述 OS可以获取分次迁移策略, 根据所述分次迁移策略, 指 示所述源内存卡的内存控制器分多次将所述源内存卡的内存数据迁移到所 述备份内存卡, 使得在进行内存数据迁移的过程中, 能够根据需求让所述 OS中止和恢复执行的任务, 使得所述 OS能够及时处理计算机中的业务, 避免在进行大量内存数据迁移时导致的系统业务的长时间中断,保障了该计 算机的正常运行。
此外, 所述 OS能够指示所述源内存卡的内存控制器确定所述源内存卡 中的非错误数据, 并指示所述源内存卡的内存控制器将所述非错误数据迁移 到所述备份内存卡,避免将所述源内存卡中的错误数据迁移到所述备份内存 卡而可能导致的计算机重启。
在本发明实施例中, 所述 OS在进行内存数据迁移之前, 可以确定所述 备份内存卡是否满足迁移条件, 如果满足迁移条件, 才对所述源内存卡进行 内存数据的迁移, 保证了内存数据迁移的顺利进行, 避免由于所述备份内存 卡内存容量不够等问题而导致的数据迁移失败。
一种内存数据迁移装置
结合图 1所示的计算机, 本发明实施例提供了一种内存数据迁移装置, 如图 6所示, 用于迁移计算机中内存数据, 例如能够将计算机的源内存卡的 内存数据迁移到备份内存卡, 所述源内存卡可以是内存卡 101-A, 所述备份 内存卡可以是内存卡 101-C , 所述内存卡 101-C可以是计算机开机之前已经 配置在计算机中的内存卡, 也可以是临时新增的内存卡, 在进行内存数据迁
移之前, 所述备份内存卡执行完毕初始化过程即可。 本发明实施例的内存数 据迁移装置可以是 OS , 所述装置可以包括接获取单元 501、 确定单元 502、 镜像单元 503和迁移单元 504。
所述获取单元 501 , 用于获取第一触发指令, 所述第一触发指令用于指 示操作系统执行内存数据的迁移, 在本发明实施例中, 触发所述第一触发指 令比较灵活, 可以包括如下两种方式: 方式一, 所述源内存卡的内存控制器 可以对所述源内存卡的错误数据进行监控, 若所述错误数据超过阈值, 触发 所述第一触发指令, 所述获取单元 501具体用于接收所述源内存卡的内存控 制器触发的所述第一触发指令; 方式二, 所述获取单元 501根据用户发送的 内存数据的迁移的启动指令或者用户预置的内存数据的迁移的启动策略生 成所述第一触发指令。
所述确定单元 502 , 用于在所述获取单元获取所述第一触发指令之后, 中止当前正在执行的任务以启动内存数据的迁移, 确定待迁移内存数据的源 内存卡, 以及为所述源内存卡确定备份内存卡。 所述确定单元 502确定所述 源内存卡的方式也比较灵活, 例如, 当所述第一触发指令由所所述源内存卡 的内存控制器触发, 所述确定单元 502可以通过查询所述源内存卡的内存控 制器的寄存器,确定触发了所述第一触发指令的内存控制器对应的内存卡为 所述源内存卡, 所述源内存卡的内存控制器监控到所述源内存卡的错误数据 的数量超过阈值时, 可以在自身的寄存器中记录所述源内存卡的错误数据的 数量超过阈值; 又例如, 如果所述第一触发指令是根据用户的指示生成, 则 所述获取单元 501还可以接收用户发送的所述源内存卡的标识, 则所述装置 还可以包括记录单元 505 , 用于记录所述源内存卡的标识, 以便后续可以随 时获取所述源内存卡的标识, 所述确定单元 502可以根据所述记录单元 505 记录的所述源内存卡的标识, 确定所述源内存卡。
此外, 确定备份内存卡也可以有两种方式, 用户可以将所述备份内存卡 的标识提供给 OS , 则所述获取单元 501还可以获取用户指定的所述备份内
存卡的标识, 所述记录单元 505还用于记录所述备份内存卡的标识, 所述确 定单元 502可以根据所述记录单元记录的所述备份内存卡的标识,确定所述 备份内存卡; 或者, 用户可以将所述备份内存卡的标识提供给 BIOS, 所述 记录单元 505还可以获取所述 BIOS记录的备份内存卡的标识, 并确定所述 备份内存卡。
所述镜像单元 503 , 用于将所述源内存卡和所述备份内存卡设置为镜像 模式, 例如, 所述镜像单元 503可以在所述源内存卡的内存控制器中配置所 述备份内存卡的标识,在所述备份内存卡的内存控制器中配置所述源内存卡 的标识, 实现将所述源内存单与所述备份内存卡设置为镜像模式, 在设置了 所述镜像模式之后, 所述源内存卡的内存控制能够根据所述备份内存卡的标 识, 将所述源内存卡的内存数据写入所述备份内存卡。
所述迁移单元 504, 用于指示所述源内存卡的内存控制器进行内存数据 的迁移, 以使得所述源内存卡的内存控制器利用所述镜像单元 503设置的镜 像模式, 将所述源内存卡的内存数据写入到所述备份内存卡, 具体地, 所述 迁移单元 504可以向所述源内存卡的内存控制器发送数据读指令, 所述数据 读指令用于指示所述源内存卡的内存控制器读取所述源内存卡的内存数据, 以及向所述源内存卡的内存控制器发送数据写指令, 所述数据写指令用于指 示所述源内存卡的内存控制器将所述读取的数据写回所述源内存卡, 以使得 所述源内存卡的内存控制器根据所述镜像模式,将所述读取的数据写入所述 备份内存卡, 实现将所述源内存卡的内存数据迁移到所述备份内存卡。
进一步, 所述迁移单元 504还用于获取分次迁移策略, 根据所述分次迁 移策略指示所述源内存卡的内存控制器分多次进行内存数据的迁移,使得所 述计算机在进行内存数据迁移的过程中, 能够根据需求中止和恢复执行的任 务, 及时处理系统业务, 避免在进行大量内存数据迁移时导致的系统业务长 时间中断, 保证了系统的正常运行。
具体地, 所述分次迁移策略可以包括每次迁移的数据量或每次迁移的时
长, 所述迁移单元 504具体用于循环执行如下操作 a ) -d ) , 直至将所述源 内存卡的内存数据全部迁移到所述备份内存卡, 所述操作 a ) -d ) 包括: a )根据所述每次迁移指定的数据量确定当次迁移的数据量, 指示所述 源内存卡的内存控制器 102-A将所述当次迁移的数据量迁移到所述备份内 迁移的时长,指示所述源内存卡的内存控制器 102-A在所述当次迁移的时长 内进行内存数据的迁移, 或者根据处理器的运行状态, 指示所述源内存卡的 内存控制器 102-A在处理器的运行状态为空闲的时间段内进行内存数据的 迁移, 其中所述处理器的运行状态为空闲状态可以是处理器的占用率小于设 定阈值; ;
b )在确定所述源内存卡的内存控制器 102-A完成所述当次迁移之后, 中止执行内存数据的迁移;
c )接收第二触发指令,所述第二触发指令用于指示所述 OS继续进行内 存数据的迁移;
d )返回执行步骤 a ) 。
其中, 所述第二触发指令可以通过预置的第二触发指令的触发条件触 发, 则所述分次迁移策略还可以包括所述第二触发指令的触发条件, 所述第 二触发指令的触发条件可以包括每次迁移的间隔时长或处理器的运行状态, 所述迁移单元 504还用于根据所述每次迁移的间隔时长, 配置内存数据迁移 定时器, 以使得所述内存数据迁移定时器根据所述每次迁移的间隔时长触发 所述第二触发指令; 或者, 根据所述处理器的运行状态, 配置内存数据迁移 触发模块, 以使得所述内存数据迁移触发模块根据所述处理器的运行状态, 触发所述第二触发指令。
进一步, 所述装置还可以包括:
检错单元 506, 用于指示所述源内存卡的内存控制器确定所述源内存卡 中的非错误数据; 则所述迁移单元 504具体用于根据所述源内存卡的内存控
制器确定的所述非错误数据的信息,指示所述源内存卡的内存控制器对所述 非错误数据进行迁移。
进一步, 所述迁移单元 504还用于在确定所述源内存卡的内存控制器完 成所述源内存卡的内存数据迁移之后, 建立所述源内存卡的系统地址与所述 备份内存卡的映射关系,将所述源内存卡的系统地址指向的目标内存卡更改 为所述备份内存卡, 使得所述备份内存卡可以替代所述源内存卡, 接管所述 OS对所述源内存卡的所有读写操作。
在本发明实施例中, 所述获取单元 501可以接收第一触发指令, 所述确 定单元 502可以在所述获取单元 501接收所述第一触发指令之后, 中止当前 正在执行的任务以启动内存数据的迁移, 确定所述源内存卡和所述备份内存 卡, 所述镜像单元 506可以将所述源内存卡和所述备份内存卡设置为镜像模 式,从而所述迁移单元 504可以指示所述源内存卡的内存控制器根据所述镜 像模式, 将所述源内存卡的内存数据写入所述备份内存卡, 实现了在计算机 正常运行的情况下, 将所述源内存卡的内存数据的迁移, 解决了现有技术中 无法进行内存数据迁移的问题, 从而能够进行故障内存的在线维护, 避免现 有技术中对整个计算机下电来进行故障内存的更换或维护。 并且, 在本发明 实施例中,所述装置针对有问题的源内存卡的内存控制器触发的第一触发指 令, 进行内存数据的迁移, 能够保证故障及时解决, 并且只在源内存卡出现 故障时才进行内存数据迁移, 有效节约了系统资源。
进一步, 所述迁移单元 504还可以获取分次迁移策略, 根据所述分次迁 移策略,指示所述源内存卡的内存控制器分多次将所述源内存卡的内存数据 迁移到所述备份内存卡, 使得在进行内存数据迁移的过程中, 能够根据需求 中止和恢复执行的任务,避免在进行大量内存数据迁移时导致的计算机业务 的长时间中断, 保障了该计算机的正常运行。
此外, 所述检错单元 506可以指示所述源内存卡的内存控制器确定所述 源内存卡中的非错误数据,使得所述迁移单元可以指示所述源内存卡的内存
控制器将所述非错误数据迁移到所述备份内存卡,避免将所述源内存卡中的 错误数据迁移到所述备份内存卡而可能导致的计算机重启。
如图 6, 为本发明实施例提供的内存数据迁移装置的结构组成示意图。 本发明实施例提供的内存数据迁移装置可包括:
处理器 601、 存储器 602、 系统总线 604和通信接口 605。 处理器 601、 存 储器 602和通信接口 605之间通过系统总线 604连接并完成相互间的通信。
处理器 601可能为单核或多核中央处理单元, 或者为特定集成电路, 或 者为被配置成实施本发明实施例的一个或多个集成电路。
存储器 602 可以为高速 RAM 存储器, 也可以为非易失性存储器 ( non-volatile memory ) , 例如至少一个磁盘存 4诸器。
存储器 602用于计算机执行指令 603。 具体的, 计算机执行指令 603中 可以包括程序代码。
当所述内存数据迁移装置运行时,处理器 601运行计算机执行指令 603 , 可以执行图 2-图 4任意之一所述的方法流程。
本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可能 实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本发明 的各方面、 或各个方面的可能实现方式可以采用完全硬件实施例、 完全软件 实施例 (包括固件、驻留软件等等),或者组合软件和硬件方面的实施例的形 式, 在这里都统称为"电路"、 "模块 "或者 "系统"。 此外, 本发明的各方面、 或各个方面的可能实现方式可以采用计算机程序产品的形式,计算机程序产 品是指存储在计算机可读介质中的计算机可读程序代码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或半导体 系统、 设备或者装置, 或者前述的任意适当组合, 如随机存取存储器 (RAM), 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM 或者快闪 存储器)、 光纤、 便携式只读存储器 (CD-ROM)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定的功 能动作;生成实施在框图的每一块、或各块的组合中规定的功能动作的装置。
计算机可读程序代码可以完全在用户的计算机上执行、部分在用户的计 算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远程计 算机上, 或者完全在远程计算机或者服务器上执行。 也应该注意, 在某些替 代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可能不按图 中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两个步骤、 或 两个块实际上可能被大致同时执行,或者这些块有时候可能被以相反顺序执 行。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。
Claims
1、 一种计算机, 包括:
处理器;
主存储器, 用于加载所述计算机的操作系统的指令, 所述主存储器包括 一个或多个内存卡;
内存控制器, 每个内存卡配置有对应的内存控制器; 其特征在于, 所述操作系统用于获取第一触发指令, 根据所述第一触发指令中止当前 正在执行的任务, 确定待迁移内存数据的源内存卡, 为所述源内存卡确定备 份内存卡, 指示所述源内存卡的内存控制器进行内存数据的迁移;
所述源内存卡的内存控制器用于才艮据所述操作系统的指示,将所述源内 存卡的内存数据迁移到所述备份内存卡。
2、 根据权利要求 1 所述的计算机, 其特征在于, 所述操作系统具体用 于将所述源内存卡和所述备份内存卡设置为镜像模式, 向所述源内存卡的内 存控制器发送数据读指令, 所述数据读指令用于指示所述源内存卡的内存控 制器读取所述源内存卡的内存数据, 向所述源内存卡的内存控制器发送数据 写指令, 所述数据写指令用于指示所述源内存卡的内存控制器将所述读取的 数据写回所述源内存卡;
所述源内存卡的内存控制器具体用于根据所述操作系统的数据读指令 读取所述源内存卡的内存数据, 接收所述操作系统发送的所述数据写指令, 根据所述源内存卡和所述备份内存卡之间的镜像模式,将所读取的所述源内 存卡的内存数据发送给所述备份内存卡的内存控制器;
所述备份内存卡的内存控制器用于将接收到的所述源内存卡的内存数 据写入到所述备份内存卡。
3、 根据权利要求 1或 2所述的计算机, 其特征在于, 所述操作系统具 体用于获取分次迁移策略, 根据所述分次迁移策略, 指示所述源内存卡的内 存控制器分多次进行内存数据的迁移。
4、 根据权利要求 3所述的计算机, 其特征在于, 所述操作系统具体用 于根据所述分次迁移策略循环执行如下操作 a ) -d ) , 直至将所述源内存卡 的内存数据全部迁移到所述备份内存卡, 所述操作 a ) -d ) 包括:
a )确定当次迁移的数据量, 指示所述源内存卡的内存控制器将所述当 次迁移的数据量迁移到所述备份内存卡, 或者, 确定当次迁移的时长, 指示 所述源内存卡的内存控制器在所述当次迁移的时长内进行内存数据的迁移; b )在确定所述源内存卡的内存控制器完成所述当次迁移之后, 中止执 行内存数据的迁移;
c )接收第二触发指令, 所述第二触发指令用于指示所述操作系统继续 进行内存数据的迁移;
d )返回执行步骤 a ) , 直至所述源内存卡的内存数据全部迁移到所述备 份内存卡。
5、 根据权利要求 4所述的计算机, 所述分次迁移策略包括每次迁移指 定的数据量或每次迁移的时长;
所述操作系统具体用于根据所述每次迁移指定的数据量确定所述当次 迁移的数据量, 或根据每次迁移的时长确定所述当次迁移的时长。
6、 根据权利要求 5所述的计算机, 其特征在于, 所述分次迁移策略还 包括每次迁移的间隔时长或处理器的运行状态, 所述第二触发指令根据所述 每次迁移的间隔时长或处理器的运行状态被触发。
7、 根据权利要求 1-6任一项所述的计算机, 其特征在于, 所述源内存 卡的内存控制器还用于对所述源内存卡的错误数据进行监控, 若所述错误数 据的数量超过阈值, 所述源内存卡的内存控制器触发所述第一触发指令; 所述操作系统具体用于接收所述源内存卡的内存控制器触发的所述第 一触发指令。
8、 根据权利要求 7所述的计算机, 其特征在于, 所述源内存卡的内存 控制器还用于在自身的寄存器中记录所述源内存卡的错误数据的数量超过
阈值;
则, 所述操作系统具体用于查询所述源内存卡的内存控制器的寄存器, 确定所述源内存卡。
9、 根据权利要求 1-6任一项所述的计算机, 其特征在于, 所述操作系 统还用于配置内存数据的迁移的启动策略,或者接收用户发送的内存数据的 迁移的启动指令, 所述操作系统根据所述启动策略或启动指令生成所述第一 触发指令。
10、 根据权利要求 9所述的计算机, 其特征在于, 所述启动策略或者启 动指令还包括所述源内存卡的标识;
所述操作系统还用于将所述源内存卡的标识记录到存储模块; 所述操作系统具体用于查询所述存储模块, 确定所述源内存卡的标识。
11、 根据权利要求 7-10任一项所述的计算机, 其特征在于, 所述操作 系统具体用于根据预先配置的所述备份内存卡的标识, 确定所述备份内存 卡。
12、 根据权利要求 1-11 任一项所述的计算机, 其特征在于, 所述操作 系统还用于确定所述备份内存卡是否满足迁移条件, 如果满足所述迁移条 件, 执行所述指示所述源内存卡的内存控制器进行内存数据的迁移的操作; 所述迁移条件包括但不限于以下条件之一或其任意组合: 所述备份内存 卡完成初始化、 所述备份板的内存容量大于或等于所述源内存卡的内存容 量。
13、 根据权利要求 12所述的计算机, 其特征在于, 所述计算机还包括 基本输入输出系统;
所述基本输入输出系统用于根据所述操作系统的指示,对所述备份内存 卡进行初始化;
其中, 所述初始化避免为所述备份内存卡分配系统地址。
14、 根据权利要求 1-13 任一项所述的计算机, 其特征在于, 所述操作
系统还用于指示所述源内存卡的内存控制器检测所述源内存卡中的非错误 数据;
所述源内存卡的内存控制器还用于根据所述操作系统的检测指示,确定 所述源内存卡中的非错误数据, 并根据检测结果打上检测标记;
所述操作系统具体用于指示所述源内存卡的内存控制器根据所述检测 标记对所述非错误数据进行迁移。
15、 根据权利要求 1-14任一项所述的计算机, 其特征在于, 所述操作 系统还用于在确定所述源内存卡的内存数据全部迁移到所述备份内存卡之 后, 将所述源内存卡的系统地址指向的目标内存卡更改为所述备份内存卡。
16、 一种内存数据的迁移方法, 其特征在于, 用于迁移计算机中内存数 据, 所述方法包括:
所述计算机的操作系统获取第一触发指令, 所述第一触发指令用于指示 所述操作系统执行内存数据的迁移;
所述操作系统中止当前正在执行的任务以启动内存数据的迁移; 所述操作系统确定待迁移内存数据的源内存卡;
所述操作系统为所述源内存卡确定备份内存卡;
所述操作系统指示所述源内存卡的内存控制器进行内存数据的迁移, 以 使得所述源内存卡的内存控制器根据所述操作系统的指示将所述源内存卡 的内存数据迁移到所述备份内存卡。
17、 根据权利要求 16所述的方法, 其特征在于, 所述方法还包括: 所述操作系统将所述源内存卡和所述备份内存卡设置为镜像模式; 所述操作系统指示所述源内存卡的内存控制器进行内存数据的迁移, 以 使得所述源内存卡的内存控制器根据所述处理器的指示读取所述源内存卡 的内存数据, 将所读取的所述源内存卡的内存数据写入到所述备份内存卡, 包括:
所述操作系统指示所述源内存卡的内存控制器进行内存数据的迁移, 以
使得所述源内存卡的内存控制器根据所述操作系统的指示读取所述源内存 卡的内存数据, 将所读取的所述源内存卡的内存数据写入到所述备份内存 卡, 包括:
所述操作系统向所述源内存卡的内存控制器发送数据读指令, 所述数据 读指令用于指示所述源内存卡的内存控制器读取所述源内存卡的内存数据; 所述源内存卡的内存控制器根据所述操作系统的数据读指令读取所述 源内存卡的内存数据;
所述操作系统向所述源内存卡的内存控制器发送数据写指令, 所述数据 写指令用于指示所述源内存卡的内存控制器将所述读取的数据写回所述源 内存卡;
所述源内存卡的内存控制器接收所述操作系统发送的所述数据写指令, 根据所述源内存卡和所述备份内存卡之间的镜像模式,将所读取的所述源内 存卡的内存数据发送给所述备份内存卡的内存控制器, 以使得所述备份内存 卡的内存控制器将接收到的所述源内存卡的内存数据写入到所述备份内存 卡。
18、 根据权利要求 16或 17所述的方法, 其特征在于, 在所述操作系统 指示所述源内存卡的内存控制器进行内存数据的迁移之前, 还包括:
所述操作系统获取分次迁移策略;
贝 所述操作系统根据所述分次迁移策略, 指示所述源内存卡的内存控 制器分多次进行内存数据的迁移。
19、 根据权利要求 18所述的方法, 其特征在于,
所述操作系统根据所述分次迁移策略指示所述源内存卡的内存控制器 分多次进行内存数据的迁移, 包括:
a )所述操作系统确定当次迁移的数据量, 指示所述源内存卡的内存控 制器将所述当次迁移的数据量迁移到所述备份内存卡, 或者, 所述操作系统 确定当次迁移的时长,指示所述源内存卡的内存控制器在所述当次迁移的时
长内进行内存数据的迁移;
b )在确定所述源内存卡的内存控制器完成所述当次迁移之后, 所述操 作系统中止执行内存数据的迁移;
c )所述操作系统接收第二触发指令, 所述第二触发指令用于指示所述 操作系统继续进行内存数据的迁移;
d )所述操作系统返回执行步骤 a ) , 直至所述源内存卡的内存数据全部 迁移到所述备份内存卡。
20、 根据权利要求 19所述的方法, 所述分次迁移策略包括每次迁移指 定的数据量或每次迁移的时长;
则所述操作系统根据所述每次迁移指定的数据量确定所述当次迁移的 数据量, 或根据每次迁移的时长确定所述当次迁移的时长。
21、 根据权利要求 20所述的方法, 其特征在于, 所述分次迁移策略还 包括每次迁移的间隔时长或处理器的运行状态, 所述第二触发指令根据所述 每次迁移的间隔时长或处理器的运行状态被触发。
22、 根据权利要求 16-21任一项所述的方法, 其特征在于, 还包括: 所述源内存卡的内存控制器对所述源内存卡的错误数据进行监控, 若所 述错误数据的数量超过阈值, 所述源内存卡的内存控制器触发所述第一触发 指令;
则, 所述操作系统接收所述源内存卡的内存控制器触发的所述第一触发 指令。
23、 根据权利要求 22所述的方法, 其特征在于, 还包括:
所述源内存卡的内存控制器在自身的寄存器中记录所述源内存卡的错 误数据的数量超过阈值;
所述操作系统确定所述源内存卡包括:
所述操作系统查询所述源内存卡的内存控制器的寄存器,确定所述源内 存卡。
24、 根据权利要求 16-21任一项所述的方法, 其特征在于, 所述操作系 统获取第一触发指令包括:
所述操作系统根据预先配置内存数据的迁移的启动策略或用户发送的 内存数据的迁移的启动指令, 生成所述第一触发指令。
25、 根据权利要求 24所述的方法, 其特征在于, 还包括:
所述操作系统获取并记录所述所述启动策略或者启动指令中包含的所 述源内存卡的标识;
所述操作系统确定源内存卡包括:
所述操作系统根据记录的所述源内存卡的标识, 确定所述源内存卡。
26、 根据权利要求 22-25任一项所述的方法, 其特征在于, 还包括: 记录预先配置的所述备份内存卡的标识;
所述操作系统确定备份内存卡包括:
所述操作系统根据记录的所述备份内存卡的标识, 确定所述备份内存 卡。
27、 根据权利要求 16-26任一项所述的方法, 其特征在于, 所述操作系 统指示所述源内存卡的内存控制器进行内存数据的迁移之前, 还包括: 所述操作系统确定所述备份内存卡是否满足迁移条件,如果满足所述迁 移条件,执行所述指示所述源内存卡的内存控制器进行内存数据的迁移的步 骤;
所述迁移条件包括但不限于以下条件之一或其任意组合: 所述备份内存 卡完成初始化、 所述备份板的内存容量大于或等于所述源内存卡的内存容 量。
28、 根据权利要求 27所述的方法, 其特征在于, 若所述备份内存卡未 完成初始化, 所述方法还包括:
所述操作系统指示基本输入输出系统对所述备份内存卡进行初始化, 其 中, 所述初始化避免为所述备份内存卡分配系统地址。
29、 根据权利要求 16-28任一项所述的方法, 其特征在于, 在所述操作 系统指示所述源内存卡的内存控制器进行内存数据的迁移之前, 还包括: 所述操作系统指示所述源内存卡的内存控制器检测所述源内存卡中的 非错误数据并进行标记;
则, 所述操作系统指示所述源内存卡的内存控制器根据检测标记对所述 非错误数据进行迁移。
30、 根据权利要求 16-29任一项所述的方法, 其特征在于, 在所述源内 存卡的内存数据全部迁移到所述备份内存卡之后, 还包括:
所述操作系统将所述源内存卡的系统地址指向的目标内存卡更改为所 述备份内存卡。
31、 一种内存数据的迁移装置, 其特征在于, 用于迁移计算机中内存数 据, 所述装置包括:
获取单元, 用于获取第一触发指令, 所述第一触发指令用于指示操作系 统执行内存数据的迁移;
确定单元, 用于在所述获取单元获取所述第一触发指令之后, 中止当次 正在执行的任务以启动内存数据的迁移, 确定待迁移内存数据的源内存卡, 以及为所述源内存卡确定备份内存卡;
迁移单元, 用于指示所述源内存卡的内存控制器进行内存数据的迁移, 以使得所述源内存卡的内存控制器根据所述操作系统的指示将所述源内存 卡的内存数据迁移到所述备份内存卡。
32、 根据权利要求 31所述的装置, 其特征在于, 还包括:
镜像单元, 用于将所述源内存卡和所述备份内存卡设置为镜像模式; 所述数据读指令用于指示所述源内存卡的内存控制器读取所述源内存卡的 内存数据, 向所述源内存卡的内存控制器发送数据写指令, 所述数据写指令 用于指示所述源内存卡的内存控制器将所述读取的数据写回所述源内存卡,
以使得所述源内存卡的内存控制器根据所述源内存卡和所述备份内存卡之 间的镜像模式,将所读取的所述源内存卡的内存数据写入到所述备份内存卡 源内存卡的内存数据。
33、 根据权利要求 31或 32所述的装置, 其特征在于, 在所述迁移单元 具体用于获取分次迁移策略, 根据所述分次迁移策略, 指示所述源内存卡的 内存控制器分多次进行内存数据的迁移。
34、 根据权利要求 33所述的装置, 其特征在于, 所述迁移单元具体用 于循环执行如下操作 a ) -d ) , 直至将所述源内存卡的内存数据全部迁移到 所述备份内存卡, 所述操作 a ) -d ) 包括:
a )确定当次迁移的数据量, 指示所述源内存卡的内存控制器将所述当 次迁移的数据量迁移到所述备份内存卡, 或者, 确定当次迁移的时长, 指示 所述源内存卡的内存控制器在所述当次迁移的时长内进行内存数据的迁移; b )在确定所述源内存卡的内存控制器完成所述当次迁移之后, 中止执 行内存数据的迁移;
c )接收第二触发指令, 所述第二触发指令用于指示所述操作系统继续 进行内存数据的迁移;
d )返回执行步骤 a ) , 直至所述源内存卡的内存数据全部迁移到所述备 份内存卡。
35、 根据权利要求 31-34任一项所述的装置, 其特征在于, 所述迁移单 元还用于确定所述源内存卡的内存控制器完成所述源内存卡的内存数据迁 移之后,将所述源内存卡的系统地址指向的目标内存卡更改为所述备份内存 卡。
36、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求 16-30中任一所述的内存数据的迁移方法。
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/087645 WO2015074232A1 (zh) | 2013-11-22 | 2013-11-22 | 一种内存数据的迁移方法、计算机和装置 |
CN201380002307.9A CN103842968B (zh) | 2013-11-22 | 2013-11-22 | 一种内存数据的迁移方法、计算机和装置 |
EP17162958.7A EP3282362B1 (en) | 2013-11-22 | 2013-11-22 | Memory data migration method and apparatus, and computer |
EP13897815.0A EP2966571B1 (en) | 2013-11-22 | 2013-11-22 | Method for migrating memory data and computer therefor |
US15/058,100 US9632888B2 (en) | 2013-11-22 | 2016-03-01 | Memory data migration method and apparatus, and computer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/087645 WO2015074232A1 (zh) | 2013-11-22 | 2013-11-22 | 一种内存数据的迁移方法、计算机和装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/058,100 Continuation US9632888B2 (en) | 2013-11-22 | 2016-03-01 | Memory data migration method and apparatus, and computer |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015074232A1 true WO2015074232A1 (zh) | 2015-05-28 |
Family
ID=50804807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/087645 WO2015074232A1 (zh) | 2013-11-22 | 2013-11-22 | 一种内存数据的迁移方法、计算机和装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US9632888B2 (zh) |
EP (2) | EP3282362B1 (zh) |
CN (1) | CN103842968B (zh) |
WO (1) | WO2015074232A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111557688A (zh) * | 2020-04-03 | 2020-08-21 | 广州市第一人民医院(广州消化疾病中心、广州医科大学附属市一人民医院、华南理工大学附属第二医院) | 一种超声诊断仪、超声诊断仪的数据记录方法及装置 |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ES2727818T3 (es) * | 2013-11-22 | 2019-10-18 | Huawei Tech Co Ltd | Método, ordenador y aparato para migrar datos de memoria |
JP6517549B2 (ja) * | 2015-03-13 | 2019-05-22 | 東芝メモリ株式会社 | メモリコントローラ、記憶装置、データ転送システム、データ転送方法、及びデータ転送プログラム |
CN106201905B (zh) * | 2016-07-11 | 2019-09-24 | 浪潮(北京)电子信息产业有限公司 | 一种内存编址方法 |
US10430302B2 (en) * | 2017-04-12 | 2019-10-01 | Qualcomm Incorporated | Data retention with data migration |
US10452501B2 (en) * | 2017-06-15 | 2019-10-22 | International Business Machines Corporation | Copying data from mirrored storage to auxiliary storage arrays co-located with primary storage arrays |
US10810141B2 (en) * | 2017-09-29 | 2020-10-20 | Intel Corporation | Memory control management of a processor |
JP6912421B2 (ja) * | 2018-06-01 | 2021-08-04 | ファナック株式会社 | 制御装置 |
EP3648430B1 (de) * | 2018-11-05 | 2021-06-02 | Wincor Nixdorf International GmbH | Hardware-sicherheitsmodul |
CN110008090B (zh) * | 2019-04-15 | 2020-10-02 | 苏州浪潮智能科技有限公司 | 一种监控内存错误的方法、装置和计算机可读存储介质 |
CN111966399B (zh) * | 2019-05-20 | 2024-06-07 | 上海寒武纪信息科技有限公司 | 指令处理方法、装置及相关产品 |
CN110245127A (zh) * | 2019-06-12 | 2019-09-17 | 成都九洲电子信息系统股份有限公司 | 一种基于流程控制的数据迁移方法 |
CN110333901A (zh) * | 2019-07-09 | 2019-10-15 | 环胜电子(深圳)有限公司 | 存储装置的名称更新方法 |
CN112486313B (zh) * | 2019-09-11 | 2024-03-26 | 华为技术有限公司 | 终端的节电方法和装置 |
JP2023003988A (ja) * | 2021-06-25 | 2023-01-17 | 富士通株式会社 | 情報処理装置および運用監視プログラム |
CN114780473A (zh) * | 2022-05-18 | 2022-07-22 | 长鑫存储技术有限公司 | 内存条热插拔方法及装置、内存条 |
EP4300319A4 (en) | 2022-05-18 | 2024-02-28 | Changxin Memory Technologies, Inc. | HOT PLUGGING METHOD AND APPARATUS FOR MEMORY MODULE, AND MEMORY MODULE |
US20240211416A1 (en) * | 2022-12-27 | 2024-06-27 | Advanced Micro Devices, Inc. | Physical Adjustment to System Memory with Chipset Attached Memory |
CN116909495B (zh) * | 2023-09-14 | 2023-12-15 | 合肥康芯威存储技术有限公司 | 一种存储装置及其控制方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6453408B1 (en) * | 1999-09-30 | 2002-09-17 | Silicon Graphics, Inc. | System and method for memory page migration in a multi-processor computer |
US20090222640A1 (en) * | 2008-02-28 | 2009-09-03 | Bauman Ellen M | Memory Migration in a Logically Partitioned Computer System |
CN102326149A (zh) * | 2011-07-28 | 2012-01-18 | 华为技术有限公司 | 内存迁移的实现方法和装置 |
CN102662723A (zh) * | 2012-02-28 | 2012-09-12 | 北京邮电大学 | 一种基于停机时间阈值的虚拟机内存迁移方法 |
CN103198028A (zh) * | 2013-03-18 | 2013-07-10 | 华为技术有限公司 | 一种内存数据迁移方法、装置及系统 |
Family Cites Families (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5212784A (en) * | 1990-10-22 | 1993-05-18 | Delphi Data, A Division Of Sparks Industries, Inc. | Automated concurrent data backup system |
JP2923702B2 (ja) * | 1991-04-01 | 1999-07-26 | 株式会社日立製作所 | 記憶装置及びそのデータ修復方法 |
WO1996025801A1 (en) | 1995-02-17 | 1996-08-22 | Trustus Pty. Ltd. | Method for partitioning a block of data into subblocks and for storing and communicating such subblocks |
US5680539A (en) * | 1995-07-11 | 1997-10-21 | Dell Usa, L.P. | Disk array system which performs data reconstruction with dynamic load balancing and user-specified disk array bandwidth for reconstruction operation to maintain predictable degradation |
US6487623B1 (en) * | 1999-04-30 | 2002-11-26 | Compaq Information Technologies Group, L.P. | Replacement, upgrade and/or addition of hot-pluggable components in a computer system |
US6834386B1 (en) * | 1999-07-16 | 2004-12-21 | Microsoft Corporation | Method and system for regulating background tasks using performance measurements |
US6816986B1 (en) * | 1999-12-28 | 2004-11-09 | Intel Corporation | Remapping memory devices during operation |
US6766469B2 (en) * | 2000-01-25 | 2004-07-20 | Hewlett-Packard Development Company, L.P. | Hot-replace of memory |
US6854070B2 (en) * | 2000-01-25 | 2005-02-08 | Hewlett-Packard Development Company, L.P. | Hot-upgrade/hot-add memory |
US7028215B2 (en) * | 2002-05-03 | 2006-04-11 | Hewlett-Packard Development Company, L.P. | Hot mirroring in a computer system with redundant memory subsystems |
US7139942B2 (en) * | 2003-07-21 | 2006-11-21 | Sun Microsystems, Inc. | Method and apparatus for memory redundancy and recovery from uncorrectable errors |
US7917713B2 (en) * | 2006-12-20 | 2011-03-29 | International Business Machines Corporation | Optimized data migration with a support processor |
US8037266B2 (en) * | 2007-01-02 | 2011-10-11 | Sandisk Il Ltd. | Apparatus and method for archiving digital content |
US7552152B2 (en) * | 2007-03-05 | 2009-06-23 | International Business Machines Corporation | Risk-modulated proactive data migration for maximizing utility in storage systems |
US20090150721A1 (en) * | 2007-12-10 | 2009-06-11 | International Business Machines Corporation | Utilizing A Potentially Unreliable Memory Module For Memory Mirroring In A Computing System |
US8219851B2 (en) * | 2009-12-29 | 2012-07-10 | Intel Corporation | System RAS protection for UMA style memory |
JP5760614B2 (ja) * | 2011-04-05 | 2015-08-12 | 富士通株式会社 | ライブラリシステム、管理装置、ライブラリ装置、管理方法および管理プログラム |
JP5720483B2 (ja) * | 2011-08-11 | 2015-05-20 | 富士通株式会社 | 移行プログラム、移行装置、および移行方法 |
US9317350B2 (en) * | 2013-09-09 | 2016-04-19 | International Business Machines Corporation | Method and apparatus for faulty memory utilization |
ES2727818T3 (es) * | 2013-11-22 | 2019-10-18 | Huawei Tech Co Ltd | Método, ordenador y aparato para migrar datos de memoria |
-
2013
- 2013-11-22 EP EP17162958.7A patent/EP3282362B1/en active Active
- 2013-11-22 WO PCT/CN2013/087645 patent/WO2015074232A1/zh active Application Filing
- 2013-11-22 EP EP13897815.0A patent/EP2966571B1/en active Active
- 2013-11-22 CN CN201380002307.9A patent/CN103842968B/zh active Active
-
2016
- 2016-03-01 US US15/058,100 patent/US9632888B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6453408B1 (en) * | 1999-09-30 | 2002-09-17 | Silicon Graphics, Inc. | System and method for memory page migration in a multi-processor computer |
US20090222640A1 (en) * | 2008-02-28 | 2009-09-03 | Bauman Ellen M | Memory Migration in a Logically Partitioned Computer System |
CN102326149A (zh) * | 2011-07-28 | 2012-01-18 | 华为技术有限公司 | 内存迁移的实现方法和装置 |
CN102662723A (zh) * | 2012-02-28 | 2012-09-12 | 北京邮电大学 | 一种基于停机时间阈值的虚拟机内存迁移方法 |
CN103198028A (zh) * | 2013-03-18 | 2013-07-10 | 华为技术有限公司 | 一种内存数据迁移方法、装置及系统 |
Non-Patent Citations (1)
Title |
---|
See also references of EP2966571A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111557688A (zh) * | 2020-04-03 | 2020-08-21 | 广州市第一人民医院(广州消化疾病中心、广州医科大学附属市一人民医院、华南理工大学附属第二医院) | 一种超声诊断仪、超声诊断仪的数据记录方法及装置 |
CN111557688B (zh) * | 2020-04-03 | 2023-03-10 | 广州市第一人民医院(广州消化疾病中心、广州医科大学附属市一人民医院、华南理工大学附属第二医院) | 一种超声诊断仪、超声诊断仪的数据记录方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
EP2966571A4 (en) | 2016-06-01 |
EP3282362A1 (en) | 2018-02-14 |
CN103842968B (zh) | 2015-11-25 |
EP2966571B1 (en) | 2017-06-21 |
US9632888B2 (en) | 2017-04-25 |
EP3282362B1 (en) | 2019-03-13 |
CN103842968A (zh) | 2014-06-04 |
US20160179643A1 (en) | 2016-06-23 |
EP2966571A1 (en) | 2016-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015074232A1 (zh) | 一种内存数据的迁移方法、计算机和装置 | |
WO2015074235A1 (zh) | 一种内存数据的迁移方法、计算机和装置 | |
JP6530774B2 (ja) | ハードウェア障害回復システム | |
US10241868B2 (en) | Server control method and server control device | |
TWI724415B (zh) | 多節點儲存系統及其韌體的更新方法 | |
US20150081829A1 (en) | Out-of-band replicating bios setting data across computers | |
JP2008293245A (ja) | フェイルオーバ方法、計算機システム、管理サーバ及び予備サーバの設定方法 | |
JP6111181B2 (ja) | 計算機の制御方法及び計算機 | |
US9524189B2 (en) | Information processing device, information processing method, and computer program product | |
CN105353980B (zh) | 一种内存数据的迁移方法、计算机和装置 | |
TWI461905B (zh) | 可遠端當機復原的運算裝置、用於運算裝置之遠端當機復原之方法及電腦可讀取媒體 | |
CN111103960A (zh) | 一种Nvme SSD及其复位方法和系统 | |
JP7318799B2 (ja) | 情報処理装置、操作制御方法および操作制御プログラム | |
US20140025982A1 (en) | Information processing equipment and control method | |
JP6089543B2 (ja) | 試験方法および処理装置 | |
WO2014045453A1 (ja) | 環境変数保存方法、情報処理装置およびプログラム | |
TW201926073A (zh) | 具有儲存裝置的伺服器及其運作方法 | |
JP2014029739A (ja) | マルチコアプロセッサシステム、制御プログラム、および制御方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13897815 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2013897815 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2013897815 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |