Live Migration Operating System Code Patching

By detecting live migration and modifying operating system code during standby processor states, the method addresses hardware changes, ensuring accurate process accounting and functional compatibility during virtual machine migration.

JP7586607B2Active Publication Date: 2024-11-19INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022527082
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-11-13
Filing Date
2020-11-10
Publication Date
2024-11-19
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

Existing technologies fail to address the need for operating system code patching during live migration of virtual machines, particularly when hardware characteristics change between source and destination physical machines, leading to inaccurate process accounting and other functional issues.

Method used

A method is implemented to detect live migration and modify operating system code while processors are in a standby state, adapting to hardware changes by modifying specific portions of the operating system to ensure compatibility and accuracy.

Benefits of technology

This approach ensures seamless live migration with accurate process accounting and functional compatibility by modifying the operating system code during hardware changes, enhancing the functionality of data processing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007586607000001
    Figure 0007586607000001
  • Figure 0007586607000002
    Figure 0007586607000002
  • Figure 0007586607000003
    Figure 0007586607000003
Patent Text Reader

Abstract

A live migration is detected to be occurring for a process of an operating system, the live migration including a change in hardware characteristics of a computer system on which the process executes. A first message is broadcast to a set of processors, the first message causing each processor in the set to enter a wait state. While each processor in the set is in the wait state, a portion of a set of program instructions of the operating system is modified.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to methods, systems, and computer program products for performing live migration of virtual machines, and more particularly, to methods, systems, and computer program products for performing operating system code patching during live migration. [Background technology]

[0002] A virtual machine (VM) is an emulation of a physical computer system. A hypervisor is computer software that creates and manages VMs. The physical computer system on which a hypervisor manages one or more VMs is also called a host machine, and each VM is also called a guest machine. With VMs, multiple different operating systems (OS) can share the same set of physical hardware, with each OS running in its own VM.

[0003] To adapt to changes in hardware resource availability and computing needs, VMs need to be moved from one physical machine to another. Live migration is the process of moving a running virtual machine (VM), including its memory, storage, and network configuration, to a different physical machine without restarting the operating system or applications that may be running on the migrating VM, and while minimizing the time interval during which the VM is down for the migration. Summary of the Invention

[0004] Exemplary embodiments provide methods, systems, and computer program products. One embodiment includes a method for detecting that a live migration is occurring for a process of an operating system, the live migration including a change in hardware characteristics of the computer system on which the process executes. One embodiment broadcasts a first message to a set of processors, the first message causing each processor in the set of processors to enter a wait state. One embodiment modifies a portion of the set of program instructions of the operating system while each of the processors in the set is in the wait state.

[0005] One embodiment includes a computer usable program product that includes one or more computer readable storage devices and program instructions stored on at least one of the one or more storage devices.

[0006] One embodiment includes a computer system including one or more processors, one or more computer readable memories, one or more computer readable storage devices, and program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories.

[0007] According to one aspect, a computer-implemented method is provided that includes detecting that a live migration is occurring for a process of an operating system, where the live migration includes a change in hardware characteristics of a computer system on which the process executes; broadcasting a first message to a set of processors, where the first message causes each processor in the set of processors to enter a wait state; and modifying a portion of a set of program instructions of the operating system while each of the processors in the set is in the wait state.

[0008] According to another aspect, a computer usable program product is provided that includes one or more computer readable storage devices and program instructions stored on at least one of the one or more storage devices, the stored program instructions including: program instructions for detecting that a live migration is occurring for a process of an operating system, where the live migration includes a change in hardware characteristics of the computer system on which the process executes; program instructions for broadcasting a first message to a set of processors, where the first message causes each processor in the set of processors to enter a wait state; and program instructions for modifying a portion of the set of program instructions of the operating system while each processor in the set is in the wait state.

[0009] According to another aspect, a computer system is provided that includes one or more processors, one or more computer readable memories, one or more computer readable storage devices, and program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the stored program instructions including: program instructions for detecting that a live migration is occurring for a process of an operating system, where the live migration includes a change in hardware characteristics of the computer system on which the process executes; program instructions for broadcasting a first message to a set of processors, where the first message causes each processor in the set of processors to enter a wait state; and program instructions for modifying a portion of the set of program instructions of the operating system while each of the processors in the set is in the wait state. [Brief description of the drawings]

