WO2015027703A1 - 数据处理方法及装置 - Google Patents

数据处理方法及装置 Download PDF

Info

Publication number
WO2015027703A1
WO2015027703A1 PCT/CN2014/073933 CN2014073933W WO2015027703A1 WO 2015027703 A1 WO2015027703 A1 WO 2015027703A1 CN 2014073933 W CN2014073933 W CN 2014073933W WO 2015027703 A1 WO2015027703 A1 WO 2015027703A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory module
data
agent device
processor
instruction
Prior art date
Application number
PCT/CN2014/073933
Other languages
English (en)
French (fr)
Inventor
陈奔
刘钢
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to JP2016537090A priority Critical patent/JP6407283B2/ja
Priority to EP14839622.9A priority patent/EP3040866A4/en
Priority to AU2014314984A priority patent/AU2014314984B2/en
Priority to CA2922578A priority patent/CA2922578C/en
Publication of WO2015027703A1 publication Critical patent/WO2015027703A1/zh
Priority to US15/055,926 priority patent/US9785375B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0625Power saving in storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/068Hybrid storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0688Non-volatile semiconductor memory arrays
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error 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

Definitions

  • the present invention relates to the field of storage technologies, and in particular, to a data migration method and a server for a memory module in a server.
  • BACKGROUND OF THE INVENTION Memory hot plugging is mainly applied in the server field, which brings higher availability and maintainability to servers.
  • a server involves the hardware layer, the Basic Input Output System (BIOS) layer, and the operating system (OS). (The Virtual Machine Monitor (VMM) can also be included. ))
  • the hardware layer contains at least two memory modules, and their layer relationship diagram is shown in Figure 1.
  • the hardware layer provides resources that are physically available; the BIOS layer configures these physical resources and reports available resources and provides an operation interface; the OS can directly use the resources reported by the BIOS, or can be directly used by the VMM. Resources are virtualized and then distributed to the OS, ie the OS is the end user of those resources.
  • the hardware layer provides physical memory modules and access channels. The BIOS layer initializes the memory, allocates addresses, and reports available addresses to the OS or VMM. The final OS runs programs or stores data in memory. Memory hot swap includes two processes: memory hot add and memory hot remove.
  • the OS needs to migrate the data on the memory address to be hot-removed to another memory address.
  • the OS moves one memory page each time, the control of the page is first obtained. Right, pause the access of other programs before you can start moving, so if the user-mode data to be migrated is frequently accessed by other programs, then the OS takes a certain time each time to gain control of the memory page, and the result takes a long time. Complete data migration for the entire memory module.
  • an embodiment of the present invention provides a data migration method and a server for a memory module in a server, so as to conveniently implement data migration of a memory module in a server.
  • the first aspect provides a data migration method for a memory module in a server, including: when the processor receives a data migration request from a user to the first memory module, the processor searches for the second memory module, and is first The proxy device sends a mirroring relationship establishing instruction, the first memory module is in an operating state, and the second memory module is in an idle state;
  • the processor sends a data migration instruction to the first proxy device
  • the first proxy device receives the data migration instruction, and sends data in the first memory module to the second proxy device;
  • the second proxy device writes data in the first memory module into the second memory module
  • the processor sends a mirror relationship release instruction to the first proxy device, and sets the first memory module and the second memory module to an idle state and an operating state, respectively;
  • the first proxy device receives the mirror relationship release command and releases the mirror relationship with the second proxy device.
  • the receiving, by the first proxy device, the data migration instruction, and sending the data in the first memory module to the second proxy device includes:
  • An agent device receives data in the first memory module written by the processor, and transmits data in the first memory module to the second proxy device.
  • the method before the sending, by the processor, the mirror relationship cancellation instruction to the first proxy device, the method further includes :
  • the second proxy device writes the first data to the first physical address in the second memory module.
  • the first proxy device receives the mirror relationship After the instruction is released, and the mirroring relationship with the second proxy device is released, the method further includes:
  • the processor disconnects power of the first memory module to remove the first memory module.
  • the method further includes:
  • the processor When the processor receives the memory module addition request of the user, the processor supplies power to the added memory module, and initializes the added memory module, and the added memory module enters an idle state.
  • a server including:
  • a processor a first proxy device and a second proxy device connected to the processor, a first memory module connected to the first proxy device, and a second memory module connected to the second proxy device;
  • the processor is configured to: after receiving a data migration request from the user to the first memory module, and the first memory module is in an operating state, and when the second memory module is in an idle state, searching for the second memory module, And sending a mirror relationship establishment instruction to the first proxy device;
  • the first proxy device is configured to receive the mirror relationship establishment instruction, and after receiving the mirror relationship establishment instruction, establish a mirror relationship with the second proxy device;
  • the processor is further configured to send a data migration instruction to the first proxy device after the mirroring relationship is established;
  • the first proxy device is further configured to receive the data migration instruction, and send the data in the first memory module to the second proxy device after receiving the data migration instruction; a proxy device, configured to receive the data sent by the first proxy device, Writing the data into the second memory module;
  • the processor is further configured to send a mirror relationship release instruction to the first proxy device after the data migration is completed, and after the mirroring relationship release command is issued, the first memory module and the The second memory modules are respectively set to an idle state and an operating state;
  • the first proxy device is further configured to release the mirror relationship with the second proxy device after receiving the mirror relationship release command.
  • the first proxy device is further configured to receive the data migration instruction, and after receiving the data migration instruction, send data in the first memory module to the
  • the second agent device includes:
  • the first proxy device is further configured to receive a data read instruction sent by the processor, and after receiving the data read command, read data in the first memory module and the first The data in the memory module is returned to the processor;
  • the first proxy device is further configured to receive data in the first memory module written by the processor, and send data in the first memory module to the second proxy device.
  • the processor is further configured to write to the first physical address of the first proxy device One data
  • the first proxy device is further configured to: after receiving the first data, forwarding the first data to the second proxy device;
  • the second proxy device is further configured to: after receiving the first data forwarded by the second proxy device, writing the first data to the first physical address in the second memory module .
  • the processor is further configured to After the data is migrated and the mirror relationship release command is sent to the first proxy device, the power of the first memory module is disconnected to remove the first memory module.
  • the processor is further configured to: when receiving a memory module addition request of the user, supply power to the added memory module, and initialize the added memory module, where the adding The memory module becomes a free memory module.
  • the processor instructs the proxy device to perform data between the two memory modules by establishing a mirror relationship between the proxy devices of the two memory modules. Migration, thereby completing the data migration from one memory module to another, the entire data migration process does not require the participation of the operating system, the data migration process is short, and the data migration of the memory modules in the server is conveniently implemented.
  • FIG. 1 is a schematic diagram of relationship between layers of a server involved in hot swapping of a memory in the prior art
  • FIG. 2 is a flowchart of an embodiment of a method for data migration of a memory module in a server according to the present invention
  • FIG. 3 is a flowchart of another embodiment of a data migration method of a memory module in a server according to the present invention.
  • FIG. 5 is a flow chart of heat adding of a memory module in the prior art
  • Figure 6a is a schematic structural diagram of a memory module included in the server
  • Figure 6b is a schematic diagram of data migration to a memory module in a server
  • Figure 6c is a schematic diagram of the role transition of the memory module after the memory module in the server completes the data migration
  • Figure 6d is a schematic diagram of replacing a free memory module in the server
  • Figure 6e is a schematic diagram of the replacement of the free memory module in the server
  • Figure 7a is a schematic structural diagram of a proxy device HA and a memory module
  • Figure 7b is a schematic structural diagram of a node controller NC and a memory module
  • FIG. 8a is a schematic diagram of a server for performing a data migration process of a memory module
  • FIG. 8b is a schematic diagram of a server after completing a data migration process of a memory module
  • FIG. 9 is a schematic structural diagram of a server according to the present invention.
  • FIG. 2 is a flow chart of an embodiment of a data migration method for a memory module in a server according to the present invention. As shown in Figure 2, the method includes the following steps:
  • Step S101 when the processor receives a data migration request from the user to the first memory module, the processor searches for the second memory module, and sends a mirror relationship establishment instruction to the first proxy device, where the first memory module is in operation Status, the second memory module is in an idle state.
  • Step S102 The first proxy device receives the mirror relationship establishment instruction, and establishes a mirror relationship with the second proxy device.
  • the server includes at least two memory modules, such as a first memory module and a second memory module, wherein the first memory module is in a running state, the second memory module is in an idle state, and the memory module may be a memory card.
  • the dual in-line memory module (DIMM, also known as the memory module) is installed on the memory card, and then the memory card is inserted into the motherboard.
  • the first memory module stores data, and the physical address is allocated by the processor and reported to the OS, and the OS can run the program or store data in the first memory module; and the processor only performs memory on the second memory module. Initialization, no physical address is assigned to it, and the OS is not notified of the existence of the second memory module, so the OS does not use the second memory module.
  • each memory module participating in the data migration process is connected to a proxy device, which is responsible for receiving a memory address access request of the processor, which is the local (Home/Local) of the proxy.
  • the address of the memory module, and the result returned from the memory module is sent back to the requestor of the original memory access by the processor.
  • the user When the user wishes to migrate all of the data of the first memory module in the server to remove the first memory module, the user issues a data migration request to the processor.
  • the processor receives the user's first When a data migration request of a memory module is performed, a memory module that is in an idle state, that is, a second memory module is searched, and a mirror relationship establishment instruction is sent to the proxy device A connected to the first memory module, and the proxy device A receives the mirror relationship establishment instruction. Thereafter, a mirror relationship is established with the proxy device B connected to the second memory module.
  • the so-called mirror relationship means that the second memory module does not have a physical address when it is initialized.
  • the second memory module has the same physical address as the first memory module, and the proxy device A After receiving the data written to the physical address of the first memory module from the processor, in addition to writing the data to the physical address of the first memory module, the data is also written into the proxy device B, and then by the proxy device B. Write data to the same physical address in the second memory module.
  • Step S103 The processor sends a data migration instruction to the first proxy device.
  • Step S104 The first proxy device receives the data migration instruction, and sends data in the first memory module to the second proxy device.
  • Step S105 the second proxy device writes data in the first memory module into the second memory module.
  • the processor sends a data migration instruction to the proxy device A, and the data of the first memory module is gradually migrated to the second memory module.
  • the proxy device A acquires the data to be migrated from the first memory module, sends the data to the proxy device B, and the proxy device B writes the data into the second memory module and writes the second memory.
  • the physical address of the module's data is exactly the same as the physical address of the data in the first memory module.
  • Step S106 The processor sends a mirror relationship cancellation instruction to the first proxy device, and sets the first memory module and the second memory module to an idle state and an operating state, respectively.
  • Step S107 the first proxy device receives the mirror relationship cancellation command, and releases the mirror relationship with the second proxy device.
  • the processor sends a mirror relationship release command to the proxy device A, instructing the proxy device A and the proxy device B to cancel the mirror relationship, the proxy device A
  • the mirror relationship with the proxy device B is released, and the proxy device that receives the read/write command of the segment physical address is modified by the proxy device A into the proxy device B, so that the first memory module becomes idle.
  • the state, and the second memory module is turned into the running state.
  • the proxy device B reads data from the second memory module or writes the data to the second memory module. Because the physical address of the first memory module does not change before and after the data migration, the data migration process is invisible to the applications running on the OS and the OS.
  • the processor can select a suitable memory module in an idle state for data migration in the running memory module, and the processor can simultaneously Or complete the data migration of multiple running memory modules in sequence.
  • a data migration method of a memory module in a server is provided, and the processor instructs the proxy device to perform data migration between the two memory modules by establishing a mirror relationship between the proxy devices of the two memory modules.
  • Data migration from one memory module to another, the entire data migration process does not require the participation of the operating system, the data migration process takes a short time, and the data migration of the memory modules in the server is conveniently implemented.
  • FIG. 3 is a flowchart of another embodiment of a data migration method for a memory module in a server according to the present invention. As shown in FIG. 3, the method includes the following steps:
  • Step S201 When the processor receives the data migration request from the user to the first memory module, the processor searches for the second memory module, and sends a mirror relationship establishment instruction to the first proxy device, where the first memory module is in operation Status, the second memory module is in an idle state.
  • Step S202 The first proxy device receives the mirroring relationship establishing instruction, and establishes a mirroring relationship with the second proxy device.
  • the server includes a plurality of memory modules, wherein the memory modules 1, 2, and 3 are in a running memory module, wherein data is stored, and the physical address is allocated by the processor and reported to the OS, and the OS can Running the program or storing data in the memory module;
  • the memory module 4 is a memory module in an idle state, the processor only performs memory initialization on the memory module 4, does not assign a physical address thereto, and does not notify the OS of the free memory module. There is, so the OS does not use the memory module 4.
  • you can select the volume The largest memory module is used as the memory module in the idle state.
  • the memory module with the same capacity can be selected, so that any one of the memory modules can be idle. Memory modules for easy data migration.
  • the user When a user wishes to migrate all of the data of a running memory module in the server to remove the memory module, the user issues a data migration request to the processor.
  • the memory module of the server is structurally designed, there is usually a user operation interface to receive the hot plug command of the user, and the user can be prompted for the hot plugging progress.
  • the user operation interface is a button. When the user presses the button, the data migration and memory module removal commands are issued to the processor.
  • the proxy device connected to the memory module is a Home Agent (HA) as shown in FIG. 7a, and HA is an Intel (Intel) Quick-Path Interconnect (QPI) protocol.
  • HA Home Agent
  • QPI Quick-Path Interconnect
  • One component of the modern Intel processor is interconnected using a QPI bus.
  • the HA is responsible for receiving access requests from the QPI to the memory module and returning the results returned from the memory module back to the requestor of the original memory access.
  • Figure 7a shows the interconnection method of two Intel processors. Each processor can be divided into many units. Here, only the computing unit and the interconnecting unit are drawn. The computing unit issues an access request to the address, and the interconnect unit allocates the address request to Corresponding submodules, such as HA, or interconnected units that are forwarded to other processors via QPI.
  • Corresponding submodules such as HA, or interconnected units that are forwarded to other processors via QPI.
  • HA is a sub-module of the interconnect unit that receives an access request from the interconnect unit for the memory it is hanging from. The request can come from the compute unit of its own processor or from the compute unit of the other processor.
  • the proxy device connected to the memory module can also be the Extended Node Controller (XNC) / Node Controller (NC) as shown in Figure 7b.
  • XNC Extended Node Controller
  • NC Node Controller
  • the interconnection between processors can use XNC/NC in addition to QPI.
  • the QPI of each processor is first connected to the XNC, and then all the processors are combined into one large by the XNC interconnection network. server. All processors, memory, I/O, etc. under each XNC are collectively called a node, so one of the many functions of XNC is similar to HA, that is, receiving the incoming node from the interconnected organization. Memory access request.
  • HA and XNC/NC have the same function in the embodiment of the present invention, namely: Receiving such memory address access requests, these memory addresses are the addresses of the local memory modules they are proxying.
  • the processor when the processor receives a data migration request from a running memory module, the processor searches for a memory module in an idle state, and sends a mirror relationship to the proxy device HA0 connected to the running memory module.
  • the proxy device HA0 receives the mirror relationship establishment command and establishes a mirror relationship with the proxy device HA1 connected to the memory module in the idle state.
  • the so-called mirror relationship means that the memory module in the idle state does not have a physical address when it is initialized.
  • the proxy device HA0 and the proxy device HA1 establish a mirror relationship, the memory module in the idle state has the memory module in the running state.
  • the proxy device HA0 after receiving the data from the processor to the physical address of the memory module in the running state, the proxy device HA0 writes the data to the physical address of the memory module in the running state. The data is also written to the proxy device HA1, and the data is written by HA1 into the same physical address in the memory module in the idle state.
  • Step S203 The processor sends a data migration instruction to the first proxy device.
  • Step S204 The first proxy device receives a data read command sent by the processor, reads data in the first memory module, and returns data in the first memory module to the processor.
  • Step S205 the first proxy device receives data in the first memory module written by the processor, and sends data in the first memory module to the second proxy device.
  • Step S206 the second proxy device writes data in the first memory module into the second memory module.
  • the data in the running memory module 3 is gradually migrated to the memory module 4 in the idle state, and the data migration process includes data reading and data writing.
  • the processor sends a data read command to HA0, and HA0 receives the data read command, reads the data in the running memory module and returns the data in the running memory module to the processor.
  • the processor writes the data in the running memory module to HA0, and then HA0 forwards the data in the running memory module to HA1, and the data in the running memory module is written by HA1. Idle state in memory module 4.
  • HA0 and HA1 work as follows: After HA0 and HA1 establish a mirror relationship, The two HAs in the server form a mirrored pair, as shown in Figure 7a. These two HA composition mirrored pair, there is a master image terminal HA (Mirrored Master side), the other end is 0 to migrate from the mirror (Mirrored Slave side) in the data memory module in this application example, the primary mirror side that has been The HA used in the server, and the slave side is used to back up the HA waiting for migration. At the beginning of the establishment of the temporary image pair, the HA has the same physical address as the primary HA, but the data among them is not consistent, so data migration is required.
  • HA has the same physical address as the primary HA, but the data among them is not consistent, so data migration is required.
  • the specific data migration process is that the processor traverses all the addresses of HA from the low address to the high address, and executes a part of the address each time:
  • the master HA receives this address write request and will do two things. One is to write the data to the PA0 address of its own memory;
  • the master HA knows that the server has a mirror HA present at this time, so another thing is that it forwards the packet to the slave HA;
  • the data on HA's PA0 is migrated to the PA0 address from HA.
  • Step S207 the processor writes the first data to the first physical address of the first proxy device.
  • Step S208 the first proxy device receives the first data, and forwards the first data to the second proxy device.
  • Step S209 the second proxy device writes the first data to the first physical address in the second memory module.
  • the data migration of the memory module is not a task that can be completed in an instant, and it takes a period of time, which is proportional to the capacity of the memory module to be migrated.
  • the migration period there are two master devices that may read and write to the running memory module 3.
  • One is the HA0 on the running memory module 3, which is gradually traversing the running memory module 3.
  • Address, copy data to memory module 4 in idle state; the other is service Read and write requests from the bus (such as QPI), which are read and write requests to the running memory module 3 when the server is running normally.
  • the OS needs to write to the address PA1 of the primary HA, it is actually 2 to 5 steps of the above steps, so the data consistency of the two HAs can still be guaranteed.
  • Step S210 The processor sends a mirror relationship cancellation instruction to the first proxy device, and sets the first memory module and the second memory module to an idle state and an operating state, respectively.
  • Step S211 the first proxy device receives the mirroring relationship release command, and releases a memory module in which the memory module in the idle state of the second proxy device is in an active state.
  • the mirror relationship release command is sent to HA0, HA0 and HA1 are unmirrored, and the proxy device that receives the read/write command of the physical address is HA0 is modified to HA1, so that the original running memory module is turned into an idle state, its physical address is invalid, and the processor cannot write to or read data from the physical address, and the original is in an idle state.
  • the memory module is turned into a running state, and the original memory module in the idle state has the same physical address PA0-PA1 as the original running memory module, and the receiving processor reads and writes the physical address of the segment, that is, as shown in the figure.
  • the roles of the idle memory module and the running memory module are converted.
  • the physical address does not change before and after data migration and role switching, it is invisible to applications running on OS and OS.
  • the memory module corresponding to HA0 regardless of whether there is kernel state data of the OS above, and whether the above data is frequently occupied by an application (such as a database), the migration can be completed, thus greatly improving The feasibility of memory heat removal.
  • Step S212 the processor disconnects power of the first memory module to remove the first memory module. After the original running memory module completes the data migration and role switching, it actually turns to the idle state, and the memory module can be powered off to remove the memory module.
  • the process of hot removal of the existing memory module is as shown in FIG. 4, which includes the following steps: a) Pressing a button indicates that the command is initiated;
  • BIOS forwards the command to the OS, notifying the OS to migrate the memory to be removed; d) At the same time as the previous step, the power LED starts to flash, indicating that the hot removal process begins; e) the OS performs memory migration, and this part The service running on the memory address is migrated to another memory address;
  • the BIOS starts to continuously query whether the OS has completed data migration; g) if the OS migrates the data successfully, it notifies the BIOS of the successful migration result;
  • BIOS receives a notification from the OS, the physical address is deleted, and it is actually disabled to be removed.
  • BIOS operation If the BIOS operation is successful, the power supply is stopped, and the power LED is set to off, indicating that the heat removal is completed;
  • BIOS operation fails, the power LED is returned to the steady state, indicating that the thermal removal process is stopped, and the button LED is set to be steady on, notifying the user that the hot addition has failed.
  • the data migration method provided by the embodiment of the present invention performs hot removal of the memory module, and does not require the participation of the OS, and all the processors are also the BIOS thereon.
  • the program controls the main HA to complete, that is, the above steps c)-step i) are replaced with steps S201-S211 of the embodiment of the present invention.
  • Step S213 when the processor receives the memory module addition request of the user, the processor supplies power to the added memory module, and initializes the added memory module, where The added memory module enters a memory module that is in an idle state.
  • the new memory module 5 can be hot-added, and the user initiates a hot add operation to the new memory module by operating an interface such as a button, the hot add
  • an interface such as a button
  • FIG. 5 is a prior art memory module hot add process, which includes the following steps:
  • the button LED starts to flash, indicating that the command has been received
  • the power LED starts to flash and will flash until the hot add is complete.
  • BIOS performs memory initialization
  • the power LED will be turned on constantly, indicating that the hot addition is over; J. If the addition fails, the power LED is set to off, and the memory board is powered off, and the button LED is set. It is always on, notifying the user that the hot add failed.
  • the new memory module when the new memory module is added as the memory module in the idle state, it is not necessary to perform steps F) to H) in the above process, that is, the memory module 5 in FIG. 6d is powered and performed.
  • Initialize but do not assign a physical address to it, make it a free memory module in this server (as shown in Figure 6e), hot removal for other running memory modules (1, 2, 4) Provides conditions for HA to HA address migration.
  • a data migration method of a memory module in a server is provided, and the processor instructs the proxy device to perform data migration between the two memory modules by establishing a mirror relationship between the proxy devices of the two memory modules.
  • Data migration from one memory module to another, the entire data migration process does not require the participation of the operating system, the data migration process takes a short time, and the data migration of the memory modules in the server is conveniently realized, and the memory module in the running state can be conveniently operated.
  • the hot removal is performed, and during the data migration process, the processor can still receive the read and write operations of the running memory module without causing data errors.
  • FIG. 9 is a schematic structural diagram of an embodiment of a server according to the present invention. As shown in Figure 9, The server 1000 includes:
  • a processor 11 a processor 11, a first proxy device 12 and a second proxy device 13 connected to the processor 11, a first memory module 14 connected to the first proxy device 12, and a second memory module 15 connected to the second proxy device 13;
  • the processor 11 is configured to: after receiving a data migration request from the user to the first memory module 14, and the first memory module 14 is in an operating state, and the second memory module 15 is in an idle state, searching for the second memory module 15, and Sending a mirror relationship establishment instruction to the first proxy device 12;
  • the first proxy device 12 is configured to receive the mirror relationship establishment instruction, and after receiving the mirror relationship establishment instruction, establish a mirror relationship with the second proxy device 13;
  • the processor 11 is further configured to send a data migration instruction to the first proxy device 12 after the mirroring relationship is established;
  • the first proxy device 12 is further configured to receive the data migration instruction, and after receiving the data migration instruction, send the data in the first memory module 14 to the second proxy device 13;
  • the second proxy device 13 is configured to receive the data sent by the first proxy device 12, and write the data into the second memory module 15;
  • the processor 11 is further configured to send a mirror relationship release instruction to the first proxy device 12 after the data migration is completed, and after the mirroring relationship release command is issued, the first memory module and the second The memory modules are respectively set to an idle state and an operating state;
  • the first proxy device 12 is further configured to release the mirror relationship with the second proxy device 13 after receiving the mirror relationship release command.
  • a server wherein the processor instructs the proxy device to perform data migration between two memory modules by establishing a mirror relationship between the proxy devices of the two memory modules, thereby completing one memory module to another Data migration of a memory module, the entire data migration process does not require the participation of the operating system, the data migration process takes a short time, and the data migration of the memory modules in the server is conveniently implemented.
  • the present invention also provides another embodiment of a server.
  • the server includes: a processor, a first proxy device and a second proxy device connected to the processor, a first memory module connected to the first proxy device, and a second memory connected to the second proxy device Module
  • the processor is configured to: after receiving a data migration request from the user to the first memory module, and the first memory module is in an operating state, and when the second memory module is in an idle state, searching for the second memory module, And sending a mirror relationship establishment instruction to the first proxy device;
  • the first proxy device is configured to receive the mirror relationship establishment instruction, and after receiving the mirror relationship establishment instruction, establish a mirror relationship with the second proxy device;
  • the processor is further configured to send a data migration instruction to the first proxy device after the mirroring relationship is established;
  • the first proxy device is further configured to receive a data read instruction sent by the processor, and after receiving the data read command, read data in the first memory module and Data in a memory module is returned to the processor;
  • the first proxy device is further configured to receive data in the first memory module written by the processor, and send data in the first memory module to the second proxy device;
  • the second proxy device is configured to receive the data sent by the first proxy device, and write the data into the second memory module;
  • the processor is further configured to write the first data to the first physical address of the first proxy device
  • the first proxy device is further configured to: after receiving the first data, forwarding the first data to the second proxy device;
  • the second proxy device is further configured to: after receiving the first data forwarded by the second proxy device, writing the first data to the first physical address in the second memory module
  • the processor is further configured to send a mirror relationship release instruction to the first proxy device after the data migration is completed, and after the mirroring relationship release command is issued, the first memory module and the The second memory modules are respectively set to an idle state and an operating state;
  • the first proxy device is further configured to release the mirror relationship with the second proxy device after receiving the mirror relationship release command.
  • the processor is further configured to: after the data is migrated and the mirroring relationship release command is sent to the first proxy device, disconnecting the power of the first memory module to remove the first memory module;
  • the processor is further configured to: when receiving a memory module addition request of the user, add the added The memory module is powered, and the added memory module is initialized, and the added memory module becomes a free memory module.
  • a server wherein the processor instructs the proxy device to perform data migration between two memory modules by establishing a mirror relationship between the proxy devices of the two memory modules, thereby completing one memory module to another Data migration of a memory module, the entire data migration process does not require the participation of the operating system, the data migration process takes a short time, and the data migration of the memory module in the server is conveniently implemented, and the memory module in the running state can be conveniently removed. During the data migration process, the processor can still receive read and write operations on the running memory module without causing data errors.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined or Can be integrated into another device, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect connection or communication connection through some communication interface, device or module, and may be in electrical, mechanical or other form.
  • the modules described as separate components may or may not be physically separate.
  • the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the portion may be embodied in the form of a software device, which may be stored in a computer readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including instructions for causing a computer device (may be A personal computer, server, or network device, etc.) performs the methods described in various embodiments or portions of the embodiments.
  • a computer readable storage medium such as a ROM/RAM, a magnetic disk, an optical disk, etc.