[0010] Preferred embodiments of the invention will now be described, by way of example only, with reference to the following drawings, in which:

[0011] [Figure 1] 1 is a block diagram of a network of data processing systems in which illustrative embodiments may be implemented; [Diagram 2] 1 illustrates a block diagram of a data processing system in which illustrative embodiments may be implemented; [Diagram 3] FIG. 1 is a block diagram of an example of a configuration for operating system code patching during live migration in accordance with an illustrative embodiment. [Figure 4] FIG. 1 is a block diagram of an example of a configuration for operating system code patching during live migration in accordance with an illustrative embodiment. [Diagram 5]4 is an example timing diagram of message flow during operating system code patching during live migration in accordance with an example embodiment. [Figure 6] 1 is a flowchart of an example of a process for operating system code patching during live migration in accordance with an illustrative embodiment. [Figure 7] 1 is a flowchart of an example of a process for operating system code patching during live migration in accordance with an illustrative embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The illustrative embodiments recognize that when live migrating a VM and its operating system from one physical machine to another, hardware differences may exist between the source and destination physical machines. In one non-limiting example of such hardware differences, the processors in the source and destination machines are of the same family and can run the same operating system and application code without recompilation, but the processors may be of different versions. For example, the source machine may have a Power8 processor while the destination may have a Power9 processor, or the source and destination machines may have different processors in the x86 processor family. In another non-limiting example of such hardware differences, the number of sockets, chips, or cores in a system may change, indicating that a VM migration is occurring. A third non-limiting example includes a system's non-uniform memory access (NUMA) topology, which specifies grouping of processors according to memory access speed and informs the OS which processors are located near the same memory so that workloads can be grouped together to take advantage of memory locality. Some changes in the NUMA topology (e.g. birth counts) also indicate that a VM migration is occurring.

[0013] Also, the illustrative embodiments recognize that in some cases, operating system modifications are required to correct functionality when performing live migration between physical machines with different hardware characteristics. As one non-limiting example, different versions of Power processors account for and report processor time consumed by processes differently. For example, both Power8 and Power9 processors use the Process Utilization Resource Register to perform process accounting, but Power8 processors report a scaled PURR value for each thread based on how many time periods the thread was received on the processor at a given time, and some Power9 processors report a PURR value that includes the actual elapsed time for each running thread, without scaling. Thus, when a VM on a host with a Power8 processor is live migrated to a host with a Power9 processor and the operating system reads the PURR value to determine process accounting, the PURR value will be scaled incorrectly, resulting in inaccurate results. Inaccurate results will also occur when a VM on a host with a Power9 processor is live migrated to a host with a Power8 processor. Thus, the illustrative embodiments recognize that there is an unmet need to correct for differing hardware characteristics during live migration.

[0014] The illustrative embodiments recognize that currently available tools or solutions do not address these needs or provide adequate solutions to these needs. The illustrative embodiments used to describe the present invention generally address and solve the problems discussed above and other problems related to operating system code patching during live migration.

[0015] An embodiment may be implemented as a software application. An application implementing an embodiment may be configured as a separate application that operates as a modification to an existing live migration or operating system, as a standalone application in conjunction with an existing live migration or operating system, or a combination thereof.

[0016] Specifically, some illustrative embodiments provide a method for detecting that a live migration of an operating system process is occurring that includes a change in hardware characteristics of the computer system on which the process executes, and for modifying a portion of the operating system to account for the change in hardware characteristics while all other processors in the system are idle.

[0017] An operating system kernel is software that provides OS services, such as starting, stopping, and managing running processes or threads, managing subsystems such as memory and storage, and providing services to user applications that run on the OS. A kernel process is a process that runs as part of the OS kernel and has trusted access to the part of the system on which the OS runs. When the OS runs on a physical machine, the kernel process has access to the physical system hardware. When the OS runs on a virtual machine, the kernel process has access to a virtual, or emulated, version of the physical system hardware. A user-level or user process is a process of the OS that is not a kernel process.

[0018] One embodiment detects that a change in hardware characteristics of a computer system on which the process executes has occurred. In other words, a live migration has occurred and the embodiment is now executing on a different host. One embodiment executes as an operating system kernel process. Another embodiment executes as an operating system user level process. One embodiment also determines that due to the change in hardware characteristics, a portion of the operating system code needs to be modified to adapt to the change in hardware characteristics. For example, a live migration may be from a Power8 system to a Power9 system or vice versa, and as a result, the OS's process accounting must be modified to support the current processor's handling of the PURR value.

[0019] One embodiment broadcasts a message to all other processors installed in the migrated system. In a message handler in the receiving processor, the receiving processor acknowledges the message and loops to wait for a second message. This allows the receiving processor to be in a wait state while waiting for the second message and not execute user processes, thus preventing access to other parts of the operating system that may be being modified.

[0020] One embodiment waits for other processors installed in the migrated system to acknowledge the broadcast message, the processor's acknowledgment indicating that the processor is in a waiting state and preventing access to other portions of the operating system that may be about to be modified.

[0021] Once all processors that received the message have been placed in a wait state, it is safe for one embodiment to modify the operating system code, and one embodiment modifies the operating system code to adapt to the change in hardware characteristics. For example, if a live migration is from a Power8 system to a Power9 system or vice versa, operating system program instructions that perform process accounting are modified to support current processor handling of the PURR value.

[0022] Once the OS modification has been made, one embodiment broadcasts a second message to the waiting processor. Within the message handler of the receiving processor waiting for this second message, the message handler receives the second message and exits the message handler process, thus exiting the waiting state. The receiving processor is now in normal operation and the operating system has been modified to adapt to the live migration changes in hardware characteristics.

[0023] The method of operating system code patching during live migration described herein is not available in methods currently available in the highly-focused art of implementing virtual machines. The method of the embodiments described herein, when implemented to run on a device or data processing system, includes a substantial advance in the functionality of the device or data processing system upon detecting that a live migration is occurring that includes a change in the hardware characteristics of the computer system on which the process executes. While other processors in the system are idle, the method modifies a portion of the operating system to adapt to the change in the hardware characteristics.

[0024] The illustrative embodiments are described by way of example only with respect to particular types of transitions, processes, kernels, message handlers, messages, modifications, hardware characteristics, process accounting, responses, devices, data processing systems, environments, components, and applications. Any particular manifestation of these and other similar artifacts is not intended to be limiting of the invention. Any suitable manifestation of these and other similar artifacts may be selected within the scope of the illustrative embodiments.

[0025] Additionally, exemplary embodiments may be implemented with respect to any type of data, data source, or access to data sources across a data network. Any type of data storage device may provide data to embodiments of the invention locally at a data processing system or across a data network within the scope of the present invention. When embodiments are described with a mobile device, any type of data storage device suitable for use with a mobile device may provide data locally at the mobile device or across a data network within the scope of exemplary embodiments.

[0026] The exemplary embodiment is described using specific code, designs, architectures, protocols, layouts, schemas, and tools only as examples and is not limited to the exemplary embodiment. Furthermore, the exemplary embodiment is described in some examples for clarity of explanation using specific software, tools, and data processing environments. The exemplary embodiment may be used in conjunction with other equivalent or similar target structures, systems, applications, or architectures. For example, other equivalent mobile devices, structures, systems, applications, or architectures thereof may be used in conjunction with such embodiments of the invention within the scope of the invention. An exemplary embodiment may be implemented in hardware, software, or a combination thereof.

[0027] The examples of the present disclosure are used only for clarity of explanation and are not intended to be limiting of the exemplary embodiments. Additional data, operations, actions, tasks, activities, and manipulations are contemplated from the present disclosure, and the same are contemplated within the scope of the exemplary embodiments.

[0028] Any advantages listed herein are merely examples and are not intended to be limiting of example embodiments. Additional or different advantages may be realized by certain example embodiments. Moreover, a particular example embodiment may have some, all, or none of the above-mentioned advantages.

[0029]