Abstract

本发明实施例公开了一种服务器中内存模块的数据迁移方法及服务器。本发明的处理器通过在两个内存模块的代理装置之间建立镜像关系,指示代理装置在两个内存模块间进行数据迁移,从而完成一个内存模块到另一个内存模块的数据迁移,整个数据迁移过程无需操作系统参与,数据迁移过程耗时短,方便地实现了服务器中内存模块的数据迁移。

Description

数据处理方法及装置 本申请要求于 2013年 8月 31 日提交中国专利局、 申请号为
201310390761.8,发明名称为 "一种服务器中内存模块的数据迁移方法及服 务器" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及存储技术领域, 尤其涉及一种服务器中内存模块的数据迁 移方法及服务器。 背景技术 内存热插拔主要应用在服务器领域, 为服务器带来了更高的可用性和 可维护性。 在内存热插拔时, 一个服务器涉及硬件层、 基本输入输出服务 器 (Basic Input Output System, BIOS)层、操作系统(Operating System, OS) (也 可还包含虚拟机监控器 (Virtual Machine Monitor, VMM))层, 硬件层包含至 少两个内存模块, 其各层关系图如图 1所示。 在所示的逻辑结构中, 硬件层 提供物理上实际可用的资源; BIOS层对这些物理资源进行配置并上报可用 资源以及提供操作接口; OS可以直接使用 BIOS上报的资源,也可以由 VMM 先对资源进行虚拟化, 再分配到 OS使用, 也就是 OS是这些资源的最终使用 者。 在内存热插拔技术中, 硬件层提供了实体的内存模块以及访问通道, BIOS层对内存进行初始化、 分配地址、 上报可用地址给 OS或者 VMM, 最 终 OS在内存中运行程序或存放数据。 内存热插拔包括内存热添加和内存热 移除两个过程。
现有技术在进行内存热移除时, 需要 OS先将准备热移除的内存地址上 的数据迁移到其他内存地址上, 然而, 因为 OS每次搬移一个内存页都要先 取得这个页的控制权, 暂停其他程序的访问后才能开始搬移, 所以如果要 迁移的用户态数据被其他程序频繁访问, 那么 OS每次都要花费一定时间才 能获得内存页的控制权, 结果需要花费很长时间才能完成整个内存模块的 数据迁移。
综上, 由于内存数据迁移时对 OS的依赖性很强, OS的数据布局以及 内存数据迁移的能力都会对内存数据迁移的成败造成影响, 所以如何方便 地实现内存模块的数据迁移成为目前迫切需要解决的问题。
发明内容 有鉴于此, 本发明实施例提供一种服务器中内存模块的数据迁移方法 及服务器, 以期方便地实现服务器中内存模块的数据迁移。
第一方面, 提供了一种服务器中内存模块的数据迁移方法, 包括: 当处理器接收到用户对第一内存模块的数据迁移请求时, 所述处理器 查找第二内存模块, 并向第一代理装置发送镜像关系建立指令, 所述第一 内存模块处于运行状态, 所述第二内存模块处于空闲状态;
所述第一代理装置接收所述镜像关系建立指令, 与第二代理装置建立 镜像关系;
所述处理器向所述第一代理装置发送数据迁移指令;
所述第一代理装置接收所述数据迁移指令, 将所述第一内存模块中的 数据发送至所述第二代理装置;
所述第二代理装置将所述第一内存模块中的数据写入所述第二内存模 块中;
所述处理器向所述第一代理装置发送镜像关系解除指令, 将所述第一 内存模块和所述第二内存模块分别设置为空闲状态和运行状态;
所述第一代理装置接收所述镜像关系解除指令, 解除与所述第二代理 装置的所述镜像关系。
在第一种可能的实现方式中, 所述第一代理装置接收所述数据迁移指 令, 将所述第一内存模块中的数据发送至所述第二代理装置, 包括:
所述第一代理装置接收所述处理器发送的数据读取指令, 读取所述第 一内存模块中的数据并将所述第一内存模块中的数据返回给所述处理器; 所述第一代理装置接收所述处理器写入的所述第一内存模块中的数 据, 将所述第一内存模块中的数据发送至所述第二代理装置。
结合第一方面或第一方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述处理器向所述第一代理装置发送镜像关系解除指令之前, 所述方法还包括:
所述处理器向所述第一代理装置的第一物理地址写入第一数据; 所述第一代理装置接收所述第一数据, 并将所述第一数据转发给所述 第二代理装置;
所述第二代理装置将所述第一数据写入所述第二内存模块中的所述第 一物理地址。
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二 种可能的实现方式, 在第三种可能的实现方式中, 所述第一代理装置接收 所述镜像关系解除指令, 解除与所述第二代理装置的所述镜像关系之后, 所述方法还包括:
所述处理器断开所述第一内存模块的电源, 以移除所述第一内存模块。 结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二 种可能的实现方式或第一方面的第三种可能的实现方式, 在第四种可能的 实现方式中, 所述方法还包括:
当所述处理器接收到用户的内存模块添加请求时, 所述处理器给添加 的内存模块供电, 并对所述添加的内存模块进行初始化, 所述添加的内存 模块进入空闲状态。
第二方面, 提供了一种服务器, 包括:
处理器、 连接所述处理器的第一代理装置和第二代理装置、 与所述第 一代理装置连接的第一内存模块、 以及与所述第二代理装置连接的第二内 存模块;
所述处理器, 用于当接收到用户对第一内存模块的数据迁移请求后, 并且所述第一内存模块为运行状态, 所述第二内存模块为空闲状态时, 查 找第二内存模块, 并向第一代理装置发送镜像关系建立指令;
所述第一代理装置, 用于接收所述镜像关系建立指令, 在接收到所述 镜像关系建立指令后, 与第二代理装置建立镜像关系;
所述处理器, 还用于在所述镜像关系建立完成后, 向所述第一代理装 置发送数据迁移指令;
所述第一代理装置, 还用于接收所述数据迁移指令, 在接收到所述数 据迁移指令后, 将所述第一内存模块中的数据发送至所述第二代理装置; 所述第二代理装置, 用于接收所述第一代理装置发出的所述数据, 将 所述数据写入所述第二内存模块中;
所述处理器, 还用于在所述数据迁移完后, 向所述第一代理装置发送 镜像关系解除指令, 以及在发出所述镜像关系解除指令后, 将所述第一内 存模块和所述第二内存模块分别设置为空闲状态和运行状态;
所述第一代理装置, 还用于接收到所述镜像关系解除指令后, 解除与 所述第二代理装置的所述镜像关系。
在第一种可能的实现方式中, 所述第一代理装置还用于接收所述数据 迁移指令, 在接收到所述数据迁移指令后, 将所述第一内存模块中的数据 发送至所述第二代理装置, 包括:
所述第一代理装置, 还用于接收所述处理器发送的数据读取指令, 在 接收到所述数据读取指令后, 读取所述第一内存模块中的数据并将所述第 一内存模块中的数据返回给所述处理器;
所述第一代理装置, 还用于接收所述处理器写入的所述第一内存模块 中的数据, 将所述第一内存模块中的数据发送至所述第二代理装置。
结合第二方面或第二方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述处理器, 还用于向所述第一代理装置的第一物理地址写 入第一数据;
所述第一代理装置, 还用于接收到所述第一数据后, 将所述第一数据 转发给所述第二代理装置;
所述第二代理装置, 还用于在接收到所述第二代理装置转发的所述第 一数据后, 将所述第一数据写入所述第二内存模块中的所述第一物理地址。
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二 种可能的实现方式, 在第三种可能的实现方式中, 所述处理器, 还用于在 所述数据迁移完以及向所述第一代理装置发送镜像关系解除指令后, 断开 所述第一内存模块的电源, 以移除所述第一内存模块。
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二 种可能的实现方式或第二方面的第三种可能的实现方式, 在第四种可能的 实现方式中, 所述处理器, 还用于当接收到用户的内存模块添加请求时, 给添加的内存模块供电, 并对所述添加的内存模块进行初始化, 所述添加 的内存模块成为空闲内存模块。
釆用本发明提供的一种服务器中内存模块的数据迁移方法及服务器的技 术方案, 处理器通过在两个内存模块的代理装置之间建立镜像关系, 指示 代理装置在两个内存模块间进行数据迁移, 从而完成一个内存模块到另一 个内存模块的数据迁移, 整个数据迁移过程无需操作系统参与, 数据迁移 过程耗时短, 方便地实现了服务器中内存模块的数据迁移。
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附 图。
图 1为现有技术中内存热插拔时涉及的服务器各层的关系示意图; 图 2为本发明提供的一种服务器中内存模块的数据迁移方法的一个实 施例的流程图;
图 3 为本发明提供的一种服务器中内存模块的数据迁移方法的另一个 实施例的流程图;
图 4为现有技术中的内存模块热移除流程图;
图 5为现有技术中的内存模块热添加流程图;
图 6a为服务器包含的内存模块结构示意图;
图 6b为对服务器中的内存模块的数据迁移示意图;
图 6c为服务器中的内存模块完成数据迁移后内存模块的角色转换示意 图;
图 6d为对服务器中的空闲内存模块进行替换的示意图;
图 6e为服务器中的空闲内存模块替换后的示意图;
图 7a为代理装置 HA和内存模块的结构示意图;
图 7b为节点控制器 NC和内存模块的结构示意图;
图 8a为进行内存模块数据迁移过程的服务器示意图; 图 8b为完成内存模块数据迁移过程后的服务器示意图; 图 9为本发明的一种服务器的结构示意图。
具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
图 2为本发明提供的一种服务器中内存模块的数据迁移方法的一个实 施例的流程图。 如图 2所示, 该方法包括以下步骤:
步骤 S101, 当处理器接收到用户对第一内存模块的数据迁移请求时, 所述处理器查找第二内存模块, 并向第一代理装置发送镜像关系建立指令, 所述第一内存模块处于运行状态, 所述第二内存模块处于空闲状态。
步骤 S102, 所述第一代理装置接收所述镜像关系建立指令, 与第二代 理装置建立镜像关系。
在本发明实施例中, 服务器包含至少两个内存模块, 例如第一内存模 块和第二内存模块, 其中第一内存模块处于运行状态, 第二内存模块处于 空闲状态,该内存模块可以是内存卡,即将双列直插式存储模块 (Dual In-line Memory Module, DIMM, 又称内存条)安装在内存卡上, 再将内存卡插到 主板上。 其中, 第一内存模块中存储有数据, 由处理器分配了物理地址并 上报给了 OS, OS可以在该第一内存模块中运行程序或存放数据; 而处理 器仅对第二内存模块进行内存初始化, 不为其分配物理地址, 也不通知 OS 该第二内存模块的存在, 因而 OS也不会用到该第二内存模块。
在本发明实施例中, 参与数据迁移过程的每个内存模块都与一个代理 装置相连, 该代理装置负责接收处理器的内存地址访问请求, 这些内存地 址是其所代理的本地(Home/Local ) 的内存模块的地址, 并将从内存模块 返回的结果通过处理器送回原内存访问的请求者。
当用户希望将服务器中第一内存模块的数据全部迁移, 以将该第一内 存模块移除时, 用户向处理器发出数据迁移请求。 处理器接收到用户对第 一内存模块的数据迁移请求时, 查找一个处于空闲状态的内存模块即第二 内存模块, 向与第一内存模块连接的代理装置 A发送镜像关系建立指令, 代理装置 A接收到该镜像关系建立指令后, 与连接于该第二内存模块的代 理装置 B建立镜像关系。 所谓镜像关系是指, 第二内存模块在初始化时不 具有物理地址, 当代理装置 A和代理装置 B建立镜像关系后, 第二内存模 块就具有与第一内存模块相同的物理地址, 代理装置 A在从处理器接收到 写入第一内存模块的某物理地址的数据后, 除了将该数据写入第一内存模 块的该物理地址, 还将该数据写入代理装置 B, 再由代理装置 B将数据写 入第二内存模块中的相同的物理地址。
可以理解的是, 本发明中处理器所执行的操作实际上可以是由处理器 上的 BIOS程序来完成的。
步骤 S103, 所述处理器向所述第一代理装置发送数据迁移指令。
步骤 S104, 所述第一代理装置接收所述数据迁移指令, 将所述第一内 存模块中的数据发送至所述第二代理装置。
步骤 S105, 所述第二代理装置将所述第一内存模块中的数据写入所述 第二内存模块中。
代理装置 A和代理装置 B建立了镜像关系后, 处理器向代理装置 A发 送数据迁移指令, 要将第一内存模块的数据逐步迁移至第二内存模块。 代 理装置 A接收到该数据迁移指令后, 从第一内存模块获取要迁移的数据, 将该数据发送至代理装置 B, 由代理装置 B将数据写入第二内存模块中, 写入第二内存模块的数据的物理地址与该数据在第一内存模块中的物理地 址是完全一致的。
步骤 S106, 所述处理器向所述第一代理装置发送镜像关系解除指令, 将所述第一内存模块和所述第二内存模块分别设置为空闲状态和运行状 态。
步骤 S107, 所述第一代理装置接收所述镜像关系解除指令, 解除与所 述第二代理装置的所述镜像关系。
全部迁移完第一内存模块中的数据后, 处理器向代理装置 A发送镜像 关系解除指令, 指示代理装置 A和代理装置 B解除镜像关系, 代理装置 A 接收到该镜像关系解除指令后, 解除与代理装置 B的镜像关系, 并且将接 收该段物理地址的读写指令的代理装置由代理装置 A修改为代理装置 B, 这样第一内存模块转为空闲状态, 而第二内存模块转为运行状态, 处理器 对该段物理地址进行数据的读写时, 通过代理装置 B从第二内存模块读取 数据或将数据写入第二内存模块。 因为进行数据迁移的前后, 第一内存模 块的物理地址不变, 所以该数据迁移过程对于 OS及 OS上运行的应用程序 来说是不可见的。
可以理解的是, 服务器中不止一个处于运行状态的内存模块和处于空 闲状态的内存模块, 处理器可以为处于运行状态的内存模块选择合适的处 于空闲状态的内存模块进行数据迁移, 处理器可以同时或依次完成多个处 于运行状态的内存模块的数据迁移。
根据本发明实施例提供的一种服务器中内存模块的数据迁移方法, 处 理器通过在两个内存模块的代理装置之间建立镜像关系, 指示代理装置在 两个内存模块间进行数据迁移, 从而完成一个内存模块到另一个内存模块 的数据迁移, 整个数据迁移过程无需操作系统参与, 数据迁移过程耗时短, 方便地实现了服务器中内存模块的数据迁移。
图 3 为本发明提供的一种服务器中内存模块的数据迁移方法的另一个 实施例的流程图。 如图 3所示, 该方法包括以下步骤:
步骤 S201, 当处理器接收到用户对第一内存模块的数据迁移请求时, 所述处理器查找第二内存模块, 并向第一代理装置发送镜像关系建立指令, 所述第一内存模块处于运行状态, 所述第二内存模块处于空闲状态。
步骤 S202, 所述第一代理装置接收所述镜像关系建立指令, 与第二代 理装置建立镜像关系。
如图 6a所示, 服务器中包括多个内存模块, 其中内存模块 1、 2和 3 为处于运行状态的内存模块, 其中存储有数据, 由处理器分配了物理地址 并上报给了 OS, OS可以在该内存模块中运行程序或存放数据; 内存模块 4 为处于空闲状态的内存模块, 处理器仅对内存模块 4进行了内存初始化, 不为其分配物理地址, 也不通知 OS该空闲内存模块的存在, 因而 OS也不 会用到该内存模块 4。在该具有多个内存模块的服务器中, 可以选取其中容 量最大的一个内存模块作为空闲状态的内存模块, 同时, 不论设置为运行 状态的内存模块和空闲状态的内存模块, 可以选择插有相同容量的内存条, 这样任何一个内存模块都可以成为空闲状态的内存模块以方便进行数据迁 移。
当用户希望将服务器中某个处于运行状态的内存模块的数据全部迁 移, 以将该内存模块移除时, 用户向处理器发出数据迁移请求。 对服务器 的内存模块进行结构设计时一般会有一个用户的操作接口来接收用户的热 插拔命令, 并且能够向用户提示热插拔的进度。 如图 4的内存模块热移除 流程图和图 5 的内存模块热添加流程图中, 该用户操作接口为一个按钮。 用户按下该按钮, 即向处理器发出数据迁移和内存模块移除命令。
在本发明实施例中, 与内存模块连接的代理装置为如图 7a所示的本地 代理 (Home Agent, HA), HA是英特尔 (Intel) 的快速通道互联 (Quick-Path Interconnect, QPI) 协议中的一个组件, 现代的 Intel处理器之间使用 QPI 总线进行互联。 HA负责接收来自 QPI的对内存模块的访问请求, 并将从内 存模块返回的结果送回原内存访问的请求者。
图 7a展示了两个 Intel处理器的互联方法,每个处理器内部可以划分为 许多单元, 这里仅画出计算单元和互联单元, 计算单元发出对地址的访问 请求, 互联单元将地址请求分配到对应的子模块, 比如 HA, 或者通过 QPI 转发到其他处理器的互联单元。 HA是互联单元的一个子模块, 它接收来自 互联单元的对它所挂内存的访问请求, 这个请求可以来自它自身所在处理 器的计算单元, 也可以来自的其他处理器的计算单元。
与内存模块连接的代理装置还可以是图 7b 所示的扩展节点控制器 ( Extended Node Controller, XNC ) /节点控制器 (Node Controller, NC)。 如 图 7b所示, 处理器之间的互联除了使用 QPI以外, 还可以使用 XNC/NC, 每个处理器的 QPI先连接到 XNC上, 再由 XNC的互联网络将所有处理器 组合成一个大服务器。 每个 XNC下面的所有处理器、 内存、 I/O等统称一 个节点 (node), 所以 XNC的众多功能中有一个是类似于 HA的, 那就是接 收从互联组织发来的对自身 node内的内存的访问请求。
概括来说, HA和 XNC/NC在本发明实施例中都有相同的功能, 即: 接收这样内存地址访问请求, 这些内存地址是其所代理的本地的内存模块 的地址。
如图 8a所示, 处理器接收到用户对一个处于运行状态的内存模块的数 据迁移请求时, 查找一个处于空闲状态的内存模块, 向与处于运行状态的 内存模块连接的代理装置 HA0发送镜像关系建立指令,代理装置 HA0接收 该镜像关系建立指令, 与连接于该处于空闲状态的内存模块的代理装置 HA1 建立镜像关系。 所谓镜像关系是指, 处于空闲状态的内存模块在初始 化时不具有物理地址,当代理装置 HA0和代理装置 HA1建立了镜像关系后, 处于空闲状态的内存模块就具有了与处于运行状态的内存模块相同的物理 地址 PA0-PA1 , 代理装置 HA0在从处理器接收到写入处于运行状态的内存 模块的某物理地址的数据后, 除了将该数据写入该处于运行状态的内存模 块的该物理地址, 还将该数据写入代理装置 HA1, 再由 HA1将数据写入处 于空闲状态的内存模块中的相同的物理地址中。
步骤 S203, 所述处理器向所述第一代理装置发送数据迁移指令。
步骤 S204, 所述第一代理装置接收所述处理器发送的数据读取指令, 读取所述第一内存模块中的数据并将所述第一内存模块中的数据返回给所 述处理器。
步骤 S205, 所述第一代理装置接收所述处理器写入的所述第一内存模 块中的数据, 将所述第一内存模块中的数据发送至所述第二代理装置。
步骤 S206, 所述第二代理装置将所述第一内存模块中的数据写入所述 第二内存模块中。
如图 6b所示, 将处于运行状态的内存模块 3中的数据逐步迁移至处于 空闲状态的内存模块 4, 该数据迁移的过程包括数据读取和数据写入的过 程。 处理器向 HA0发送数据读取指令, HA0接收该数据读取指令, 读取处 于运行状态的内存模块中的数据并将该处于运行状态的内存模块中的数据 返回给处理器。 处理器将该处于运行状态的内存模块中的数据写入 HA0, 然后 HA0将该处于运行状态的内存模块中的数据转发给 HA1, 由 HA1将 该处于运行状态的内存模块中的数据写入处于空闲状态的内存模块 4中。
具体地, HA0和 HA1的工作原理为: HA0和 HA1建立镜像关系后, 服务器中的两个 HA组成镜像对,如图 7a所示。这两个 HA组成镜像对后, 会有一个 HA 是主镜像端 (Mirrored Master side ), 另一个是从镜像端 ( Mirrored Slave side )0 在内存模块数据迁移这个应用实例中, 主镜像端就 是一直在服务器中使用的 HA, 而从镜像端是用来备份等待迁移的 HA。 在 建立起临时镜像对的一开始,从 HA便具有与主 HA相同的物理地址,但是 它们当中的数据并不一致, 所以就要进行数据迁移。
具体的数据迁移过程是处理器从低地址到高地址把 HA 的所有地址进 行遍历, 每次执行一部分地址:
1.从内存模块中将某个地址 PA0的数据读到处理器;
2.将数据原样写回原地址 PA0;
3.主 HA收到这个地址写请求, 会做两件事, 一件是把数据写到自己 内存的 PA0地址上;
4.主 HA知道此时服务器有一个它的镜像 HA存在, 所以另一件事是 它将这个数据包转发给从 HA;
5.从 HA收到数据包, 将数据写到自己内存的 PA0地址上。
到此, 地址 PA0在两个 HA里都有了相同的副本, 相当于完成了将主
HA的 PA0上的数据迁移到了从 HA的 PA0地址上。
当处理器完成对整个主 HA的地址遍历,也就完成了 HA内存数据迁移。 步骤 S207, 所述处理器向所述第一代理装置的第一物理地址写入第一 数据。
步骤 S208, 所述第一代理装置接收所述第一数据, 并将所述第一数据 转发给所述第二代理装置。
步骤 S209, 所述第二代理装置将所述第一数据写入所述第二内存模块 中的所述第一物理地址。
内存模块的数据迁移不是一个瞬间就能完成的任务, 需要消耗一段时 间, 这个时间长度与待迁移的内存模块的容量成正比。 在迁移的一段时间 里有两个主设备可能会对处于运行状态的内存模块 3进行读写操作: 一个 是处于运行状态的内存模块 3上的 HA0, 它在逐渐遍历处于运行状态的内 存模块 3的地址, 将数据拷贝到处于空闲状态的内存模块 4; 另一个是服务 器总线(比如 QPI )上发来的读写请求, 这是服务器正常运行时对处于运行 状态的内存模块 3的读写请求。 如果没有镜像关系存在, 那么当 HA0迁移 了一部分地址的数据, 而 QPI上又发来对这些地址的写操作修改了这里内 存的值, 这样当迁移完成时, 两个内存模块的数据不一致, 就不可能倒换。 镜像使得所有写操作会将数据同时写到两个内存模块上, 因此保证了一致 性。
在迁移过程中, 如果 OS需要对主 HA的地址 PA1进行写操作, 实际 上就是以上步骤的 2 ~ 5步, 因此依然可以保证两个 HA的数据一致性。
步骤 S210, 所述处理器向所述第一代理装置发送镜像关系解除指令, 将所述第一内存模块和所述第二内存模块分别设置为空闲状态和运行状 态。
步骤 S211, 所述第一代理装置接收所述镜像关系解除指令, 解除与所 述第二代理装置的所述镜像关系处于空闲状态的内存模块处于运行状态的 内存模块。
如图 6c 所示, 全部迁移完处于运行状态的内存模块中的数据后, 向 HA0发送镜像关系解除指令, HA0和 HA1解除镜像关系,并且将接收该段 物理地址的读写指令的代理装置由 HA0修改为 HA1,这样原来的处于运行 状态的内存模块转为空闲状态, 其物理地址失效, 处理器不能往该物理地 址中写入或从该物理地址中读取数据, 原来的处于空闲状态的内存模块转 为运行状态, 该原来的处于空闲状态的内存模块具有与原来处于运行状态 的内存模块相同的物理地址 PA0-PA1 , 接收处理器对该段物理地址的读写 操作, 也即如图 8b所示, 处于空闲状态的内存模块和处于运行状态的内存 模块的角色发生了转换。 但因为进行数据迁移及角色倒换的前后, 物理地 址不变, 所以对于 OS及 OS上运行的应用程序来说是不可见的。 也因为其 不可见性, 对于 HA0对应的内存模块, 无论上面是否有 OS的内核态数据, 以及无论上面的数据是否被应用程序 (比如数据库)频繁占用, 迁移都是 可以完成的, 因此大大提高了内存热移除的可行性。
步骤 S212, 所述处理器断开所述第一内存模块的电源, 以移除所述第 一内存模块。 由于原来的处于运行状态的内存模块完成了数据迁移以及角色倒换 后, 实际上转为空闲状态, 可以断开该内存模块的电源, 以移除该内存模 块。
现有的内存模块热移除的流程如图 4所示, 其包括以下步骤: a)按下按钮, 表示发起命令;
b)按钮 LED开始闪烁, 表示命令已经收到;
c) BIOS转发命令到 OS , 通知 OS对要移除的内存进行迁移; d)与上一步同时, 电源 LED开始闪烁, 表示热移除的流程开始进行; e) OS进行内存迁移, 将这部分内存地址上运行的业务迁移到其他内存 地址上;
f)与上一步同时, BIOS开始不断查询 OS是否已完成数据迁移; g)如果 OS迁移数据成功, 则通知 BIOS迁移成功的结果;
h)如果 OS迁移数据失败, 则将电源 LED恢复到常亮状态, 表示热移 除过程停止, 并将按钮 LED设为常亮, 通知用户热添加失败( LED的操 作实际是 BIOS的行为, BIOS因为收不到 OS的通知而出现超时, 从而判 断 OS数据迁移失败);
i)如果 BIOS收到了 OS的通知, 则删除物理地址, 实际是禁用到被移 除内
存模块的地址请求;
j)如果 BIOS操作成功,则对内存板停止供电,并将电源 LED设为常灭, 表示热移除完成;
k)如果 BIOS操作失败, 则对将电源 LED恢复到常亮状态, 表示热移 除过程停止, 并将按钮 LED设为常亮, 通知用户热添加失败。
与图 4所示的内存模块热移除流程不同的是, 釆用本发明实施例提供 的数据迁移方法进行内存模块热移除, 不需要 OS的参与,全部由处理器也 即其上的 BIOS程序控制主 HA完成, 也即将上述步骤 c)-步骤 i)替换为本 发明实施例的步骤 S201-步骤 S211。
步骤 S213, 当所述处理器接收到用户的内存模块添加请求时, 所述处 理器给添加的内存模块供电, 并对所述添加的内存模块进行初始化, 所述 添加的内存模块进入空闲状态处于空闲状态的内存模块。
如图 6d所示, 将图 6c中的处于空闲状态的内存模块 3移除后, 可以 热添加新内存模块 5,用户通过操作接口比如按键来发起对新内存模块的热 添加操作, 该热添加操作的流程与现有技术相同。
如图 5为现有技术的内存模块热添加流程, 其包括以下步骤:
A.按下按钮, 表示发起命令;
B.按钮 LED开始闪烁, 表示命令已经收到;
C.给内存卡 (内存板)供电;
D.电源 LED开始闪烁, 在热添加完成之前会一直闪烁;
E. BIOS进行内存初始化;
F.为初始化好的内存分配地址;
G.通知 OS新添加的内存可用, 并同时上 新添加内存的地址和容量;
H. OS完成其内存上线 (online )操作;
I. 整个过程如果成功完成,则将电源 LED变为常亮,表示热添加结束; J.如果出现添加失败, 则将电源 LED设为常灭, 并给内存板断电, 同 时将按钮 LED设为常亮, 通知用户热添加失败。
然而, 在本发明实施例中, 将新内存模块添加为处于空闲状态的内存 模块时, 不需要执行上述流程中的步骤 F)至步骤 H), 即对图 6d中的内存 模块 5供电并进行初始化, 但是不为其分配物理地址, 使之成为这个服务 器中的处于空闲状态的内存模块 (如图 6e所示), 为其他处于运行状态的内 存模块(1, 2, 4 ) 的热移除提供了 HA到 HA地址迁移的条件。
根据本发明实施例提供的一种服务器中内存模块的数据迁移方法, 处 理器通过在两个内存模块的代理装置之间建立镜像关系, 指示代理装置在 两个内存模块间进行数据迁移, 从而完成一个内存模块到另一个内存模块 的数据迁移, 整个数据迁移过程无需操作系统参与, 数据迁移过程耗时短, 方便地实现了服务器中内存模块的数据迁移, 能方便地对处于运行状态的 内存模块进行热移除, 且在数据迁移过程中, 仍然可以接收处理器对运行 的内存模块的读写操作, 不会造成数据错误。
图 9为本发明一种服务器的一个实施例的结构示意图。 如图 9所示, 该服务器 1000包括:
处理器 11、 连接处理器 11的第一代理装置 12和第二代理装置 13、 与 第一代理装置 12连接的第一内存模块 14、 以及与第二代理装置 13连接的 第二内存模块 15;
处理器 11, 用于当接收到用户对第一内存模块 14的数据迁移请求后, 并且第一内存模块 14为运行状态, 第二内存模块 15为空闲状态时, 查找 第二内存模块 15, 并向第一代理装置 12发送镜像关系建立指令;
第一代理装置 12, 用于接收所述镜像关系建立指令, 在接收到所述镜 像关系建立指令后, 与第二代理装置 13建立镜像关系;
处理器 11, 还用于在所述镜像关系建立完成后, 向第一代理装置 12发 送数据迁移指令;
第一代理装置 12, 还用于接收所述数据迁移指令, 在接收到所述数据 迁移指令后, 将第一内存模块 14中的数据发送至第二代理装置 13;
第二代理装置 13, 用于接收第一代理装置 12发出的所述数据, 将所述 数据写入第二内存模块 15中;
处理器 11, 还用于在所述数据迁移完后, 向第一代理装置 12发送镜像 关系解除指令, 以及在发出所述镜像关系解除指令后, 将所述第一内存模 块和所述第二内存模块分别设置为空闲状态和运行状态;
第一代理装置 12, 还用于接收到所述镜像关系解除指令后, 解除与第 二代理装置 13的所述镜像关系。
根据本发明实施例提供的一种服务器, 其中的处理器通过在两个内存 模块的代理装置之间建立镜像关系, 指示代理装置在两个内存模块间进行 数据迁移, 从而完成一个内存模块到另一个内存模块的数据迁移, 整个数 据迁移过程无需操作系统参与, 数据迁移过程耗时短, 方便地实现了服务 器中内存模块的数据迁移。
本发明还提供了一种服务器的另一个实施例。 该服务器包括: 处理器、 连接所述处理器的第一代理装置和第二代理装置、 与所述第 一代理装置连接的第一内存模块、 以及与所述第二代理装置连接的第二内 存模块; 所述处理器, 用于当接收到用户对第一内存模块的数据迁移请求后, 并且所述第一内存模块为运行状态, 所述第二内存模块为空闲状态时, 查 找第二内存模块, 并向第一代理装置发送镜像关系建立指令;
所述第一代理装置, 用于接收所述镜像关系建立指令, 在接收到所述 镜像关系建立指令后, 与第二代理装置建立镜像关系;
所述处理器, 还用于在所述镜像关系建立完成后, 向所述第一代理装 置发送数据迁移指令;
所述第一代理装置, 还用于接收所述处理器发送的数据读取指令,, 在 接收到所述数据读取指令后, 读取所述第一内存模块中的数据并将所述第 一内存模块中的数据返回给所述处理器;
所述第一代理装置, 还用于接收所述处理器写入的所述第一内存模块 中的数据, 将所述第一内存模块中的数据发送至所述第二代理装置;
所述第二代理装置, 用于接收所述第一代理装置发出的所述数据, 将 所述数据写入所述第二内存模块中;
所述处理器, 还用于向所述第一代理装置的第一物理地址写入第一数 据;
所述第一代理装置, 还用于接收到所述第一数据后, 将所述第一数据 转发给所述第二代理装置;
所述第二代理装置, 还用于在接收到所述第二代理装置转发的所述第 一数据后, 将所述第一数据写入所述第二内存模块中的所述第一物理地址; 所述处理器, 还用于在所述数据迁移完后, 向所述第一代理装置发送 镜像关系解除指令, 以及在发出所述镜像关系解除指令后, 将所述第一内 存模块和所述第二内存模块分别设置为空闲状态和运行状态;
所述第一代理装置, 还用于接收到所述镜像关系解除指令后, 解除与 所述第二代理装置的所述镜像关系。
所述处理器, 还用于在所述数据迁移完以及向所述第一代理装置发送 镜像关系解除指令后, 断开所述第一内存模块的电源, 以移除所述第一内 存模块;
所述处理器, 还用于当接收到用户的内存模块添加请求时, 给添加的 内存模块供电, 并对所述添加的内存模块进行初始化, 所述添加的内存模 块成为空闲内存模块。
根据本发明实施例提供的一种服务器, 其中的处理器通过在两个内存 模块的代理装置之间建立镜像关系, 指示代理装置在两个内存模块间进行 数据迁移, 从而完成一个内存模块到另一个内存模块的数据迁移, 整个数 据迁移过程无需操作系统参与, 数据迁移过程耗时短, 方便地实现了服务 器中内存模块的数据迁移, 能方便地对处于运行状态的内存模块进行热移 除, 且在数据迁移过程中, 仍然可以接收处理器对运行的内存模块的读写 操作, 不会造成数据错误。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 描述的设备和模块的具体工作过程, 可以参考前述方法实施例中的对应过 程描述, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的设备和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性 的, 例如, 所述模块的划分, 仅仅为一种逻辑功能划分, 实际实现时可以 有另外的划分方式, 例如多个模块或组件可以结合或者可以集成到另一个 设备中, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互 之间的耦合或直接耦合或通信连接可以是通过一些通信接口, 装置或模块 的间接辆合或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的, 作为模块显示的部件可以是或者也可以不是物理单元, 即可以位于一个地 方, 或者也可以分布到多个网络单元上。 可以才艮据实际的需要选择其中的 部分或者全部, 模块来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能模块可以集成在一个处理模块 中, 也可以是各个模块单独物理存在, 也可以两个或两个以上模块集成在 一个模块中。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到各 实施方式可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通 过硬件。 基于这样的理解, 上述技术方案本质上或者说对现有技术做出贡 献的部分可以以软件设备的形式体现出来, 该计算机软件设备可以存储在 计算机可读存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令用 以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行各个实施例或者实施例的某些部分所述的方法。
以上所述的实施方式, 并不构成对该技术方案保护范围的限定。 任何 在上述实施方式的精神和原则之内所作的修改、 等同替换和改进等, 均应 包含在该技术方案的保护范围之内。