[0023] With reference to the drawings, and in particular with reference to Figures 1 and 2, these are diagrams of example data processing environments in which illustrative embodiments may be implemented. Figures 1 and 2 are only examples and are not intended to assert or imply any limitation with respect to the environments in which different embodiments may be implemented. Illustrative embodiments may make many modifications to the depicted environments based on the following description.

[0030] 1 illustrates a block diagram of a network of data processing systems in which an exemplary embodiment may be implemented. Data processing environment 100 is a network of computers in which an exemplary embodiment may be implemented. Data processing environment 100 includes network 102. Network 102 is the medium used to provide communications links between various devices and computers connected together in data processing environment 100. Network 102 may include connections such as wires, wireless communication links, or fiber optic cables.

[0031] Client or server refers only to a particular data processing system connected to network 102 and is not intended to exclude other configurations or roles of these data processing systems. Server 104 and server 106 are coupled to network 102 along with storage unit 108. Software applications may run on any computer in data processing environment 100. Clients 110, 112, and 114 are also coupled to network 102. A data processing system such as server 104 or 106 or client 110, 112, or 114 may store data and may have software applications or software tools running thereon.

[0032] By way of example only, and without implying any limitation to such an architecture, Figure 1 illustrates certain components that may be used in an exemplary implementation of an embodiment. For example, servers 104 and 106 and clients 110, 112, 114 are illustrated as servers and clients by way of example only, and no limitation to a client-server architecture is implied. As another example, an embodiment may be distributed across several data processing systems and data networks as illustrated, whereas another embodiment may be implemented on a single data processing system within the scope of an exemplary embodiment. Data processing systems 104, 106, 110, 112, and 114 also represent exemplary nodes in clusters, partitions, and other configurations suitable for implementing an embodiment.

[0033] Device 132 is an example of a device as described herein. For example, device 132 may take the form of a smartphone, a tablet computer, a laptop computer, a stationary or portable client 110, a wearable computing device, or any other suitable device. Any software application described as executing in another data processing system of FIG. 1 may be configured to execute in a similar manner in device 132. Any data or information stored or generated in another data processing system of FIG. 1 may be configured to be stored or generated in a similar manner in device 132.

[0034] Application 105 implements the embodiments described herein. Application 105 executes any of servers 104 and 106, clients 110, 112, 114, and devices 132. Application 105 modifies operating system code during live migration from one system to another, for example, from server 104 to server 106.

[0035] The servers 104 and 106, the storage unit 108, and the clients 110, 112, 114, and the device 132 may be coupled to the network 102 using wired connections, wireless communication protocols, or other suitable data connectivity. The clients 110, 112, and 114 may be, for example, personal computers or network computers.

[0036] In the illustrated example, server 104 may provide data, such as boot files, operating system images, and applications, to clients 110, 112, and 114. Clients 110, 112, and 114 may be clients to server 104 in this example. Clients 110, 112, 114, or some combination thereof, may include their own data, boot files, operating system images, and applications. Data processing environment 100 may include additional servers, clients, and other devices not shown.

[0037] In the depicted example, data processing environment 100 may be the Internet. Network 102 may represent a collection of networks and gateways that use Transmission Control Protocol / Internet Protocol (TCP / IP) and other protocols to communicate with one another. At the heart of the Internet is a backbone of data communications links between major nodes or host computers, including thousands of commercial, governmental, educational, and other computer systems that route data and messages. Of course, data processing environment 100 may also be implemented as a number of different types of networks, such as, for example, an intranet, a local area network (LAN), a wide area network (WAN), etc. FIG. 1 is intended as an example, and not as an architectural limitation for different illustrative embodiments.

[0038] Among other uses, the data processing environment 100 may be used to implement a client-server environment in which the exemplary embodiments may be implemented. A client-server environment allows for the distribution of software applications and data across a network such that the applications function using interactivity between client and server data processing systems. The data processing environment 100 may also employ a service-oriented architecture that may package interoperable software components distributed across a network together as a coherent business application. The data processing environment 100 may also take the form of a cloud and employ a cloud computing model of service delivery to enable convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that may be rapidly provisioned and released with minimal administrative effort or interaction with a service provider.

[0039] Referring to Figure 2, this figure illustrates a block diagram of a data processing system in which the exemplary embodiments may be implemented. Data processing system 200 is an example of a computer, such as servers 104 and 106 or clients 110, 112, and 114 of Figure 1, or other type of device in which computer usable program code or process-implementing instructions may be located for the exemplary embodiments.

[0040] Data processing system 200 may also represent a data processing system or configuration therein, such as data processing system 132 of FIG. 1, in which computer usable program code or instructions implementing the processes of the exemplary embodiments may be located. Data processing system 200 is described as a computer only, by way of example and not by way of limitation. Implementations in the form of other devices, such as device 132 of FIG. 1, may modify data processing system 200, for example, by adding a touch interface, or even eliminate certain illustrated components from data processing system 200, without departing from the general description of the operation and functionality of data processing system 200 described herein.

[0041] In the illustrated example, data processing system 200 employs a hub architecture including a north bridge and memory controller hub (NB / MCH) 202 and a south bridge and input / output (I / O) controller hub (SB / ICH) 204. A processing unit 206, a main memory 208, and a graphics processor 210 are coupled to north bridge and memory controller hub (NB / MCH) 202. Processing unit 206 may be implemented using one or more heterogeneous processor systems. Processing unit 206 may be a multi-core processor. Graphics processor 210 may be coupled to NB / MCH 202 via an accelerated graphics port (AGP) in one embodiment.

[0042] In the illustrated example, a local area network (LAN) adapter 212 is coupled to the south bridge and I / O controller hub (SB / ICH) (204). An audio adapter 216, a keyboard and mouse adapter 220, a modem 222, a read only memory (ROM) 224, a universal serial bus (USB) and other ports 232, and PCI / PCIe devices 234 are coupled to the south bridge and I / O controller hub 204 via a bus 238. A hard disk drive (HDD) or solid state drive (SSD) 226 and a CD-ROM 230 are coupled to the south bridge and I / O controller hub 204 via a bus 240. The PCI / PCIe devices 234 may include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, but PCIe does not. ROM 224 may be, for example, a flash binary input / output system (BIOS). Hard disk drive 226 and CD-ROM 230 may use, for example, an Integrated Drive Electronics (IDE), Serial Advanced Technology Attachment (SATA) interface, or variations such as External SATA (eSATA) and Micro SATA (eSATA). Super I / O (SIO) devices 236 may be coupled to South Bridge and I / O Controller Hub (SB / ICH) 204 via bus 238.

[0043] Memory such as main memory 208, ROM 224, or flash memory (not shown) are some examples of computer usable storage devices. Hard disk drives or solid state drives 226, CD-ROM 230, and other similarly usable devices are some examples of computer usable storage devices that include computer usable storage media.

[0044] An operating system runs on the processing unit 206. The operating system coordinates and provides control of various components within the data processing system 200 of FIG. 2. The operating system may be a commercially available operating system for any type of computing platform, including, but not limited to, server systems, personal computers, and mobile devices. An object-oriented or other type of programming system may run in conjunction with the operating system to provide calls to the operating system from programs or applications running on the data processing system 200.

[0045] Instructions for the operating system, the object oriented programming system, and applications or programs, such as application 105 of FIG. 1, may be located on a storage device, such as in the form of code 226A on hard disk drive 226, and loaded into at least one of one or more memories, such as main memory 208, for execution by processing unit 206. The processes of the illustrative embodiments may be performed by processing unit 206 using computer-implemented instructions, which may be located in a memory, such as main memory 208, read only memory 224, or in one or more peripheral devices.

[0046] Additionally, in some cases, code 226A may be downloaded over network 201A from remote system 201B, in which case similar code 201C is stored on storage device 201D, and in other cases, code 226A may be downloaded over network 201A to remote system 201B, in which case the downloaded code 201C is stored on storage device 201D.

[0047] The hardware in Figures 1-2 may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash memory, equivalent non-volatile memory, or optical disk drives, may be used in addition to or in place of the hardware depicted in Figures 1-2. The processes of the illustrative embodiments may also be applied to multiprocessor data processing systems.