Claims

权利要求
1、 一种服务器中内存模块的数据迁移方法, 其特征在于, 包括: 当处理器接收到用户对第一内存模块的数据迁移请求时, 所述处理器 查找第二内存模块, 并向第一代理装置发送镜像关系建立指令, 所述第一 内存模块处于运行状态, 所述第二内存模块处于空闲状态;
所述第一代理装置接收所述镜像关系建立指令, 与第二代理装置建立 镜像关系;
所述处理器向所述第一代理装置发送数据迁移指令;
所述第一代理装置接收所述数据迁移指令, 将所述第一内存模块中的 数据发送至所述第二代理装置;
所述第二代理装置将所述第一内存模块中的数据写入所述第二内存模 块中;
所述处理器向所述第一代理装置发送镜像关系解除指令, 将所述第一 内存模块和所述第二内存模块分别设置为空闲状态和运行状态; 所述第一 代理装置接收所述镜像关系解除指令, 解除与所述第二代理装置的所述镜 像关系。
2、 如权利要求 1所述的方法, 其特征在于, 所述第一代理装置接收所 述数据迁移指令, 将所述第一内存模块中的数据发送至所述第二代理装置, 包括:
所述第一代理装置接收所述处理器发送的数据读取指令, 读取所述第 一内存模块中的数据并将所述第一内存模块中的数据返回给所述处理器; 所述第一代理装置接收所述处理器写入的所述第一内存模块中的数 据, 将所述第一内存模块中的数据发送至所述第二代理装置。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述处理器向所述第 一代理装置发送镜像关系解除指令之前, 还包括:
所述处理器向所述第一代理装置的第一物理地址写入第一数据; 所述第一代理装置接收所述第一数据, 并将所述第一数据转发给所述 第二代理装置;
所述第二代理装置将所述第一数据写入所述第二内存模块中的所述第 一物理地址。
4、 如权利要求 1-3任意一项所述的方法, 其特征在于, 所述第一代理 装置接收所述镜像关系解除指令, 解除与所述第二代理装置的所述镜像关 系之后, 还包括:
所述处理器断开所述第一内存模块的电源, 以移除所述第一内存模块。
5、 如权利要求 1-4任意一项所述的方法, 其特征在于, 还包括: 当所述处理器接收到用户的内存模块添加请求时, 所述处理器给添加 的内存模块供电, 并对所述添加的内存模块进行初始化, 所述添加的内存 模块进入空闲状态。
6、 一种服务器, 其特征在于, 包括:
处理器、 连接所述处理器的第一代理装置和第二代理装置、 与所述第 一代理装置连接的第一内存模块、 以及与所述第二代理装置连接的第二内 存模块;
所述处理器, 用于当接收到用户对第一内存模块的数据迁移请求后, 并且所述第一内存模块为运行状态, 所述第二内存模块为空闲状态时, 查 找第二内存模块, 并向第一代理装置发送镜像关系建立指令;
所述第一代理装置, 用于接收所述镜像关系建立指令, 在接收到所述 镜像关系建立指令后, 与第二代理装置建立镜像关系;
所述处理器, 还用于在所述镜像关系建立完成后, 向所述第一代理装 置发送数据迁移指令;
所述第一代理装置, 还用于接收所述数据迁移指令, 在接收到所述数 据迁移指令后, 将所述第一内存模块中的数据发送至所述第二代理装置; 所述第二代理装置, 用于接收所述第一代理装置发出的所述数据, 将 所述数据写入所述第二内存模块中;
所述处理器, 还用于在所述数据迁移完后, 向所述第一代理装置发送 镜像关系解除指令, 以及在发出所述镜像关系解除指令后, 将所述第一内 存模块和所述第二内存模块分别设置为空闲状态和运行状态;
所述第一代理装置, 还用于接收到所述镜像关系解除指令后, 解除与 所述第二代理装置的所述镜像关系。
7、 如权利要求 6所述的服务器, 其特征在于, 所述第一代理装置还用 于接收所述数据迁移指令, 在接收到所述数据迁移指令后, 将所述第一内 存模块中的数据发送至所述第二代理装置, 包括:
所述第一代理装置, 还用于接收所述处理器发送的数据读取指令, 在 接收到所述数据读取指令后, 读取所述第一内存模块中的数据并将所述第 一内存模块中的数据返回给所述处理器;
所述第一代理装置, 还用于接收所述处理器写入的所述第一内存模块 中的数据, 将所述第一内存模块中的数据发送至所述第二代理装置。
8、 如权利要求 6或 7所述的服务器, 其特征在于,
所述处理器, 还用于向所述第一代理装置的第一物理地址写入第一数 据;
所述第一代理装置, 还用于接收到所述第一数据后, 将所述第一数据 转发给所述第二代理装置;
所述第二代理装置, 还用于在接收到所述第二代理装置转发的所述第 一数据后, 将所述第一数据写入所述第二内存模块中的所述第一物理地址。
9、 如权利要求 6-8任意一项所述的服务器, 其特征在于,
所述处理器, 还用于在所述数据迁移完以及向所述第一代理装置发送 镜像关系解除指令后, 断开所述第一内存模块的电源, 以移除所述第一内 存模块。
10、 如权利要求 6-9任意一项所述的服务器, 其特征在于,
所述处理器, 还用于当接收到用户的内存模块添加请求时, 给添加 的内存模块供电, 并对所述添加的内存模块进行初始化, 所述添加的内 存模块成为空闲内存模块。
PCT/CN2014/073933 2013-08-31 2014-03-24 数据处理方法及装置 WO2015027703A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2016537090A JP6407283B2 (ja) 2013-08-31 2014-03-24 サーバ内のメモリモジュールに対するデータマイグレーション方法およびサーバ
EP14839622.9A EP3040866A4 (en) 2013-08-31 2014-03-24 METHOD AND DEVICE FOR DATA PROCESSING
AU2014314984A AU2014314984B2 (en) 2013-08-31 2014-03-24 Data processing method and device
CA2922578A CA2922578C (en) 2013-08-31 2014-03-24 Data migration method for memory module in server and server
US15/055,926 US9785375B2 (en) 2013-08-31 2016-02-29 Migrating data between memory units in server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310390761.8 2013-08-31
CN201310390761.8A CN103455372B (zh) 2013-08-31 2013-08-31 一种服务器中内存模块的数据迁移方法及服务器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/055,926 Continuation US9785375B2 (en) 2013-08-31 2016-02-29 Migrating data between memory units in server