[0048] In some illustrative examples, data processing system 200 may be a personal digital assistant (PDA) configured generally with flash memory to provide non-volatile memory for storing operating system files and / or user generated data. The bus system may include one or more buses, such as a system bus, an I / O bus, and a PCI bus. Of course, the bus system may be implemented using any type of communications fabric or architecture that provides for the transport of data between different components or devices attached to the fabric or architecture.

[0049] The communications unit may include one or more devices used to transmit and receive data, such as a modem or network adapter. The memory may be, for example, main memory 208 or a cache, such as a cache found in the north bridge and memory controller hub 202. The processing unit may include one or more processors or CPUs.

[0050] 1-2 and the above embodiments are not meant to imply architectural limitations. For example, data processing system 200 may be a tablet computer, a laptop computer, or a telephone device in addition to taking the form of a mobile or wearable device.

[0051] When a computer or data processing system is described as a virtual machine, virtual device, or virtual component, the virtual machine, virtual device, or virtual component operates in the manner of data processing system 200 using virtualized representations of some or all of the components depicted in data processing system 200. For example, in a virtual machine, virtual device, or virtual component, processing unit 206 is manifested as a virtualized instance of all or some of the hardware processing units 206 available in the host data processing system, main memory 208 is manifested as a virtualized instance of all or a portion of the main memory 208 available in the host data processing system, and disk 226 is manifested as a virtualized instance of all or a portion of the disk 226 available in the host data processing system. The host data processing system in such a case is represented by data processing system 200.

[0052] Referring to Figure 3, a block diagram of an example of a configuration for operating system code patching during live migration according to an example embodiment is shown. Application 300 is an example of application 105 of Figure 1 and may run on any of servers 104 and 106, clients 110, 112, and 114, and device 132 of Figure 1.

[0053] The application 300 executes as a kernel or user level process within an operating system. The migration detection module 310 detects that a change has occurred in the hardware characteristics of the computer system on which the process executes, i.e., a live migration has occurred and the application 300 is now executing on a different host. The migration detection module 310 also determines that due to the change in hardware characteristics, a portion of the operating system code needs to be modified to adapt to the change in hardware characteristics.

[0054] The processor message module 320 broadcasts a message to one or more other processors located in the migrated system, placing the receiving processors in a wait state. After broadcasting, the processor message module 320 waits for the other processors located in the migrated system to acknowledge the broadcast message. The processor's acknowledgement indicates that the processor is in a wait state, preventing access to other portions of the operating system that may be about to be modified.

[0055] Once all processors that received the message have been placed in a standby state, it is safe for application 300 to modify the operating system code, and OS modification module 330 modifies the operating system code to adapt to the changed hardware characteristics. Once the OS modification has been made, processor message module 320 broadcasts a second message to the idle processors, returning the receiving processors to normal operation.

[0056] Referring now to Figure 4, a block diagram of an example of a configuration for operating system code patching during live migration in accordance with an exemplary embodiment is shown. Specifically, Figure 4 shows further details of module 320 of Figure 3.

[0057] The enter standby state module 410 broadcasts a message to one or more other processors located in the migrated system, placing the receiving processor in a standby state. After broadcasting, the acknowledgement module 420 waits for the other processors located in the migrated system to acknowledge the broadcast message. The processor's acknowledgement indicates that the processor is in a standby state, preventing access to other parts of the operating system that may be being modified. The leave standby state message module 430 then broadcasts a second message to the idle processor to return the receiving processor to normal operation.

[0058] 5, which is an example timing diagram of message flows during operating system code patching during live migration according to an example embodiment. Application 300 is the same as application 300 of FIG.

[0059] Application 300 is a process executing in processor 502. In state 510, application 300 determines that a live migration has occurred and that some of the operating system code needs to be modified due to changes in hardware characteristics. In state 512, application 300 begins to put all other processors in the live migrated system into a wait state by broadcasting message 520 to the other processors. Alternatively, application 300 sends another version of message 520 to each of the other processors that are to be put into a wait state. Message 520 is received by message handler 530 executing in processor 504. Processor 504 is an example of a set of other processors that are to be put into a wait state. Specifically, in state 532, message handler 530 receives message 520, and in state 534, message handler 530 sends message 522 back to application 300, which is an acknowledgment. Then, in state 536, message handler 530 waits for a second message. In state 514, application 300 receives message 522 and, once all processors have acknowledged message 520, modifies the operating system code to adapt to the change in hardware characteristics. Then, in state 516, application 300 broadcasts message 524 to processor 504 where message handler 530 waits in state 536. Message handler 530 receives message 524 and proceeds to state 538 where message handler 530 exits the message handler and returns processor 504 to normal operation. This example is not intended to be limiting. Specifically, intervening messages may occur between messages 520 and 522 and between messages 522 and 524.Similarly, if message 522 is not sent, or is sent but not successfully received, application 300 can be configured to include an error handling sequence (not shown) that either resends message 520 or causes the operating system modification process to abort without sending message 524. Additionally, the error handling sequence can be performed on a per-processor basis or for all processors that were originally sent message 520.

[0060] 6, which is a flow chart of an example of a process for operating system code patching during live migration in accordance with an exemplary embodiment. Process 600 may be implemented in application 300 of FIG. 3 or FIG. 5.

[0061] At block 602, the application detects that a live migration is occurring that changes a hardware characteristic of the computer system. At block 604, the application broadcasts a first message to a set of processors, causing each processor in the set to enter a wait state. At block 606, the application waits until all processors acknowledge the first message. At block 608, the application modifies a portion of the set of program instructions of the operating system to adapt to the change in hardware characteristic. At block 610, the application broadcasts a second message to the set of processors, causing the set of processors to exit the wait state. The application then terminates.

[0062] 7, which is a flow chart of an example of a process for operating system code patching during live migration in accordance with an illustrative embodiment. Process 700 may be implemented within message handler 530 executing within processor 504 of FIG.

[0063] At block 702, the process receives a first message that instructs the message handler to wait for a second message. At block 704, the process acknowledges the first message. At block 706, the process waits until a second message is received. Then ("YES" at block 706), the process ends.

[0064] Thus, computer-implemented methods, systems or apparatus, and computer program products are provided in exemplary embodiments for live migration and other related features, functions, or on-the-fly operating system code patching. Where an embodiment, or portions thereof, is described with respect to a type of device, computer-implemented method, system or apparatus, computer program product, or portions thereof, is adapted or configured for use with that type of device, as appropriate and equivalent terms.

[0065] Where an embodiment is described as being implemented in an application, delivery of the application in a software as a service (SaaS) model is contemplated within the scope of the exemplary embodiments. In a SaaS model, the capabilities of the application implementing the embodiment are provided to a user by executing the application in a cloud infrastructure. The user may access the application with a variety of client devices through a thin-client interface, such as a web browser (e.g., web-based email) or other light-client application. The user does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, or storage of the cloud infrastructure. In some cases, the user may not even manage or control the capabilities of the SaaS application. In other cases, the SaaS implementation of the application may allow for possible exceptions to limited user-specific application configuration settings.

[0066] The present invention may be a system, method, or computer program product, or combination thereof, at any possible level of technical detail integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to perform aspects of the present invention.

[0067] A computer readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer readable storage media includes portable computer diskettes, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), static random access memories (SRAM), portable compact disk read-only memories (CD-ROM), digital versatile disks (DVDs), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge-in-groove structures having instructions recorded thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, should not be construed as being themselves transitory signals such as electric waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses through a fiber optic cable), or electrical signals transmitted over wires.

[0068] The computer readable program instructions described herein can be downloaded from a computer readable storage medium to each computing / processing device or to an external computer or storage device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network can include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and sends the computer readable program instructions for storage in a computer readable storage medium in each computing / processing device.

[0069] The computer readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk, C++, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or partially on the remote computer or entirely on the remote computer. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, a field programmable gate array (FPGA), or a programmable logic array (PLA), may execute computer readable program instructions according to state information of the computer readable program instructions to implement aspects of the invention.