Publications (1)

Publication Number Publication Date
WO2015027703A1 true WO2015027703A1 (zh) 2015-03-05

Family

ID=49737778

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/073933 WO2015027703A1 (zh) 2013-08-31 2014-03-24 数据处理方法及装置

Country Status (7)

Country Link
US (1) US9785375B2 (zh)
EP (1) EP3040866A4 (zh)
JP (1) JP6407283B2 (zh)
CN (2) CN103455372B (zh)
AU (1) AU2014314984B2 (zh)
CA (1) CA2922578C (zh)
WO (1) WO2015027703A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455372B (zh) * 2013-08-31 2017-05-10 华为技术有限公司 一种服务器中内存模块的数据迁移方法及服务器
ES2727818T3 (es) 2013-11-22 2019-10-18 Huawei Tech Co Ltd Método, ordenador y aparato para migrar datos de memoria
JP2023002309A (ja) * 2021-06-22 2023-01-10 株式会社日立製作所 ストレージシステム及びデータ管理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761566A (zh) * 2011-04-26 2012-10-31 国际商业机器公司 迁移虚拟机的方法和装置
CN103198028A (zh) * 2013-03-18 2013-07-10 华为技术有限公司 一种内存数据迁移方法、装置及系统
CN103455372A (zh) * 2013-08-31 2013-12-18 华为技术有限公司 一种服务器中内存模块的数据迁移方法及服务器

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4965717A (en) * 1988-12-09 1990-10-23 Tandem Computers Incorporated Multiple processor system having shared memory with private-write capability
FR2643993B1 (fr) 1989-03-03 1991-05-17 Bull Sa Procede pour remplacer des modules memoire dans un systeme informatique et systeme informatique pour la mise en oeuvre du procede
US7099875B2 (en) * 1999-06-29 2006-08-29 Emc Corporation Method and apparatus for making independent data copies in a data processing system
JP2006092506A (ja) * 2004-08-27 2006-04-06 Murata Mach Ltd 画像処理装置
CN100370759C (zh) 2005-09-06 2008-02-20 上海华为技术有限公司 一种热备份系统和方法
CN100399288C (zh) 2005-09-30 2008-07-02 联想(北京)有限公司 一种内存备份装置和方法
US8296760B2 (en) * 2006-10-27 2012-10-23 Hewlett-Packard Development Company, L.P. Migrating a virtual machine from a first physical machine in response to receiving a command to lower a power mode of the first physical machine
JP5022773B2 (ja) * 2007-05-17 2012-09-12 株式会社日立製作所 ジャーナルを利用したリモートコピーのコピー先となるストレージシステムの消費電力を節約する方法及びシステム
US20090006793A1 (en) * 2007-06-30 2009-01-01 Koichi Yamada Method And Apparatus To Enable Runtime Memory Migration With Operating System Assistance
US8189794B2 (en) * 2008-05-05 2012-05-29 Sony Corporation System and method for effectively performing data restore/migration procedures
JP5556816B2 (ja) * 2009-09-01 2014-07-23 日本電気株式会社 分散ストレージシステム、分散ストレージ方法および分散ストレージ用プログラムとストレージノード
US8799586B2 (en) * 2009-09-30 2014-08-05 Intel Corporation Memory mirroring and migration at home agent
CN101662506B (zh) * 2009-10-14 2013-01-16 中兴通讯股份有限公司 一种基于cpu内核共享的负载均衡方法和装置
JP2011182369A (ja) * 2010-03-04 2011-09-15 Ricoh Co Ltd データ転送装置、データ転送方法、データ転送プログラム及び記録媒体
US8412972B2 (en) * 2010-06-28 2013-04-02 Intel Corporation Method and apparatus for reducing power consumption for memories
US8990531B2 (en) * 2010-07-12 2015-03-24 Vmware, Inc. Multiple time granularity support for online classification of memory pages based on activity level
CN102073462B (zh) * 2010-11-29 2013-04-17 华为技术有限公司 虚拟存储迁移方法、系统和虚拟机监控器
CN102326149B (zh) 2011-07-28 2013-09-25 华为技术有限公司 内存迁移的实现方法和装置
US10061534B2 (en) * 2011-12-01 2018-08-28 Intel Corporation Hardware based memory migration and resilvering
CN103324582A (zh) 2013-06-17 2013-09-25 华为技术有限公司 一种内存迁移方法、装置及设备
US9063667B2 (en) * 2013-08-13 2015-06-23 Utah State University Dynamic memory relocation
US9471137B2 (en) * 2014-08-11 2016-10-18 International Business Machines Corporation Managing power savings in a high availability system at a redundant component level of granularity
US9811275B2 (en) * 2015-02-27 2017-11-07 Toshiba Memory Corporation Memory system and data control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761566A (zh) * 2011-04-26 2012-10-31 国际商业机器公司 迁移虚拟机的方法和装置
CN103198028A (zh) * 2013-03-18 2013-07-10 华为技术有限公司 一种内存数据迁移方法、装置及系统
CN103455372A (zh) * 2013-08-31 2013-12-18 华为技术有限公司 一种服务器中内存模块的数据迁移方法及服务器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3040866A4 *