[0070] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0071] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to generate a machine such that the instructions, executed via the processor of the computer or other programmable data processing apparatus, generate means for implementing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions may also be stored on a computer readable storage medium that can cause a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, and thus a computer readable storage medium having instructions stored therein may include an article of manufacture including instructions that implement aspects of the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0072] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device such that the instructions, which execute on the computer, other programmable apparatus, or other device, implement the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams, causing a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce a computer-implemented process.

[0073] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block of the flowcharts or block diagrams may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing the specified logical function. In some alternative embodiments, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowchart illustrations, as well as combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that performs the specified functions or operations or implements a combination of dedicated hardware and computer instructions.

Claims

1. Detecting that a live migration is occurring by executing program instructions for a process of an operating system, the live migration including a change in hardware characteristics of a computer system on which the process executes; broadcasting a first message to a set of processors, the first message causing each processor in the set to enter a wait state; while each of said set of processors is in a wait state, modifying a portion of said set of program instructions of said operating system; 23. A computer-implemented method comprising:

2. 2. The computer-implemented method of claim 1, wherein the wait state comprises a state in which no processor in the set of processors is executing a user process.

3. 3. The computer-implemented method of claim 1, wherein the wait state includes a state in which a processor in the set of processors executes a message handler process until the processor receives a second message to cause the processor to leave the wait state, the message handler process including a kernel process of the operating system.

4. receiving an acknowledgment of the first message from the set of processors, the acknowledgment determining that a processor in the set of processors is in the wait state; A computer implemented method according to any one of claims 1 to 3.

5. The computer-implemented method of any one of claims 1 to 4, wherein the modifying comprises adjusting the portion to account for changes in the hardware characteristics.

6. The computer-implemented method of claim 1 , wherein the change in hardware characteristics is a change in a processor version, and the modifying comprises adjusting the portion to accommodate the change in processor version.

7. broadcasting a second message to the set of processors after the modification, the second message causing the set of processors to exit the wait state. A computer-implemented method according to any one of claims 1 to 6.

8. 1. A computer system comprising one or more processors and one or more computer readable memories, the one or more processors configured to execute a method for code patching, the method comprising: Detecting that a live migration is occurring by executing program instructions for a process of an operating system, the live migration including a change in hardware characteristics of a computer system on which the process executes; broadcasting a first message to a set of processors causing each processor in the set to enter a wait state; while each of said set of processors is in a wait state, modifying a portion of said set of program instructions of said operating system; 1. A computer system comprising:

9. 9. The computer system of claim 8, wherein the wait states include states in which no processor in the set of processors is executing a user process.

10. 10. The computer system of claim 8 or 9, wherein the wait state includes a state in which a processor in the set of processors executes a message handler process until the processor receives a second message to cause the processor to leave the wait state, the message handler process including a kernel process of the operating system.

11. 11. The computer system of claim 8, wherein the method further comprises receiving an acknowledgment of the first message from the set of processors, the acknowledgment establishing that a processor in the set of processors is in the wait state.

12. 12. The computer system of claim 8, wherein the modifying comprises adjusting the portion to account for changes in the hardware characteristics.

13. 13. The computer system of claim 8, wherein the change in hardware characteristics is a change in a processor version, and the modifying comprises adjusting the portion to accommodate the change in processor version.

14. 14. The computer system of claim 8, wherein the method further comprises broadcasting a second message to the set of processors after the modification, the second message causing the set of processors to exit the wait state.

15. A computer program product causing a computer to carry out the method according to any one of claims 1 to 7.

16. A computer-readable recording medium having recorded thereon a computer program for causing the method according to any one of claims 1 to 7 to be performed.

Citation Information

Patent Citations

  • Multiprocessor system

    JP2004342014A

  • Migration processing program, information processing apparatus, and computer readable recording medium storing computer system and transfer processing program

    JP2006190141A

  • Exception processing method, program, and device

    JP2013191089A

  • Computer programs, products, methods, and systems for monitoring processor characteristic information of a processor using runtime instrumentation (Runtime Instrumentation Monitoring of Processor Characteristics)

    JP2015515652A

  • Method and system for detecting virtual machine migration

    US20150032836A1