Also Published As

Publication number Publication date
CA2922578C (en) 2021-08-31
CN107219999B (zh) 2020-06-26
CA2922578A1 (en) 2015-03-05
EP3040866A4 (en) 2016-09-21
EP3040866A1 (en) 2016-07-06
CN103455372B (zh) 2017-05-10
US9785375B2 (en) 2017-10-10
US20160179436A1 (en) 2016-06-23
CN107219999A (zh) 2017-09-29
JP6407283B2 (ja) 2018-10-17
JP2016532970A (ja) 2016-10-20
CN103455372A (zh) 2013-12-18
AU2014314984B2 (en) 2017-06-29

Similar Documents

Publication Publication Date Title
TWI710915B (zh) 一種基於互聯網資料中心的資源處理方法、相關裝置以及通信系統
JP5427574B2 (ja) 仮想計算機の移動管理方法、前記移動管理方法を用いた計算機、前記移動管理方法を用いた仮想化機構および前記移動管理方法を用いた計算機システム
JP6520959B2 (ja) ノードシステム、サーバ装置、スケールリング制御方法及びプログラム
JP5706974B2 (ja) 計算機システム及びそのデータ移行方法
WO2014026387A1 (zh) 一种云环境下虚拟应用双机的切换方法、装置及系统
JP6123626B2 (ja) 処理再開方法、処理再開プログラムおよび情報処理システム
JP6431197B2 (ja) スナップショット処理方法および関係付けられたデバイス
US11409471B2 (en) Method and apparatus for performing data access management of all flash array server
WO2015109483A1 (zh) 一种存储数据的方法和装置
WO2015027703A1 (zh) 数据处理方法及装置
WO2012106909A1 (zh) 对分布式计算机系统中内存的管理方法和装置
US8621260B1 (en) Site-level sub-cluster dependencies
JPH11224207A (ja) マルチクラスタシステムを構成する計算機
WO2015139327A1 (zh) 失效切换方法、装置和系统
TWI669605B (zh) 虛擬機器群組的容錯方法及其容錯系統
WO2016206392A1 (zh) 数据读写方法及装置
US10642788B1 (en) Sand timer algorithm for tracking in-flight data storage requests for data replication
TWI763331B (zh) 虛擬機器的備用方法與備用系統
JP6822706B1 (ja) クラスタシステム、サーバ装置、引継ぎ方法、及びプログラム
US11216348B2 (en) All flash array server and control method thereof
CN112965790B (zh) 一种基于pxe协议的虚拟机启动方法及电子设备
WO2018016041A1 (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: 14839622

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2922578

Country of ref document: CA

Ref document number: 2016537090

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014839622

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014839622

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2014314984

Country of ref document: AU

Date of ref document: 20140324

Kind code of ref document: A