WO2016013086A1 - 計算機システムおよびメモリ割当管理方法 - Google Patents

計算機システムおよびメモリ割当管理方法 Download PDF

Info

Publication number
WO2016013086A1
WO2016013086A1 PCT/JP2014/069597 JP2014069597W WO2016013086A1 WO 2016013086 A1 WO2016013086 A1 WO 2016013086A1 JP 2014069597 W JP2014069597 W JP 2014069597W WO 2016013086 A1 WO2016013086 A1 WO 2016013086A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
cache
state
cache state
virtual
Prior art date
Application number
PCT/JP2014/069597
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 US15/112,740 priority Critical patent/US10013358B2/en
Priority to PCT/JP2014/069597 priority patent/WO2016013086A1/ja
Publication of WO2016013086A1 publication Critical patent/WO2016013086A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1021Hit rate improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1041Resource optimization
    • G06F2212/1044Space efficiency improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/15Use in a specific computing environment
    • G06F2212/152Virtualized environment, e.g. logically partitioned system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/608Details relating to cache mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/657Virtual address space management

Definitions

  • the present invention relates to a technique for managing memory allocation to virtual machines.
  • an operation system (OS) operating on a computer adjusts memory allocation to improve memory use efficiency.
  • OS operation system
  • the OS selects two unit areas from the memory area recognized by itself, and compares the data of the selected two unit areas with each other. If the two unit areas have the same data, the OS determines that the two unit areas have overlap, and merges the two unit areas. This improves the memory usage efficiency.
  • Non-Patent Document 1 the process of comparing a plurality of memory areas with each other places a high load on the CPU. Therefore, executing the deduplication process may affect the performance of other processes.
  • the deduplication process continues to affect the performance of other processes for a long time.
  • An object of the present invention is to provide a technique for efficiently using a memory area while suppressing a processing load.
  • a computer system includes a physical resource including a memory, a virtualization mechanism that provides a virtual machine to which the physical resource is allocated, and a cache state management mechanism that manages a cache state of the virtual machine And the virtualization mechanism provides a first virtual machine and a second virtual machine, and the cache state management mechanism manages respective cache states of the first virtual machine and the second virtual machine, When the cache state management mechanism detects the cache state transition, the virtualization mechanism is identical to the memory area allocated to the cache of the first virtual machine and the memory area allocated to the cache of the second virtual machine. If there is an overlapping area for holding data, one of the first virtual machine and the second virtual machine To release the overlapping area of.
  • the processing for checking the presence / absence of an overlapping region is performed, so the load of the processing for checking the presence / absence of an overlapping region Can be efficiently eliminated without causing wasteful generation.
  • 10 is a flowchart of write processing by a virtual computer I 140 and a virtual computer U 160. It is a flowchart of the process with respect to IO request issued from the virtual machine U160. It is a flowchart of the cache release process in the virtual machine I 140 and the virtual machine U 160. It is a flowchart which shows the process which cancels
  • FIG. 1 is a block diagram of a computer system according to the first embodiment.
  • the computer system includes a physical resource 110, a virtualization mechanism 120, a virtual computer I 140, and a virtual computer U 160.
  • FIG. 1 shows an example in which there is one virtual machine U 160, any number of virtual machines U 160 may be used.
  • the physical resource 110 includes a CPU 111, a memory 112, and a device 113.
  • the physical resource 110 may be configured such that the CPU 111, the memory 112, and the device 113 are stored in one housing, or may be stored separately in a plurality of housings.
  • the virtualization mechanism 120 is a mechanism for managing the virtual machine I 140 and the virtual machine U 160 and allocating the physical resources 110 to the managed virtual machine I 140 and the virtual machine U 160.
  • the virtualization mechanism 120 includes a memory allocation management mechanism 123 and a memory allocation table 124, for example.
  • the memory allocation management mechanism 123 is a mechanism for allocating memory to the virtual machine I 140 and the virtual machine U 160.
  • the memory allocation table 124 stores information on the status of memory allocation to the virtual machine I 140 and the virtual machine U 160, respectively.
  • the virtualization mechanism 120 has a device allocation management mechanism 126 and a device allocation table 127.
  • the device allocation management mechanism 126 is a mechanism for allocating the device 113 to the virtual computer I 140 and the virtual computer U 160.
  • the device allocation table 127 stores device allocation status information.
  • the virtualization mechanism 120 includes an IO notification mechanism 125, a cache state management mechanism 121, and a cache state table 122.
  • the IO notification mechanism 125 notifies the virtual machine I 140 of the IO request issued by the virtual machine U 160.
  • the cache state management mechanism 121 manages the cache state of the virtual machine I 140 and the virtual machine U 160.
  • the cache status table 122 stores information on the cache status of the virtual machine I 140 and the virtual machine U 160.
  • the virtual machine U 160 is a virtual machine for application execution, and the virtual machine I 140 issues an IO request to the target device based on an IO request from the virtual machine U 160. It is a virtual machine for use. As described above, by separating the virtual machine for executing the application and the virtual machine for issuing the IO, it is possible to stably perform the IO execution without the influence of the application execution. Note that a plurality of virtual machines for application execution may be associated with one virtual machine for issuing an IO, and IO requests from a plurality of virtual machines for application may be assigned to one virtual machine for issuing an IO. .
  • a device recognized by the OS 170 of the virtual machine U 160 is a device recognized by the OS 150 of the virtual machine I 140 is a device based on the physical resource 110.
  • the virtual machine U 160 receives the IO request from the virtual machine U 160 because the virtual machine U 160 does not have a cache hit, and the virtual machine I 140 And the virtualization mechanism 120 notifies the target device of the IO request issued from the virtual machine I 140 because the cache hit has not occurred in the virtual machine I 140.
  • the virtual machine I 140 has a virtual CPU 131A, a virtual memory 132A, and a virtual device I 133 that are resources provided from the virtualization mechanism 120. These resources may be emulated by the virtualization mechanism 120, or may be those to which the physical resource 110 is directly assigned through the virtualization mechanism 120.
  • the OS 150 recognizes and operates the virtual CPU 131A, the virtual memory 132A, and the virtual device I 133.
  • the OS 150 includes an IO execution mechanism 138, a cache 135A, a cache management mechanism 136A, and a cache state notification mechanism 137A.
  • the IO execution mechanism 138 receives the IO request from the virtual machine U 160 and issues it to the virtual device I 133.
  • the cache 135A is a mechanism that holds IO data and improves IO performance.
  • the cache management mechanism 136A manages the cache 135A.
  • the cache state notification mechanism 137 notifies the virtualization mechanism 120 of a state change of the cache 135.
  • the virtual machine U 160 includes a virtual CPU 131, a virtual memory 132, and a virtual device U134 which are resources provided from the virtualization mechanism 120.
  • the virtual CPU 131 and the virtual memory 132 may be resources emulated by the virtualization mechanism 120, or may be those to which the physical resource 110 is directly allocated through the virtualization mechanism 120.
  • the virtual device U 134 is a resource emulated by the virtualization mechanism 120.
  • the OS 170 recognizes and operates the virtual CPU 131B, the virtual memory 132B, and the virtual device U 134.
  • the OS 170 includes an application 139, a cache 135B, a cache management mechanism 136B, and a cache state notification mechanism 137B.
  • the application 139 is software that provides various functions to the user, and issues an IO request according to processing.
  • the cache 135B is a mechanism that holds IO data and improves IO performance.
  • the cache management mechanism 136B manages the cache 135B.
  • the cache state notification mechanism 137 notifies the virtualization mechanism 120 of a state change of the cache 135B.
  • FIG. 2A shows a specific example of the cache status table 122
  • FIG. 2B shows a specific example of the memory allocation table 124
  • FIG. 2C shows a specific example of the device allocation table 127.
  • the cache state table 122 stores device ID 211, device address 212, computer ID 213, address U 214, address I 215, state U 216, and state I 217.
  • the device ID 211 is an identifier of the device 113.
  • the device address 212 is an identifier indicating a data storage position in the device 113 identified by the device ID 211.
  • the computer ID 213 is an identifier for identifying the virtual computer U 160 when the data is stored in the cache 135B of the virtual computer U 160.
  • the address U 214 is an identifier indicating a data storage position in the cache 135B of the virtual machine U 160.
  • the address I 215 is an identifier indicating a data storage position in the cache 135A when the data is stored in the cache 135A of the virtual machine I 140.
  • State U216 is the state of the cache identified by address U214.
  • State I 217 is the state of the cache identified by address I 215.
  • the cache can take three states: clean (C), dirty (D), and free (F).
  • the clean state is a state in which the IO corresponding to the data stored in the cache has been written to the device recognized by the OS. That is, the cache and device data match.
  • the dirty state is a state in which an IO corresponding to data stored in the cache has not been written to a device or the like recognized by the OS. That is, the cache and device data do not match.
  • the free state is a state where no data is stored in the cache.
  • the memory allocation table 124 stores a physical address 221, a computer ID 222, and an address 223.
  • the physical address 221 is an identifier indicating a data storage position in the memory 112.
  • the computer ID 222 is an identifier of a virtual machine to which a memory area is allocated. In the following description, the computer ID for identifying the virtual computer I 140 is “1”.
  • the address 223 is an identifier of the memory area identified by the physical address 221 recognized by the virtual machine.
  • the device allocation table 127 stores a device ID 231, a computer ID 232, and a virtual device ID 233.
  • the device ID 231 is an identifier of the device 113.
  • the computer ID 232 is an identifier for identifying the virtual computer to which the device 113 identified by the device ID 231 is assigned.
  • the virtual device ID 233 is an identifier of the device 113 identified by the device ID 231 recognized by the virtual computer.
  • the left box shows the state of the virtual machine U 160
  • the right side of the right box shows the state of the virtual machine I 140.
  • F indicates a free state
  • C indicates a clean state
  • D indicates a dirty state.
  • the virtual machine U 160 is in a clean state
  • the data in the cache of the virtual machine U 160 matches the data in the cache of the virtual machine I 140.
  • the virtual machine I 140 is in a clean state, it can be said that the data in the cache of the virtual machine I 140 matches the data in the device emulated by the virtualization mechanism 120 or the device by the physical resource 110.
  • the boxes are hatched because the data in the cache of the virtual machine U 160 matches the data in the cache of the virtual machine I 140, so the virtual machine U 160 This indicates that it is possible to perform the process of releasing the cache and eliminating the duplication of data.
  • solid arrows indicate state transitions triggered by reads
  • dashed-dotted arrows indicate cache state transitions triggered by writes
  • broken arrows indicate states triggered by destage.
  • An arrow of a two-dot chain line represents a state transition triggered by free.
  • the trigger for the cache state transition is also referred to as a state transition trigger.
  • FIG. 3 shows the state transition of the cache 135 caused by the state transition trigger generated in the virtual machine U 160.
  • the cache state of the virtual machine U 160 is clean (311), and the cache state of the virtual machine I 140 is clean (312).
  • the caches of the virtual machine U 160 and the virtual machine I 140 are in a state where deduplication can be performed.
  • Deduplication is to release one of the areas when the same data is held in multiple areas of the physical memory, and the same data is held for the virtual machine address associated with that area. This is a process for improving the utilization efficiency of the physical memory by changing the association to another area.
  • the cache state 310 In the cache state 310, the data in the cache 135B of the virtual machine U 160 and the data in the cache 135A of the virtual machine I 140 match, so the area of the memory 112 of the physical resource 110 corresponding to the cache 135B and the memory corresponding to the cache 135A In the area 112, the same data is held. Therefore, it can be said that the cache state 310 can be deduplicated.
  • the cache state 310 transitions to the cache state 320. That is, the cache state of the virtual machine U 160 is dirty (321), and the cache state of the virtual machine I 140 is clean (322).
  • the virtual machine U 160 and the virtual machine I 140 cache state are in a state where deduplication is impossible. This is because the data in the cache 135B of the virtual machine U 160 and the data in the cache 135A of the virtual machine I 140 do not match.
  • the write request issued by the virtual machine U 160 is notified to the IO execution mechanism 138 of the virtual machine I 140 via the IO notification mechanism 125 of the virtualization mechanism 120. This process is called destage.
  • Destage is one of state transition triggers. Due to the destage, the cache state 320 transitions to the cache state 330. That is, the cache state of the virtual machine U 160 is clean (331), and the cache state of the virtual machine I 140 is dirty (332). In the cache state 330, the caches of the virtual machine U 160 and the virtual machine I 140 can be deduplicated. This is because the data in the cache 135B of the virtual machine U 160 and the data in the cache 135A of the virtual machine I 140 match.
  • FIG. 4 shows a state transition of the cache 135 caused by a state transition trigger generated in the virtual machine I 140.
  • the cache state of the virtual machine U 160 is clean (411), and the cache state of the virtual machine I 140 is dirty (412).
  • the cache 135 of the virtual machine U 160 and the virtual machine I 140 is in a state where deduplication is possible. This is because the data in the cache 135B of the virtual machine U 160 and the data in the cache 135A of the virtual machine I 140 match.
  • the virtual machine I 140 issues the IO request received from the virtual machine U 160 to the virtual device I 133 at a predetermined timing. This process is called destage.
  • Destage is one of state transition triggers.
  • Transition from the cache state 410 to the cache state 420 occurs due to destage. That is, the cache state of the virtual machine U 160 is clean (421), and the cache state of the virtual machine I 140 is clean (422). Even in the cache state 420, the cache 135 of the virtual machine U 160 and the virtual machine I 140 is in a state where deduplication is possible.
  • the virtual machine I 140 When an event such as a shortage of unused memory area occurs in the virtual machine I 140, the virtual machine I 140 performs a process of releasing the memory area of the cache 135A and expanding the unused memory area. This process is called free. Free is one of state transition triggers.
  • Transition from the cache state 420 to the cache state 430 due to free That is, the cache state of the virtual machine U 160 is clean (431), and the cache state of the virtual machine I 140 is free (432).
  • the cache state 430 the caches of the virtual machine U 160 and the virtual machine I 140 are in a state where deduplication is impossible. This is because the virtual machine I 140 is in a state where no data is stored in the cache 135A.
  • FIG. 5 is a flowchart of IO processing in the virtual machine I 140 and the virtual machine U 160.
  • This process is executed when an IO request is generated by the application 139 in the virtual machine U 160 and the IO execution mechanism 138 receives the IO request in the virtual machine I 140.
  • the cache management mechanism 136 receives an IO request issued from the application 139 or transmitted from the IO execution mechanism 138 (step 501).
  • the cache status management mechanism 121 of the virtualization mechanism 120 is notified of the address for identifying the location of the cache and the fact that the cache status becomes dirty (step 503).
  • the cache management mechanism 136 stores data in the cache 135 (step 504).
  • the cache management mechanism 136 notifies the application 139 or the IO execution mechanism 138 that the write request has been completed (step 505).
  • the cache state change notification to the cache state management mechanism 121 may be made after the cache state has actually changed.
  • step 502 if it is determined in step 502 that the IO request received by the cache management mechanism 136 is a read request (the route of the read request in step 502), the cache management mechanism 136 determines that the data requested by the read request is the cache 135. Whether or not a cache hit occurs is checked (step 506).
  • the cache management mechanism 136 When a cache hit occurs (step 506), the cache management mechanism 136 notifies the application 139 or the IO execution mechanism 138 of the completion of the read request (step 511).
  • the cache management mechanism 136 causes the virtual device I 133 to generate this IO request if the IO request is generated in the virtual computer I 140, and causes the IO processing to occur in the virtual computer U 160. If yes, a read request is issued to the virtual device U 134 (step 507). The virtual device I 140 or the virtual device U 160 that has received the read request performs the read request and acquires the data (step 508). The cache management mechanism 136 stores the acquired data in the cache 135 (step 509).
  • FIG. 6 is a flowchart of write processing by the virtual machine I 140 and the virtual machine U 160.
  • the write process is a process of writing cache data to a device corresponding to the cache from the dirty state. By this processing, the cache that has been in a dirty state becomes a clean state. This process is performed when a certain time or more has passed since the previous write process, when a certain number of caches are in a dirty state, or when a user gives an instruction.
  • the cache management mechanism 136 checks whether or not the cache 135 to be managed is in a dirty state. If the cache is not in the dirty state, the cache management mechanism 136 ends the process as it is (step 601).
  • the cache 135 When the cache 135 is in a dirty state (step 601), the virtual machine I 140 is processed by the virtual machine I 140, the virtual device I 133 is processed, and the virtual machine U 160 is processed by the virtual machine U 134. Then, a write request for requesting data writing is issued (step 602).
  • the cache status notification mechanism 137 has a virtual device ID and device address for identifying the IO issue target device, an address for identifying the location on the cache where the data corresponding to the area is stored, and the cache.
  • the cache state management mechanism 121 of the virtualization mechanism 120 is notified that the state is clean (step 603).
  • FIG. 7 is a flowchart of processing for an IO request issued from the virtual machine U 160.
  • a process for an IO request is called an IO process, and the IO process is a read process or a write process.
  • the read process here is the process of step 508 in FIG. 5, and the write process is the process of step 602 in FIG.
  • the IO notification mechanism 125 on the virtualization mechanism 120 receives the IO request (step 701).
  • the IO notification mechanism 125 that has received the IO request notifies the IO execution mechanism 138 of the virtual machine I 140 of the IO request (step 702).
  • the virtual machine I 140 processes the IO request according to the flowchart of FIG. 5 (step 703).
  • the virtual computer I 140 notifies the virtualization mechanism 120 of the completion of the IO processing from the IO execution mechanism 138 as a result of the processing of FIG.
  • the IO notification mechanism 125 of the virtualization mechanism 120 receives the completion of the IO processing from the IO execution mechanism 138 of the virtual machine I 140 (step 704).
  • the IO notification mechanism 125 notifies the virtual device U 134 of completion of the IO processing (step 705).
  • FIG. 8 is a flowchart of the cache release process in the virtual machine I 140 and the virtual machine U 160. This process is a process of releasing the currently used cache and expanding the unused memory area when the unused memory area is insufficient in the virtual machine I 140 and the virtual machine U 160.
  • the cache management mechanism 136 checks the cache state of the cache 135 to be managed, and determines whether it is a clean state or a dirty state (step 801).
  • the cache management mechanism 136 ends the process as it is (route in the dirty state in Step 801).
  • the cache state notification mechanism 137 notifies the cache state management mechanism 121 of the virtualization mechanism 120 that the address of the cache 135 and that the state of the cache 135 have changed to free (step). 802). In addition, the cache management mechanism 136 releases the cache 135 (step 803).
  • FIG. 9 is a flowchart showing memory deduplication and processing for releasing the deduplication. This process is performed when a cache state transition is notified from the cache state notification mechanism 137 of the virtual machine I 140 or the virtual machine U 160 to the cache state management mechanism 121 of the virtualization mechanism 120.
  • the cache state management mechanism 121 receives a notification of a change in the cache state of the virtual machine U 160 or the virtual machine I 140 from the cache state notification mechanism 137 of the virtual machine I 140 or the virtual machine U 160 (step 901).
  • the cache state management mechanism 121 updates the cache state table 122 (step 902).
  • the cache state management mechanism 121 is identified by the address I 215 of the virtual machine I 140 It is determined that the data stored in the area and the area identified by the address U 214 of the virtual machine U 160 identified by the device address 212 are different (non-overlapping state).
  • Step 903 the cache storing the data of the virtual machine I140 and the cache storing the data of the virtual machine U160 are stored. Then, deduplication processing is performed.
  • an IO request is notified from the virtual machine U 160 to the IO notification mechanism 125 of the virtualization mechanism 120, and an IO request is notified from the IO notification mechanism 125 to the IO execution mechanism 138 of the virtual machine I 140.
  • IO processing is performed in the virtual machine I 140.
  • the cache of the virtual machine U 160 becomes clean and the cache of the virtual machine I 140 becomes dirty.
  • the cache state at this time is the cache state 330 of FIG.
  • the cache state management mechanism 121 acquires from the cache state table 122 the computer ID for identifying the virtual machine U 160 that holds the cache to be deduplicated and the address U of the identifier of the cache in the virtual machine U 160.
  • the cache state management mechanism 121 acquires the address I, which is the identifier of the cache in the virtual machine I 140, from the cache state table 122.
  • the computer ID 222 in the memory allocation table 124, and the acquired address I 215 and the address 223 of the memory allocation table are compared, and the cache The physical address corresponding to 135 is acquired as indicating the object of deduplication (step 905).
  • the memory allocation management mechanism 123 changes the physical address of the virtual machine U 160 acquired in step 904 to the physical address of the virtual machine I 140 acquired in step 905 in the memory allocation table 124 (step 906).
  • the same physical address is assigned to both the virtual machine U 160 and the virtual machine I 140.
  • step 903 the deduplication from the state where the deduplication of the corresponding areas of the virtual machine I 140 and the virtual machine U 160 is performed is performed. Is released.
  • the IO process (read) shown in FIG. 5 is performed in the virtual machine U 160, the cache of the virtual machine U 160 is clean, and the cache of the virtual machine I 140 is clean.
  • the cache state management mechanism 121 notifies the cache management mechanism 136 of the virtual machine U 160 and acquires an address for identifying an area whose state is free from the cache held by the virtual machine U 160 (step 908).
  • the memory allocation management mechanism 123 compares the computer ID for identifying the virtual machine U 160 to be notified in step 908 and the acquired address with the computer ID 222 and the address 223 of the memory allocation table 124, respectively.
  • the physical address to which the address is assigned is acquired, and the row is deleted from the memory assignment table (step 909).
  • the virtualization mechanism 120 allocates to the cache 135B of the virtual machine U 160 (first virtual machine) at the timing when the cache state management mechanism 121 detects the cache state transition. If there is an overlapping area that holds the same data in the allocated memory area and the memory area assigned to the cache 135A of the virtual machine I 140 (second virtual machine), one of the virtual machine U 160 and the virtual machine I 140 Free the overlap area. In this embodiment, the overlapping area of the virtual machine U 160 is released. According to this, when the cache state transition that may change the presence or absence of the overlapping area is detected, the process for checking the presence or absence of the overlapping area is executed, so the timing for checking the presence or absence of the overlapping area is efficiently limited. Can do. As a result, duplication can be efficiently eliminated without causing unnecessary processing load.
  • the virtual machine U 160 is a virtual machine for application execution, and the virtual machine I 140 issues an IO request based on the IO request from the virtual machine U 160 to the target device. Issuing virtual machine.
  • the virtualization mechanism 120 notifies the virtual machine I 140 of the IO request issued by the virtual machine U 160 and notifies the target device of the IO request from the virtual machine I 140. If there is an overlapping area, the virtualization mechanism 120 releases the overlapping area of the virtual machine U 160 and allocates the overlapping area of the virtual machine I 140 to the cache of the virtual machine U 160 as well.
  • the virtual machine U for executing the application when there is an overlapping area in the computer system configured to share the roles of the virtual machine U 160 for executing the application and the virtual machine I 140 for issuing the IO to the device, the virtual machine U for executing the application The overlapping area of 160 is released.
  • the configuration in which one virtual machine U for application execution is operated has been described.
  • a plurality of virtual machines U may be operated, and an IO request from a plurality of virtual machines U can be handled by one virtual machine U.
  • the computer I may be in charge.
  • the virtual machine I is required to have higher reliability than the virtual machine U because the virtual machine I performs an IO request of a plurality of virtual machines U.
  • this mechanism it is possible to ensure the safety of the operation of the virtual machine I 140 for issuing the IO.
  • the virtualization mechanism 120 also has a clean cache state of the virtual machine U 160 and the virtual machine I 140, or a clean state of the virtual machine U 160 and a clean cache state of the virtual machine I 140.
  • the virtualization mechanism 120 determines that there is an overlapping area. According to this, the presence / absence of an overlapping area can be easily and correctly determined based on the cache state.
  • the cache state management mechanism 121 uses the virtual machine U 160 or the virtual machine I 140 to read data, write data, destage to notify cache data to the back-end device, and free the cache.
  • a cache state transition is detected. According to this, it is possible to easily and reliably detect a cache state transition with the occurrence of an event causing a cache state transition as a trigger.
  • the cache state of the virtual machine U 160 and the virtual machine I 140 are both clean, or when the cache state of the virtual machine U 160 is clean and the cache state of the virtual machine I 140 is dirty, the state is duplicated.
  • the cache state of the virtual machine U 160 and the virtual machine I 140 is other than that, the non-overlapping state is assumed.
  • the cache state management mechanism 121 detects a transition of the cache state, the virtualization mechanism 120 releases the overlapping area of the virtual machine U 160 if the transition is made from the non-overlapping state to the overlapping state, and the virtual machine I 140 overlaps. The area is also allocated to the cache of the virtual machine U 160.
  • FIG. 10 is a flowchart of a memory allocation process that is executed when the OS 170 is activated on the virtual machine U 160.
  • step 1001 When the OS 170 is started on the virtual machine U 160 (step 1001), first, the device allocation management mechanism 126 on the virtualization mechanism 120, the device ID that is the identifier of the device to be allocated from the virtual machine U 160 to the virtual machine U 160 and A virtual device ID that is an identifier of the device in the virtual machine U 160 is received (step 1002).
  • the device allocation management mechanism 126 updates the device allocation table 127 (step 1003).
  • the device allocation management mechanism 126 determines whether or not the information corresponding to the device ID received in Step 1002 is stored in the cache state table 122 (Step 1004).
  • step 1002 If the information corresponding to the device ID received in step 1002 is not stored in the cache state table 122, the processing in FIG.
  • the device allocation management mechanism 126 refers to the cache status table 122 and the memory allocation table 124 and stores the information.
  • the cache state management mechanism 121 notifies the cache information allocated in step 1007 to the cache management mechanism 136B of the virtual machine U 160 (step 1008).
  • the cache state management mechanism 121 holds the cache state information of the virtual machine U 160 in the cache state table 122, and when the OS 170 of the virtual machine U 160 starts up, the virtualization is performed.
  • the mechanism 120 restores the cache 135B of the virtual machine U 160 based on the information held in the cache state table 122.
  • the cache 135B is restored based on the cache state table 122 when the OS 170 is activated, so that the cache 135B can be used effectively immediately after the OS 170 is activated.
  • the second embodiment is different from the first embodiment in the configuration of the portion corresponding to the virtualization mechanism 120 of the first embodiment.
  • the difference between the second embodiment and the first embodiment will be mainly described.
  • FIG. 11 is a block diagram of a computer system according to the second embodiment.
  • a portion corresponding to the virtualization mechanism 120 in the first embodiment is divided into a virtualization mechanism 120A, a virtualization mechanism agent 180, and a nonvolatile area 190.
  • the virtualization mechanism 120A includes a cache state management mechanism 121, a cache state table 122, a memory allocation management mechanism 123, an IO notification mechanism 125, a device allocation management mechanism 126, and a device allocation table 127.
  • the virtualization mechanism agent 180 is equipped with a memory allocation agent 181.
  • the memory allocation agent 181 extracts a part for managing the memory allocation to the virtual machine I 140 from the functions for managing the memory allocation of the virtualization mechanism 120 of the first embodiment.
  • the nonvolatile area 190 the memory allocation table 124 included in the virtualization mechanism 120 of the first embodiment is mounted.
  • the memory allocation agent 181 of the virtualization mechanism agent 180 separated from the virtualization mechanism 120A and the memory allocation table 124 in the nonvolatile area 190 Therefore, the state information of the memory allocation to the virtual machine I 140 by the virtualization mechanism agent 180 can be maintained. Therefore, even if a failure occurs in the virtual machine U 160 or the virtualization mechanism 120A, the normal operation of the virtual machine I 140 that is used by one or more virtual machines U 160 and is in charge of processing the IO request is maintained. can do.
  • a failure may occur in the virtualization mechanism 120A, and the cache state management mechanism 121 and the cache state table 122 may become inaccessible.
  • the memory usage is reduced by assigning the physical address assigned to the virtual machine I 140 to the virtual machine U 160 as well.
  • the cache state management mechanism 121 and the cache state table 122 cannot be accessed, and the memory allocation state to the virtual machine U 160 cannot be managed. For this reason, the operation of the virtual machine U 160 is not guaranteed.
  • the virtual machine U 160 is a virtual machine for application execution, and the virtual machine I 140 receives an IO request from the virtual machine U 160.
  • This is a virtual machine for issuing an IO that issues an IO request based on the above to a target device.
  • the memory allocation agent 181 that is a mechanism for managing the memory allocation of the virtual machine I 140 is configured independently of the other mechanisms (the virtualization mechanism 120A). According to this, since the mechanism for managing the memory allocation of the virtual machine I 140 is independent, even if a fault occurs in the virtual machine U 160 or a mechanism that realizes other functions, the operation of the virtual machine I 140 can be performed. Can be maintained.
  • SYMBOLS 110 Physical resource 111 ... CPU, 112 ... Memory, 113 ... Device, 120 ... Virtualization mechanism, 120A ... Virtualization mechanism, 121 ... Cache state management mechanism, 122 ... Cache state table, 123 ... Memory allocation management mechanism, 124 ... Memory allocation table, 125 ... IO notification mechanism, 126 ... Device allocation management mechanism, 127 ... Device allocation table, 131 ... Virtual CPU, 132 ... Virtual memory, 134 ... Virtual device U, 135 ... Cache, 136 ... Cache management mechanism, 137 ... Cache state notification mechanism, 138 ... IO execution mechanism, 139 ... Application, 140 ... Virtual machine I, 150 ... OS, 160 ... Virtual machine U, 170 ... OS, 180 ... Virtualization mechanism agent, 181 ... Memory allocation agent, 190 ... non-volatile area

Abstract

 計算機システムは、メモリを含む物理リソースと、前記物理リソースを割り当てた仮想計算機を提供する仮想化機構と、前記仮想計算機のキャッシュ状態を管理するキャッシュ状態管理機構と、を有し、前記仮想化機構は第1仮想計算機と第2仮想計算機を提供し、前記キャッシュ状態管理機構は前記第1仮想計算機と前記第2仮想計算機のそれぞれのキャッシュ状態を管理し、前記キャッシュ状態管理機構が前記キャッシュ状態の遷移を検出すると、前記仮想化機構が、前記第1仮想計算機のキャッシュに割り当てられたメモリ領域と前記第2仮想計算機のキャッシュに割り当てられたメモリ領域に同一データを保持する重複領域があれば、前記第1仮想計算機と前記第2仮想計算機のいずれか一方の前記重複領域を解放する。

Description

計算機システムおよびメモリ割当管理方法
 本発明は、仮想計算機へのメモリ割り当てを管理する技術に関する。
 コンピュータ上で動作するオペレーションシステム(OS)がメモリの割り当てを調整し、メモリの使用効率を向上させるという技術が知られている。例えば、非特許文献1に開示された重複排除技術では、OSは、自身が認識するメモリ領域から2つの単位領域を選択し、選択した2つの単位領域のデータを互いに比較する。2つの単位領域が同一のデータを保有している場合、OSは、その2つの単位領域に重複があると判断し、その2つの単位領域をマージする。これにより、メモリの使用効率が向上する。
Andrea Arcangeli, Izik Eidus, Chris Write, "Increasing memory density by using KSM", In Linux Symposium 2009,p―19-28
 非特許文献1に開示されているような重複排除技術において、複数のメモリ領域を互いに比較する処理はCPUへの負荷が高い。そのため、重複排除処理を実行することで他の処理の性能に影響を与えてしまうことがある。
 また、マージする可能性のあるメモリ領域、すなわち比較するメモリ領域が拡大すると、メモリ領域を比較する処理に長時間を要する。その結果、重複排除処理が長時間にわたって他の処理の性能に影響を与え続けることとなる。
 これらの理由から重複排除処理は頻繁に実施することができず、そのためメモリ領域が効率よく利用されていない時間が長くなるという問題があった。
 本発明の目的は、処理負荷を抑えつつメモリ領域を効率よく利用する技術を提供することである。
 上記課題を解決するための一態様による計算機システムは、メモリを含む物理リソースと、前記物理リソースを割り当てた仮想計算機を提供する仮想化機構と、前記仮想計算機のキャッシュ状態を管理するキャッシュ状態管理機構と、を有し、前記仮想化機構は第1仮想計算機と第2仮想計算機を提供し、前記キャッシュ状態管理機構は前記第1仮想計算機と前記第2仮想計算機のそれぞれのキャッシュ状態を管理し、前記キャッシュ状態管理機構が前記キャッシュ状態の遷移を検出すると、前記仮想化機構が、前記第1仮想計算機のキャッシュに割り当てられたメモリ領域と前記第2仮想計算機のキャッシュに割り当てられたメモリ領域に同一データを保持する重複領域があれば、前記第1仮想計算機と前記第2仮想計算機のいずれか一方の前記重複領域を解放する。
 本発明の一態様によれば、重複領域の有無が変わる可能性のあるキャッシュ状態の遷移が検出されたときに重複領域の有無を調べる処理を実行するので、重複領域の有無を調べる処理の負荷を無駄に発生させることなく、効率よく重複を解消することができる。
第1の実施例にかかる計算機システムのブロック図である。 キャッシュ状態テーブル122の具体例を示す図である。 メモリ割当テーブル124の具体例を示す図である。 デバイス割当テーブル127の具体例を示す図である。 デバイス113において装置アドレス=1で識別される領域に格納されたデータに対応する仮想計算機I 140のキャッシュ135Aおよび仮想計算機U 160のキャッシュ135B上のデータの状態遷移を示す図である。 デバイス113において装置アドレス=1で識別される領域に格納されたデータに対応する仮想計算機I 140のキャッシュ135Aおよび仮想計算機U 160のキャッシュ135B上のデータの状態遷移を示す図である。 仮想計算機I 140および仮想計算機U 160におけるIO処理のフローチャートである。 仮想計算機I 140および仮想計算機U 160によるライト処理のフローチャートである。 仮想計算機U 160から発行されるIO要求に対する処理のフローチャートである。 仮想計算機I 140および仮想計算機U 160におけるキャッシュ解放処理のフローチャートである。 メモリの重複排除およびその重複排除を解除する処理を示すフローチャートである。 仮想計算機U 160上でOS170の起動が発生したときに実行されるメモリ割り当て処理のフローチャートである。 第2の実施例かかる計算機システムのブロック図である。
 図面を参照して、本発明の実施の形態に係る実施例の構成および機能等について説明する。
 図1は、第1の実施例にかかる計算機システムのブロック図である。
 計算機システムは、物理リソース110、仮想化機構120、仮想計算機I 140および仮想計算機U 160で構成される。図1では仮想計算機U 160が1つである例を示しているが、1つ以上あれば、幾つであってもよい。
 物理リソース110は、CPU111、メモリ112およびデバイス113を有する。物理リソース110は、CPU111、メモリ112およびデバイス113が1つの筐体に格納される構成であってもよいし、複数の筐体に分けて格納されていても構わない。
 仮想化機構120は、仮想計算機I 140および仮想計算機U 160を管理し、その管理している仮想計算機I 140および仮想計算機U 160に物理リソース110の割当を行なう機構である。
 仮想化機構120は、例えば、メモリ割当管理機構123およびメモリ割当テーブル124を有する。メモリ割当管理機構123は、仮想計算機I 140および仮想計算機U 160にメモリの割当を行なう機構である。メモリ割当テーブル124は、仮想計算機I 140および仮想計算機U 160のそれぞれへのメモリ割当状態の情報を格納する。
 また、仮想化機構120は、デバイス割当管理機構126およびデバイス割当テーブル127を有する。デバイス割当管理機構126は、仮想計算機I 140および仮想計算機U 160にデバイス113の割当を行なう機構である。デバイス割当テーブル127は、デバイス割当状態の情報を格納する。
 また、仮想化機構120は、IO通知機構125、キャッシュ状態管理機構121およびキャッシュ状態テーブル122を有する。IO通知機構125は、仮想計算機U 160で発行されたIO要求を仮想計算機I 140に通知する。キャッシュ状態管理機構121は、仮想計算機I 140および仮想計算機U 160のキャッシュ状態を管理する。キャッシュ状態テーブル122は、仮想計算機I 140および仮想計算機U 160のキャッシュ状態の情報を格納する。
 本実施例の計算機システムでは、仮想計算機U 160がアプリケーション実行用の仮想計算機であり、仮想計算機I 140が、仮想計算機U 160からのIO要求に基づいて対象のデバイスにIO要求を発行するIO発行用の仮想計算機である。このように、アプリケーション実行用の仮想計算機とIO発行用の仮想計算機とを分離することで、IO実行をアプリケーション実行の影響なく安定的に行えるようにすることができる。なお、IO発行用の1つの仮想計算機にアプリケーション実行用の複数の仮想計算機を対応付けて、複数のアプリケーション用の仮想計算機からのIO要求を1つのIO発行用の仮想計算機に担当させてもよい。
 例えば、仮想計算機U 160のOS170が認識するデバイスは、仮想計算機I 140のOS150が認識するデバイスが物理リソース110によるデバイスである。計算機システムが仮想計算機U 160上のアプリケーションから要求されたIOを実行するとき、例えば、仮想計算機U 160でキャッシュヒットしなかったため仮想計算機U 160からのIO要求を仮想化機構120が仮想計算機I 140に通知し、仮想計算機I 140でキャッシュヒットしなかったため仮想計算機I 140から発行されたIO要求を仮想化機構120が対象のデバイスに通知するという処理の流れをたどる。
 仮想計算機I 140は、仮想化機構120から提供されるリソースである仮想CPU 131A、仮想メモリ132Aおよび仮想デバイスI 133を有する。これらのリソースは、仮想化機構120でエミュレートされたものであってもよいし、仮想化機構120の仲介により物理リソース110が直接割り当てられたものであってもよい。仮想計算機I 140では、OS 150が仮想CPU 131A、仮想メモリ132Aおよび仮想デバイスI 133を認識し、稼働する。
 OS150は、IO実施機構138、キャッシュ135A、キャッシュ管理機構136A、およびキャッシュ状態通知機構137Aを有する。
 IO実施機構138は、仮想計算機U 160からのIO要求を受信して仮想デバイスI 133に発行する。キャッシュ135Aは、IOデータを保持し、IO性能を向上させる機構である。キャッシュ管理機構136Aは、キャッシュ135Aを管理する。キャッシュ状態通知機構137は、キャッシュ135の状態変化を仮想化機構120に通知する。
 仮想計算機U 160は、仮想化機構120から提供されるリソースである仮想CPU131、仮想メモリ132および仮想デバイスU134を有する。仮想CPU131および仮想メモリ132は仮想化機構120でエミュレートされたリソースであってもよいし、仮想化機構120の仲介により物理リソース110が直接割り当てられたものであってもよい。仮想デバイスU134は仮想化機構120でエミュレートされたリソースである。
 仮想計算機U 160では、OS170が仮想CPU 131B、仮想メモリ132B、および仮想デバイスU 134を認識し、稼働する。
 OS170は、アプリケーション139、キャッシュ135B、キャッシュ管理機構136B、およびキャッシュ状態通知機構137Bを有する。アプリケーション139は、様々な機能をユーザに提供するソフトウェアであり、処理に応じてIO要求を発行する。キャッシュ135Bは、IOデータを保持し、IO性能を向上させる機構である。キャッシュ管理機構136Bは、キャッシュ135Bを管理する。キャッシュ状態通知機構137は、キャッシュ135Bの状態変化を仮想化機構120に通知する。
 図2Aはキャッシュ状態テーブル122の具体例、図2Bはメモリ割当テーブル124の具体例、図2Cはデバイス割当テーブル127の具体例をそれぞれ示す図である。
 図2Aに示すように、キャッシュ状態テーブル122には、装置ID211、装置アドレス212、計算機ID213、アドレスU 214、アドレスI 215、状態U 216、状態I 217が格納される。
 装置ID211は、デバイス113の識別子である。装置アドレス212は、装置ID211で識別されるデバイス113におけるデータ格納位置を示す識別子である。計算機ID213は、当該データが仮想計算機U 160のキャッシュ135Bに格納されている場合に、その仮想計算機U 160を識別する識別子である。
 アドレスU 214は、仮想計算機U 160のキャッシュ135Bにおけるデータ格納位置を示す識別子である。アドレスI 215は、当該データが仮想計算機I 140のキャッシュ135Aに格納されている場合にキャッシュ135Aにおけるデータ格納位置を示す識別子である。
 状態U216は、アドレスU 214で識別されるキャッシュの状態である。状態I 217は、アドレスI 215で識別されるキャッシュの状態である。
 キャッシュは、クリーン(C)、ダーティ(D)、フリー(F)の3つの状態をとり得る。クリーン状態とは、キャッシュに格納されたデータに対応するIOがOSの認識するデバイスにライト済の状態である。すなわち、キャッシュとデバイスのデータが一致している状態である。ダーティ状態とは、キャッシュに格納されたデータに対応するIOがOSの認識するデバイス等に未ライトの状態である。すなわち、キャッシュとデバイスのデータが一致していない状態である。また、フリー状態とは、キャッシュにデータが格納されていない状態である。
 例えば、図2A中のデータ210では、装置ID=1で識別されるデバイスにおいて装置アドレス=1で識別される位置に格納されているデータに対応するデータが、計算機ID=2で識別される仮想計算機UのアドレスU=120にクリーン状態で格納されおり、当該データが仮想計算機IのアドレスI=100にダーティ状態で格納されていることを示す。
 図2Bに示すように、メモリ割当テーブル124には、物理アドレス221と、計算機ID222、アドレス223が格納される。
 物理アドレス221は、メモリ112におけるデータ格納位置を示す識別子である。
 計算機ID222は、メモリ領域が割り当てられている仮想計算機の識別子である。以降の説明では仮想計算機I 140を識別する計算機IDを“1”とすることにする。
 アドレス223は、仮想計算機の認識する、物理アドレス221により識別されるメモリ領域の識別子である。
 例えば、図中のデータ220は、メモリ112において物理アドレス=101で識別される領域が、計算機ID=1で識別される仮想計算機のアドレス=100で識別されるメモリ上の領域に割り当てられていることを示す。
 図2Cに示すように、デバイス割当テーブル127には、装置ID231、計算機ID232、仮想装置ID233が格納される。
 装置ID231は、デバイス113の識別子である。
 計算機ID232は、装置ID231で識別されるデバイス113が割り当てられている仮想計算機を識別する識別子である。
 仮想装置ID233は、仮想計算機の認識する、装置ID231で識別されるデバイス113の識別子である。
 例えば図2C中のデータ230は、装置ID=1で識別されるデバイスが、計算機ID=2で識別される仮想計算機に割り当てられており、その仮想計算機はそのデバイスを仮想装置I=1で識別されるデバイスとして認識していることを示す。
 図3、4は、デバイス113において装置アドレス=1で識別される領域に格納されたデータに対応する仮想計算機I 140のキャッシュ135Aおよび仮想計算機U 160のキャッシュ135B上のデータの状態遷移を示す図である。
 図3、4において、連結された2つのボックスのうち、左側のボックスが仮想計算機U 160の状態を示し、右側のボックス右辺は仮想計算機I 140の状態を示す。Fがフリー状態、Cがクリーン状態、Dがダーティ状態を示している。例えば、仮想計算機U 160がクリーン状態であれば、仮想計算機U 160のキャッシュ内のデータが、仮想計算機I 140のキャッシュ内のデータと一致しているといえる。また、仮想計算機I 140がクリーン状態であれば、仮想計算機I 140のキャッシュ内のデータが、仮想化機構120がエミュレートするデバイスあるいは物理リソース110によるデバイス内のデータが一致しているといえる。
 また、図3、4において、ボックスにハッチングが施されているのは、仮想計算機U 160のキャッシュ内のデータと、仮想計算機I 140のキャッシュ内のデータが一致しているため、仮想計算機U 160のキャッシュを解放し、データの重複を排除する処理を行うことできることを表わしている。
 また、図3、4において、実線の矢印はリードをトリガとする状態遷移を表わし、一点鎖線の矢印はライトをトリガとするキャッシュの状態遷移を表わし、破線の矢印はデステージをトリガとする状態遷移を表わし、二点鎖線の矢印はフリーをトリガとする状態遷移を表わしている。以下、キャッシュの状態遷移のトリガを状態遷移トリガともいうことにする。
 図3は、仮想計算機U 160で発生する状態遷移トリガに起因するキャッシュ135の状態遷移を示している。
 キャッシュ状態310では、仮想計算機U 160のキャッシュ状態がクリーン(311)であり、仮想計算機I 140のキャッシュ状態がクリーン(312)である。キャッシュ状態310のとき、仮想計算機U 160と仮想計算機I 140のキャッシュは重複排除を行うことが可能な状態である。
 重複排除は、物理メモリの複数の領域に同一データが保持されているときに、そのいずれかの領域を解放するとともに、その領域に対応づけられていた仮想計算機のアドレスを、同一データが保持されている他の領域に対応付けを変更することで、物理メモリの利用効率を向上させる処理である。
 キャッシュ状態310では、仮想計算機U 160のキャッシュ135Bと仮想計算機I 140のキャッシュ135Aのデータが一致しているので、キャッシュ135Bに対応する物理リソース110のメモリ112の領域と、キャッシュ135Aに対応するメモリ112の領域には同一データが保持されている。したがって、キャッシュ状態310は重複排除が可能といえる。
 仮想計算機U 160において、装置アドレス=1で識別される領域に対して状態遷移トリガであるライト要求が発生した場合、キャッシュ状態310はキャッシュ状態320に遷移する。つまり、仮想計算機U 160のキャッシュ状態はダーティ(321)となり、仮想計算機I140のキャッシュ状態はクリーン(322)となる。
 キャッシュ状態320のときに、仮想計算機U 160と仮想計算機I 140キャッシュ状態は重複排除が不能な状態である。仮想計算機U 160のキャッシュ135Bと仮想計算機I 140のキャッシュ135Aのデータが一致していないからである。
 所定のタイミングで、仮想計算機U 160で発行されたライト要求が、仮想化機構120のIO通知機構125を経由して、仮想計算機I 140のIO実施機構138に通知される。この処理をデステージと呼ぶ。
 デステージは状態遷移トリガのひとつである。デステージにより、キャッシュ状態320はキャッシュ状態330に遷移する。つまり、仮想計算機U 160のキャッシュ状態はクリーン(331)となり、仮想計算機I 140のキャッシュ状態はダーティ(332)となる。キャッシュ状態330のときには、仮想計算機U 160と仮想計算機I 140のキャッシュは重複排除が可能である。仮想計算機U 160のキャッシュ135Bと仮想計算機I 140のキャッシュ135Aのデータが一致しているからである。
 図4は、仮想計算機I 140で発生する状態遷移トリガに起因するキャッシュ135の状態遷移を示している。
 例えば、キャッシュ状態410は、仮想計算機U 160のキャッシュ状態がクリーン(411)であり、仮想計算機I 140のキャッシュ状態がダーティ(412)である。キャッシュ状態410のとき、仮想計算機U 160と仮想計算機I 140のキャッシュ135は重複排除が可能な状態である。仮想計算機U 160のキャッシュ135Bと仮想計算機I 140のキャッシュ135Aのデータが一致しているからである。
 所定のタイミングで、仮想計算機I 140は、仮想計算機U 160から受信したIO要求を仮想デバイスI 133に発行する。この処理をデステージと呼ぶ。デステージは状態遷移トリガのひとつである。
 デステージにより、キャッシュ状態410からキャッシュ状態420に遷移する。つまり、仮想計算機U 160のキャッシュ状態はクリーン(421)となり、仮想計算機I 140のキャッシュ状態はクリーン(422)となる。キャッシュ状態420のときも、仮想計算機U 160と仮想計算機I 140のキャッシュ135は重複排除が可能な状態である。
 仮想計算機I 140において、未使用のメモリ領域が不足する等のイベントが発生すると、仮想計算機I 140では、キャッシュ135Aのメモリ領域を解放し、未使用のメモリ領域を拡張するという処理を行う。この処理をフリーと呼ぶ。フリーは状態遷移トリガのひとつである。
 フリーにより、キャッシュ状態420からキャッシュ状態430に遷移する。つまり、仮想計算機U 160のキャッシュ状態はクリーン(431)となり、仮想計算機I 140のキャッシュ状態はフリー(432)となる。キャッシュ状態430のとき、仮想計算機U 160と仮想計算機I 140のキャッシュは重複排除が不能な状態である。仮想化計算機I 140がキャッシュ135Aにデータが格納されていない状態だからである。
 図5は、仮想計算機I 140および仮想計算機U 160におけるIO処理のフローチャートである。
 本処理は、仮想計算機U 160ではアプリケーション139でIO要求が発生し、仮想計算機I 140ではIO実施機構138がIO要求を受け取ったときに実施する。
 ここでは、仮想装置ID=1で識別されるデバイス113の装置アドレス=1に対応する領域へのIO要求をアプリケーション139が発行した場合、または当該IO要求をIO実施機構138が受信した場合を例示する。
 まず、キャッシュ管理機構136がアプリケーション139から発行またはIO実施機構138から送信されたIO要求を受信する(ステップ501)。
 キャッシュ管理機構136が受信したIO要求がライト要求だった場合(ステップ502のライト要求のルート)、キャッシュ状態通知機構137は当該デバイスの装置アドレス=1の領域に書き込むデータをキャッシュ135に格納するために、当該キャッシュの位置を識別するアドレスと、当該キャッシュの状態がダーティになることを仮想化機構120のキャッシュ状態管理機構121に通知する(ステップ503)。また、キャッシュ管理機構136は、キャッシュ135にデータを格納する(ステップ504)。そして、キャッシュ管理機構136はライト要求が完了したことをアプリケーション139またはIO実施機構138に通知する(ステップ505)。尚、本実施例においてキャッシュ状態変化のキャッシュ状態管理機構121への通知は、実際にキャッシュ状態が変化してから行うようにしてもよい。 
 
 一方、ステップ502の判定において、キャッシュ管理機構136が受信したIO要求がリード要求だった場合(ステップ502のリード要求のルート)、キャッシュ管理機構136は、リード要求で要求されたデータが、キャッシュ135にてキャッシュヒットするか否か調べる(ステップ506)。
 キャッシュヒットする場合(ステップ506)、キャッシュ管理機構136は、アプリケーション139またはIO実施機構138にリード要求の完了を通知する(ステップ511)。
 一方、キャッシュヒットしない場合(ステップ506)、キャッシュ管理機構136は、本IO要求が仮想計算機I 140で発生している場合は仮想デバイスI 133に、本IO処理が仮想計算機U 160で発生している場合は仮想デバイスU 134にリード要求を発行する(ステップ507)。リード要求を受けた仮想デバイスI 140または仮想デバイスU 160は、リード要求を実施し、当該データを取得する(ステップ508)。キャッシュ管理機構136は取得したデータをキャッシュ135に格納する(ステップ509)。キャッシュ状態通知機構137は、当該デバイスの装置アドレス=1に対応するデータが格納されているキャッシュ135上の位置を識別するアドレスと、キャッシュ状態がクリーンであることを仮想化機構120のキャッシュ状態管理機構121に通知する(ステップ510)。キャッシュ管理機構136は、リード要求が完了したことをアプリケーション139またはIO実施機構138に通知する(ステップ511)。
 図6は、仮想計算機I 140および仮想計算機U 160によるライト処理のフローチャートである。ライト処理は、ダーティ状態から、キャッシュのデータを当該キャッシュに対応するデバイスに書き込む処理である。この処理により、ダーティ状態だったキャッシュがクリーン状態となる。本処理は、前回のライト処理から一定時間以上が経過した場合、一定数以上のキャッシュがダーティ状態になった場合、あるいはユーザによる指示があった場合に実施される。
 キャッシュ管理機構136は、管理するキャッシュ135がダーティ状態であるか否かを調べる。キャッシュがダーティ状態ではない場合、キャッシュ管理機構136はそのまま処理を終了する(ステップ601)。
 キャッシュ135がダーティ状態の場合(ステップ601)、仮想計算機I 140で本処理が行われている場合は仮想デバイスI 133に、仮想計算機U 160で本処理が行われている場合は仮想デバイスU 134に、データの書き込みを要求するライト要求を発行する(ステップ602)。それを終えると、キャッシュ状態通知機構137が、IO発行対象のデバイスを識別する仮想装置IDおよび装置アドレスと、当該領域に対応するデータが格納されているキャッシュ上の位置を識別するアドレスと、キャッシュ状態がクリーンであることを仮想化機構120のキャッシュ状態管理機構121に通知する(ステップ603)。
 図7は、仮想計算機U 160から発行されるIO要求に対する処理のフローチャートである。IO要求に対する処理をIO処理と呼ぶことにし、IO処理はリード処理またはライト処理である。ここでいうリード処理は図5のステップ508の処理であり、ライト処理は図6のステップ602の処理である。
 図7を参照すると、まず、仮想計算機U 160において仮想デバイスU 134がIO要求を発行すると、仮想化機構120上のIO通知機構125がそのIO要求を受信する(ステップ701)。IO要求を受信したIO通知機構125は、そのIO要求を仮想計算機I 140のIO実施機構138に通知する(ステップ702)。
 仮想計算機I 140は、IO要求を、図5のフローチャートに従って処理する(ステップ703)。仮想計算機I 140は図5の処理の結果として、IO実施機構138から、仮想化機構120にIO処理の完了を通知する。
 仮想化機構120のIO通知機構125は、仮想計算機I 140のIO実施機構138からIO処理の完了を受信する(ステップ704)。IO通知機構125は、仮想デバイスU 134にIO処理の完了を通知する(ステップ705)。
 図8は、仮想計算機I 140および仮想計算機U 160におけるキャッシュ解放処理のフローチャートである。本処理は、仮想計算機I 140および仮想計算機U 160において未使用のメモリ領域が不足した場合等に、現在使用中のキャッシュを解放し、未使用のメモリ領域を拡張する処理である。
 まず、キャッシュ管理機構136は、管理するキャッシュ135のキャッシュ状態を調べ、クリーン状態かダーティ状態かを判定する(ステップ801)。
 キャッシュ135がダーティ状態の場合、キャッシュ管理機構136は、そのまま処理を終了する(ステップ801のダーティ状態のルート)。
 一方、キャッシュ135がクリーン状態の場合、キャッシュ状態通知機構137は、キャッシュ135のアドレスと、当該キャッシュ135の状態がフリーに変化したことを仮想化機構120のキャッシュ状態管理機構121に通知する(ステップ802)。また、キャッシュ管理機構136は、当該キャッシュ135を解放する(ステップ803)。
 図9は、メモリの重複排除およびその重複排除を解除する処理を示すフローチャートである。本処理は、仮想計算機I 140あるいは仮想計算機U 160のキャッシュ状態通知機構137から、仮想化機構120のキャッシュ状態管理機構121にキャッシュ状態の遷移が通知されたときに実施される。
 まず、キャッシュ状態管理機構121は、仮想計算機I 140または仮想計算機U 160のキャッシュ状態通知機構137から、仮想計算機U 160または仮想計算機I 140のキャッシュ状態の変化の通知を受ける(ステップ901)。キャッシュ状態の変化の通知を受信すると、キャッシュ状態管理機構121は、キャッシュ状態テーブル122を更新する(ステップ902)。
 キャッシュ状態テーブル122のキャッシュ状態U 216およびキャッシュ状態I 217がクリーンとクリーン(図3の310の状態)またはクリーンとダーティ(図3の330の状態)であれば、キャッシュ状態管理機構121は、仮想計算機I 140のアドレスI 215で識別される領域と計算機ID=213で識別される仮想計算機U 160のアドレスU 214で識別される領域に格納されているデータが同一の状態(重複状態)と判断する。
 一方、キャッシュ状態テーブル122のキャッシュ状態U 216およびキャッシュ状態I 217がクリーンとクリーンまたはクリーンとダーティ以外の組み合わせであれば、キャッシュ状態管理機構121は、仮想計算機I 140のアドレスI 215で識別される領域と、装置アドレス212で識別される仮想計算機U 160のアドレスU 214で識別される領域に格納されているデータが異なっている状態(非重複状態)と判断する。
 ステップ902のテーブル更新により、キャッシュ135が非重複状態から重複状態に遷移した場合(ステップ903)、仮想計算機I140の当該データが格納されたキャッシュと仮想計算機U160の当該データが格納されたキャッシュに対し、重複排除処理を行なう。
 例えば、計算機ID=2で識別される仮想計算機U 160において装置ID=1で識別されるデバイス113の装置アドレス=1で識別される領域へのライト要求が発生した場合を想定する。このとき、仮想計算機U 160において、図5に示したIO処理が実施され、仮想計算機U 160の当該キャッシュがダーティであり、仮想計算機I 140の当該キャッシュがクリーンであるというキャッシュ状態となる。この時のキャッシュの状態は図3のキャッシュ状態320である。
 図6に示したように仮想計算機U 160から仮想化機構120のIO通知機構125にIO要求が通知され、IO通知機構125から仮想計算機I 140のIO実施機構138にIO要求が通知され、図5に示したように仮想計算機I 140においてIO処理が実施される。これにより、仮想計算機U 160の当該キャッシュがクリーン、仮想計算機I 140の当該キャッシュがダーティというキャッシュ状態となる。この時のキャッシュ状態は図3のキャッシュ状態330である。
 この状態変化がキャッシュ状態通知機構137からキャッシュ状態管理機構121に通知されると、キャッシュ状態テーブル122の装置ID=1で識別されるデバイスの装置アドレス=1の領域に対するアドレスU、アドレスI、状態U、状態Iは図2のデータ210のようになる。このとき、データ210における状態Uおよび状態Iは非重複状態から重複状態に遷移するため、重複排除処理が行われる。
 キャッシュ状態管理機構121は、キャッシュ状態テーブル122から、重複排除対象となるキャッシュを保有する仮想計算機U 160を識別する計算機IDおよび仮想計算機U 160における当該キャッシュの識別子のアドレスUを取得する。
 そして、キャッシュ状態管理機構121は、取得した計算機ID213とメモリ割当テーブル124における計算機ID222、および取得したアドレスU214とメモリ割当テーブルのアドレス223を比較し、当該キャッシュに対応する物理アドレスを重複排除の対象を示すものとして取得する(ステップ904)。例えば、計算機ID=2のアドレス=120に対応する物理アドレスは“102”である。
 また、キャッシュ状態管理機構121は、キャッシュ状態テーブル122から、仮想計算機I 140における当該キャッシュの識別子であるアドレスIを取得する。本実施例では、“1”に固定している仮想計算機I 140の計算機IDと、メモリ割当テーブル124における計算機ID 222、および取得したアドレスI 215とメモリ割当テーブルのアドレス223を比較し、当該キャッシュ135に対応する物理アドレスを重複排除の対象を示すものとして取得する(ステップ905)。例えば、計算機ID=1のアドレス100に対応する物理アドレスは“101”である。
 メモリ割当管理機構123は、重複排除の処理として、メモリ割当テーブル124において、ステップ904で取得した仮想計算機U 160の物理アドレスを、ステップ905で取得した仮想計算機I 140の物理アドレスに変更する(ステップ906)。例えば、メモリ割当テーブル124の計算機ID=2のアドレス=120に対応する物理アドレスを“102”から“101”に変更する。これにより、仮想計算機U 160と仮想計算機I 140の両方に同じ物理アドレスが割り当てられた状態となる。
 メモリ割当管理機構123は、上記ステップ906で割当が解除された領域に新たに別のアドレスを付与してメモリ割当テーブル124に追加する(ステップ907)。例えば、メモリ割当テーブル124に計算機ID=2のアドレス=200に対応する情報が格納されていないので、このときにメモリ割当テーブル124に物理アドレス=102、計算機ID=2、アドレス=200という情報を追加してもよい。
 上記ステップ902のテーブル更新により、キャッシュ状態が重複から非重複に遷移した場合(ステップ903)、仮想計算機I 140と仮想計算機U 160の当該領域の重複排除が行われている状態から、その重複排除を解除する。
 例えば、計算機ID=2で識別される仮想計算機U 160において装置ID=1で識別されるデバイスの装置アドレス=1で識別される領域に対して発生したリード要求が完了した状態を想定する。このとき、仮想計算機U 160において図5に示したIO処理(リード)が実施され、仮想計算機U 160の当該キャッシュがクリーン、仮想計算機I 140の当該キャッシュがクリーンとなる。
 その後、計算機ID=2で識別される仮想計算機U 160において装置ID=1で識別されるデバイスの装置アドレス=1で識別される領域に対するライト要求が発生すると、図5に示したIO処理(ライト)が実施され、仮想計算機U 160の当該キャッシュがダーティ、仮想計算機I 140の当該キャッシュがクリーンとなる。このときの状態変化が、キャッシュ状態通知機構137からキャッシュ状態管理機構121に通知される。
 例えば、このとき重複排除が行われた状態であり、計算機ID=2で識別される仮想計算機U 160のアドレス=120で識別される領域と仮想計算機I 140のアドレス=100で識別される領域にはともに物理アドレス=101で識別される領域が割り当てられているとする。
 前述の状態変化により、仮想計算機U 160のアドレス=120で識別される領域と仮想計算機I 140のアドレス=100で識別される領域は重複状態から非重複状態になるため、仮想計算機U 160のアドレス=120と仮想計算機I 140のアドレス=100には異なる物理アドレスで識別される領域を割り当てる必要が生じる。
 そこで、キャッシュ状態管理機構121は、仮想計算機U 160のキャッシュ管理機構136に通知をし、仮想計算機U 160の保有するキャッシュから状態がフリーである領域を識別するアドレスを取得する(ステップ908)。ここでは、例えば、計算機ID=2で識別される仮想計算機U 160のキャッシュ管理機構136Bからフリーである領域としてアドレス=140が通知されるものとする。
 メモリ割当管理機構123は、ステップ908で通知対象とした仮想計算機U 160を識別する計算機IDと取得したアドレスを、メモリ割当テーブル124の計算機ID222とアドレス223とそれぞれ比較し、当該仮想計算機U 160およびアドレスが割り当てられている物理アドレスを取得し、メモリ割当テーブルから当該行を削除する(ステップ909)。ここでは、図2Bを参照すると、メモリ割当テーブル124から、計算機ID=2で識別される仮想計算機のアドレス=140で識別される領域には物理アドレス=103で識別される領域が割り当てられていることがわかる。そのため、メモリ割当テーブル124から当該メモリ割り当ての行が削除される。
 更に、メモリ割当管理機構123は、重複排除の解除の処理として、メモリ割当テーブル124において重複排除の対象となっていた仮想計算機U 160のアドレスに対応する物理アドレスを、ステップ909で取得した物理アドレスに変更する(ステップ910)。例えば、メモリ割当テーブル124の計算機ID=2のアドレス=120で識別される行に格納された物理アドレスを“100”から“140”に変更する。
 また、ステップ902のテーブル更新により発生するキャッシュ状態テーブル122の状態変化が重複状態のまま、あるいは非重複状態のままであれば、そのまま図9の処理を終了する。
 以上説明したように、本実施例によれば、キャッシュ状態管理機構121がキャッシュ状態の遷移を検出したタイミングで、仮想化機構120が、仮想計算機U 160(第1仮想計算機)のキャッシュ135Bに割り当てられたメモリ領域と仮想計算機I 140(第2仮想計算機)のキャッシュ135Aに割り当てられたメモリ領域に同一データを保持する重複領域があれば、仮想計算機U 160と仮想計算機I 140のいずれか一方の重複領域を解放する。本実施例では、仮想計算機U 160の重複領域が解放される。これによれば、重複領域の有無が変わる可能性のあるキャッシュ状態の遷移が検出されたときに重複領域の有無を調べる処理を実行するので、重複領域の有無を調べるタイミングを効率よく限定することができる。これにより、処理の負荷を無駄に発生させることなく、効率よく重複を解消することができる。
 また、本実施例の計算機システムは、仮想計算機U 160がアプリケーション実行用の仮想計算機であり、仮想計算機I 140が、仮想計算機U 160からのIO要求に基づくIO要求を対象のデバイスに発行するIO発行用の仮想計算機である。そして、仮想化機構120が、仮想計算機U 160の発行するIO要求を仮想計算機I 140に通知し、仮想計算機I 140からのIO要求を対象のデバイスに通知するという構成である。そして、仮想化機構120は、重複領域があれば、仮想計算機U 160の重複領域を解放し、仮想計算機I 140の重複領域を仮想計算機U 160のキャッシュにも割り当てる。
 これによれば、アプリケーション実行用の仮想計算機U 160とデバイスへのIO発行用の仮想計算機I 140とを役割分担する構成の計算機システムにおいて、重複領域があったとき、アプリケーション実行用の仮想計算機U 160の方の重複領域を解放する。本実施例では、アプリケーション実行用の仮想計算機Uが1台稼働させる構成について述べたが、仮想計算機Uは複数台稼働させてもよく、複数台の仮想計算機UからのIO要求を1台の仮想計算機Iに担当させてもよい。こうした場合、特に仮想計算機Iは複数台の仮想計算機UのIO要求を実施するため、仮想計算機Uよりも高い信頼性が求められる。本機構を用いることでIO発行用の仮想計算機I 140の動作の安全性を確保することができる。
 また、仮想化機構120は、仮想計算機U 160と仮想計算機I 140のキャッシュ状態が共にクリーンであるとき、または、仮想計算機U 160のキャッシュ状態がクリーンかつ仮想計算機I 140のキャッシュ状態がダーティであるとき、仮想化機構120は重複領域があると判定する。これによれば、キャッシュ状態に基づいて重複領域の有無を容易に正しく判断することができる。
 また、キャッシュ状態管理機構121は、仮想計算機U 160または仮想計算機I 140において、データを読み出すリード、データを書き込むライト、キャッシュのデータをバックエンド側の装置に通知するデステージ、キャッシュを開放するフリーのいずれかが発生すると、キャッシュ状態の遷移を検出する。これによれば、キャッシュ状態の遷移を生じさせる事象の発生をトリガとして容易かつ確実にキャッシュ状態の遷移を検出することができる。
 また、仮想計算機U 160と仮想計算機I 140のキャッシュ状態が共にクリーンであるとき、または、仮想計算機U 160のキャッシュ状態がクリーンかつ仮想計算機I 140のキャッシュ状態がダーティであるとき、重複状態とし、仮想計算機U 160と仮想計算機I 140のキャッシュ状態がそれ以外の状態であるとき、非重複状態とする。仮想化機構120は、キャッシュ状態管理機構121がキャッシュ状態の遷移を検出すると、非重複状態から重複状態に遷移したのであれば、仮想計算機U 160の重複領域を解放し、仮想計算機I 140の重複領域を仮想計算機U 160のキャッシュにも割り当てる。また、重複状態から非重複状態に遷移したのであれば、仮想計算機I 140の重複領域を割り当てていた仮想計算機U 160のキャッシュに他の領域を割り当てる。これによれば、重複状態から非重複状態への遷移を検知して重複を排除する処理を実行し、非重複状態から重複状態への遷移を検知して、重複を排除している状態を解除する処理を実行するので、重複排除を適切なときに適用することができる。
 図10は、仮想計算機U 160上でOS170の起動が発生したときに実行されるメモリ割り当て処理のフローチャートである。
 仮想計算機U 160上でOS170が起動すると(ステップ1001)、まず、仮想化機構120上のデバイス割当管理機構126は、仮想計算機U 160から当該仮想計算機U 160に割り当てるデバイスの識別子である装置IDおよび仮想計算機U 160における当該デバイスの識別子である仮想装置IDを受け取る(ステップ1002)。ここでは例えば、計算機ID=3で識別される仮想計算機U 160に、装置ID=2で識別されるデバイスが割り当てられ、仮想計算機U 160は当該デバイスを仮想装置ID=1で認識しているものとする。
 デバイス割当管理機構126は、デバイス割当テーブル127を更新する(ステップ1003)。
 デバイス割当管理機構126は、キャッシュ状態テーブル122に、ステップ1002で受信した装置IDに対応する情報が格納されているか否か判定する(ステップ1004)。
 キャッシュ状態テーブル122に、ステップ1002で受信した装置IDに対応する情報が格納されていない場合は、そのまま図10の処理を終了する。
 キャッシュ状態テーブル122に、ステップ1002で受信した装置IDに対応する情報が格納されている場合、デバイス割当管理機構126は、キャッシュ状態テーブル122およびメモリ割当テーブル124を参照して、その情報が格納されている物理アドレスを取得する(ステップ1005)。例えば、装置ID=2で識別されるデバイスの装置アドレス=10で識別される領域に格納されている情報は、アドレスI 214から、仮想計算機I 140のアドレス=240に格納されていることがわかる。また、メモリ割当テーブル124から、計算機ID=1である仮想計算機I 140のアドレス=240は物理アドレス=104に対応することがわかる。そのため、装置ID=2で識別されるデバイスの装置アドレス=10に格納されている情報は、物理アドレス=104に格納されていることがわかる。
 次に、キャッシュ状態管理機構121は、仮想計算機U 160のキャッシュ管理機構136に要求を通知し、仮想計算機U 160の保有するキャッシュ135Bから状態がフリーである領域のアドレスを受け取る(ステップ1006)。例えば、計算機ID=3で識別される仮想計算機U 160のキャッシュ管理機構136Bからフリーである領域としてアドレス=90が通知されるものとする。
 メモリ割当管理機構123は、メモリ割当テーブル124において、ステップ1006で取得した仮想計算機U 160のアドレスに対応する物理アドレスを、ステップ1005で取得した物理アドレスに変更する(ステップ1007)。例えば、メモリ割当テーブル124の計算機ID=3のアドレス=90で識別される行に格納された物理アドレスを“200”から“104”に変更する。これにより物理アドレス=200の領域の割当が解除される。
 キャッシュ状態管理機構121は、ステップ1007で割り当てたキャッシュ情報を仮想計算機U 160のキャッシュ管理機構136Bに通知する(ステップ1008)。キャッシュ状態管理機構121は、例えば、計算機ID=3で識別される仮想計算機U 160に、仮想計算機U 160がアドレス=90で認識している領域に、仮想計算機U 160が仮想装置ID=1で認識しているデバイスの装置アドレス=2で識別される領域の情報が格納されたことを通知する。
 メモリ割当管理機構123は、ステップ1007により割当が解除された領域に新たに別のアドレスを付与してメモリ割当テーブル124に追加する(ステップ1009)。例えば、メモリ割当テーブル124には計算機ID=3のアドレス=100に対応する情報が格納されていない場合に、物理アドレス=200、計算機ID=3、アドレス=100の情報が追加される。
 以上説明したように、本実施例によれば、キャッシュ状態管理機構121は、仮想計算機U 160のキャッシュ状態の情報をキャッシュ状態テーブル122に保持し、仮想計算機U 160のOS170が起動すると、仮想化機構120は、キャッシュ状態テーブル122に保持されている情報に基づき、仮想計算機U 160のキャッシュ135Bを復元する。これにより、OS170起動時にキャッシュ状態テーブル122を基にキャッシュ135Bを復元するので、OS170の起動直後からキャッシュ135Bの有効な利用が可能となる。
 第2の実施例は、第1の実施例の仮想化機構120に対応する部分の構成が第1の実施例と異なっている。ここでは、第2の実施例について主に第1の実施例と異なる部分について説明する。
 図11は、第2の実施例かかる計算機システムのブロック図である。第2の実施例では、第1の実施例における仮想化機構120に対応する部分が、仮想化機構120A、仮想化機構エージェント180、および不揮発領域190に分割されている。
 仮想化機構120Aは、キャッシュ状態管理機構121、キャッシュ状態テーブル122、メモリ割当管理機構123、IO通知機構125、デバイス割当管理機構126、デバイス割当テーブル127を有している。仮想化機構エージェント180にはメモリ割当エージェント181が搭載されている。メモリ割当エージェント181は、第1の実施例の仮想化機構120が有するメモリ割当を管理する機能の内、仮想計算機I 140へのメモリ割当を管理する部分を抽出したものである。不揮発領域190には、第1の実施例の仮想化機構120が有するメモリ割当テーブル124が搭載されている。
 本構成により、仮想計算機U 160または仮想化機構120Aに障害が発生した場合でも、仮想化機構120Aから分離された仮想化機構エージェント180のメモリ割当エージェント181と、不揮発領域190上のメモリ割当テーブル124とには障害が影響しないので、仮想化機構エージェント180による仮想計算機I 140へのメモリ割当の状態情報が維持できる。それゆえ、仮想計算機U 160または仮想化機構120Aに障害が発生しても、1つまたは複数の仮想化計算機U 160に利用されIO要求の処理を担当する仮想計算機I 140の正常な動作を維持することができる。
 例えば、仮想化機構120Aに障害が発生し、キャッシュ状態管理機構121およびキャッシュ状態テーブル122にはアクセスができなくなることがある。
 キャッシュが重複状態のときには、仮想計算機I 140に割り当てられた物理アドレスを仮想計算機U 160にも割り当てることでメモリ使用量の削減が図られている。このとき、仮想化機構120Aに障害が発生すると、キャッシュ状態管理機構121およびキャッシュ状態テーブル122にアクセスができなくなるので、仮想計算機U 160へのメモリ割り当て状態を管理できなくなる。そのため、仮想計算機U 160の動作が保証されない状態となる。
 一方、本実施例でも第1の実施例と同様、キャッシュが重複状態のときでも仮想計算機I 140についてはそのメモリ割り当てになんら変更がされていない。また、仮想計算機I 140のメモリ割当は、仮想化機構120Aから分離されたメモリ割当エージェント181によって管理されている。そのため、仮想化機構120Aに障害が発生しても、仮想計算機I 140の動作は保証される。
 すなわち、以上説明したように、本実施例においても、第1の実施例と同様、仮想計算機U 160がアプリケーション実行用の仮想計算機であり、仮想計算機I 140が、仮想計算機U 160からのIO要求に基づくIO要求を対象のデバイスに発行するIO発行用の仮想計算機である。そして、本実施例では、仮想計算機I 140のメモリ割り当てを管理する機構であるメモリ割当エージェント181が他の機構(仮想化機構120A)から独立して構成されている。これによれば、仮想計算機I 140のメモリ割り当てを管理する機構が独立しているので、仮想計算機U 160や他の機能を実現する機構に障害が発生しても、仮想計算機I 140の動作を維持することができる。
 上述した本発明の各実施例は、本発明の説明のための例示であり、本発明の範囲をそれらの実施例のみに限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。
110…物理リソース、111…CPU、112…メモリ、113…デバイス、120…仮想化機構、120A…仮想化機構、121…キャッシュ状態管理機構、122…キャッシュ状態テーブル、123…メモリ割当管理機構、124…メモリ割当テーブル、125…IO通知機構、126…デバイス割当管理機構、127…デバイス割当テーブル、131…仮想CPU、132…仮想メモリ、134…仮想デバイスU、135…キャッシュ、136…キャッシュ管理機構、137…キャッシュ状態通知機構、138…IO実施機構、139…アプリケーション、140…仮想計算機I、150…OS、160…仮想計算機U、170…OS、180…仮想化機構エージェント、181…メモリ割当エージェント、190…不揮発領域
 

Claims (10)

  1.  メモリを含む物理リソースと、
     前記物理リソースを割り当てた仮想計算機を提供する仮想化機構と、
     前記仮想計算機のキャッシュ状態を管理するキャッシュ状態管理機構と、を有し、
     前記仮想化機構は第1仮想計算機と第2仮想計算機を提供し、
     前記キャッシュ状態管理機構は前記第1仮想計算機と前記第2仮想計算機のそれぞれのキャッシュ状態を管理し、
     前記キャッシュ状態管理機構が前記キャッシュ状態の遷移を検出すると、前記仮想化機構が、前記第1仮想計算機のキャッシュに割り当てられたメモリ領域と前記第2仮想計算機のキャッシュに割り当てられたメモリ領域に同一データを保持する重複領域があれば、前記第1仮想計算機と前記第2仮想計算機のいずれか一方の前記重複領域を解放する、
    計算機システム。
  2.  前記計算機システムは、前記第1仮想計算機がアプリケーション実行用の仮想計算機であり、前記第2仮想計算機が、前記第1仮想計算機からのIO要求に基づくIO要求を対象のデバイスに発行するIO発行用の仮想計算機であり、前記仮想化機構が、前記第1仮想計算機の発行するIO要求を前記第2仮想計算機に通知し、前記第2仮想計算機からのIO要求を前記対象のデバイスに通知する構成であり、
     前記仮想化機構は、前記重複領域があれば、前記第1仮想計算機の前記重複領域を解放し、前記第2仮想計算機の前記重複領域を前記第1仮想計算機のキャッシュにも割り当てる、
    請求項1に記載の計算機システム。
  3.  前記仮想化機構は、前記第1仮想計算機と前記第2仮想計算機のキャッシュ状態が共にクリーンであるとき、または、前記第1仮想計算機のキャッシュ状態がクリーンかつ前記第2仮想計算機のキャッシュ状態がダーティであるとき、前記仮想化機構は前記重複領域があると判定する、請求項2に記載の計算機システム。
  4.  前記キャッシュ状態管理機構は、前記第1仮想計算機または前記第2仮想計算機において、データを読み出すリード、データを書き込むライト、キャッシュのデータをバックエンド側の装置に通知するデステージ、キャッシュを開放するフリーのいずれかが発生すると、前記キャッシュ状態の遷移を検出する、請求項1に記載の計算機システム。
  5.  前記第1仮想計算機と前記第2仮想計算機のキャッシュ状態が共にクリーンであるとき、または、前記第1仮想計算機のキャッシュ状態がクリーンかつ前記第2仮想計算機のキャッシュ状態がダーティであるとき、重複状態とし、
     前記第1仮想計算機と前記第2仮想計算機のキャッシュ状態がそれ以外の状態であるとき、非重複状態とし、
     前記仮想化機構は、
     前記キャッシュ状態管理機構が前記キャッシュ状態の遷移を検出すると、
     非重複状態から重複状態に遷移したのであれば、前記第1仮想計算機の前記重複領域を解放し、前記第2仮想計算機の前記重複領域を前記第1仮想計算機のキャッシュにも割り当て、
     重複状態から非重複状態に遷移したのであれば、前記第2仮想計算機の前記重複領域を割り当てていた前記第1仮想計算機のキャッシュに他の領域を割り当てる、
    請求項1に記載の計算機システム。
  6.  前記キャッシュ状態管理機構は、前記第1仮想計算機のキャッシュ状態の情報をキャッシュ状態テーブルに保持し、
     前記第1仮想計算機のオペレーションシステムが起動すると、前記仮想化機構は、前記キャッシュ状態テーブルに保持されている情報に基づき、前記第1仮想計算機のキャッシュを復元する、
    請求項1に記載の計算機システム。
  7.  前記第1仮想計算機がアプリケーション実行用の仮想計算機であり、前記第2仮想計算機が、前記第1仮想計算機からのIO要求に基づくIO要求を対象のデバイスに発行するIO発行用の仮想計算機であり、
     前記第2仮想計算機のメモリ割り当てを管理する機構が他の機構から独立して構成されている、
    請求項1に記載の計算機システム。
  8.  メモリを含む物理リソースと、前記物理リソースを割り当てた仮想計算機を提供する仮想化機構と、前記仮想計算機のキャッシュ状態を管理するキャッシュ状態管理機構と、を有する計算機システムにおいて、前記仮想計算機のキャッシュへのメモリ割当を管理するためのメモリ割当管理方法であって、
     前記仮想化機構が、第1仮想計算機と第2仮想計算機を提供し、
     前記キャッシュ状態管理機構が、前記第1仮想計算機と前記第2仮想計算機のそれぞれのキャッシュ状態を管理し、
     前記キャッシュ状態管理機構が前記キャッシュ状態の遷移を検出すると、前記仮想化機構が、前記第1仮想計算機のキャッシュに割り当てられたメモリ領域と前記第2仮想計算機のキャッシュに割り当てられたメモリ領域に同一データを保持する重複領域があれば、前記第1仮想計算機と前記第2仮想計算機のいずれか一方の前記重複領域を解放する、
    メモリ割当管理方法。
  9.  前記計算機システムは、前記第1仮想計算機がアプリケーション実行用の仮想計算機であり、前記第2仮想計算機が、前記第1仮想計算機からのIO要求に基づくIO要求を対象のデバイスに発行するIO発行用の仮想計算機であり、前記仮想化機構が、前記第1仮想計算機の発行するIO要求を前記第2仮想計算機に通知し、前記第2仮想計算機からのIO要求を前記対象のデバイスに通知する構成であり、
     前記仮想化機構は、前記重複領域があれば、前記第1仮想計算機の前記重複領域を解放し、前記第2仮想計算機の前記重複領域を前記第1仮想計算機のキャッシュにも割り当てる、
    請求項8に記載のメモリ割当管理方法。
  10.  前記キャッシュ状態管理機構は、前記第1仮想計算機のキャッシュ状態の情報をキャッシュ状態テーブルに保持し、
     前記第1仮想計算機のオペレーションシステムが起動すると、前記仮想化機構は、前記キャッシュ状態テーブルに保持されている情報に基づき、前記第1仮想計算機のキャッシュを復元する、
    請求項8に記載のメモリ割当管理方法。
     
PCT/JP2014/069597 2014-07-24 2014-07-24 計算機システムおよびメモリ割当管理方法 WO2016013086A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/112,740 US10013358B2 (en) 2014-07-24 2014-07-24 Computer system and memory allocation management method
PCT/JP2014/069597 WO2016013086A1 (ja) 2014-07-24 2014-07-24 計算機システムおよびメモリ割当管理方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/069597 WO2016013086A1 (ja) 2014-07-24 2014-07-24 計算機システムおよびメモリ割当管理方法

Publications (1)

Publication Number Publication Date
WO2016013086A1 true WO2016013086A1 (ja) 2016-01-28

Family

ID=55162642

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/069597 WO2016013086A1 (ja) 2014-07-24 2014-07-24 計算機システムおよびメモリ割当管理方法

Country Status (2)

Country Link
US (1) US10013358B2 (ja)
WO (1) WO2016013086A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6254293B2 (ja) * 2014-09-15 2017-12-27 華為技術有限公司Huawei Technologies Co.,Ltd. データ重複排除方法及びストレージアレイ
CN108733584B (zh) * 2017-04-17 2022-07-19 伊姆西Ip控股有限责任公司 用于优化数据缓存的方法和设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010033206A (ja) * 2008-07-28 2010-02-12 Fujitsu Ltd 仮想マシンモニタ装置およびプログラム,ならびに仮想マシン間メモリ共有管理方法
WO2012111113A1 (ja) * 2011-02-16 2012-08-23 富士通株式会社 メモリ管理プログラム、メモリ管理方法、情報処理装置、及びメモリ管理プログラムを記録したコンピュータ読取可能な記録媒体
US20130198459A1 (en) * 2012-01-27 2013-08-01 Fusion-Io, Inc. Systems and methods for a de-duplication cache

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5809560A (en) * 1995-10-13 1998-09-15 Compaq Computer Corporation Adaptive read-ahead disk cache
US20090156303A1 (en) * 2006-11-10 2009-06-18 Igt Bonusing Architectures in a Gaming Environment
DE102012217202B4 (de) * 2011-10-12 2020-06-18 International Business Machines Corporation Verfahren und System zum Optimieren des Platzierens virtueller Maschinen in Cloud-Computing-Umgebungen
US10339056B2 (en) * 2012-07-03 2019-07-02 Sandisk Technologies Llc Systems, methods and apparatus for cache transfers
WO2015045046A1 (ja) * 2013-09-26 2015-04-02 株式会社日立製作所 計算機システムおよび計算機システムのメモリ割当調整方法
US10152340B2 (en) * 2014-03-07 2018-12-11 Vmware, Inc. Configuring cache for I/O operations of virtual machines
US9645841B2 (en) * 2014-06-10 2017-05-09 American Megatrends, Inc. Dynamic virtual machine storage usage monitoring, provisioning, and migration
US9697130B2 (en) * 2014-06-25 2017-07-04 Sandisk Technologies Llc Systems and methods for storage service automation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010033206A (ja) * 2008-07-28 2010-02-12 Fujitsu Ltd 仮想マシンモニタ装置およびプログラム,ならびに仮想マシン間メモリ共有管理方法
WO2012111113A1 (ja) * 2011-02-16 2012-08-23 富士通株式会社 メモリ管理プログラム、メモリ管理方法、情報処理装置、及びメモリ管理プログラムを記録したコンピュータ読取可能な記録媒体
US20130198459A1 (en) * 2012-01-27 2013-08-01 Fusion-Io, Inc. Systems and methods for a de-duplication cache

Also Published As

Publication number Publication date
US10013358B2 (en) 2018-07-03
US20160335192A1 (en) 2016-11-17

Similar Documents

Publication Publication Date Title
JP6314355B2 (ja) メモリ管理方法およびデバイス
JP4863765B2 (ja) バックアップ及び/又はリストアを行う記憶制御方法及びシステム
WO2017022002A1 (ja) ストレージ装置、ストレージシステム、ストレージシステムの制御方法
JP4808275B2 (ja) ネットワークブートシステム
US10289564B2 (en) Computer and memory region management method
US10025670B2 (en) Information processing apparatus, memory dump method, and storage medium
US20160357672A1 (en) Methods and apparatus for atomic write processing
JP6165964B2 (ja) 計算機
US10176098B2 (en) Method and apparatus for data cache in converged system
JP2007133544A (ja) 障害情報解析方法及びその実施装置
US10095616B2 (en) Garbage collection for virtual environments
WO2016013086A1 (ja) 計算機システムおよびメモリ割当管理方法
JP5966466B2 (ja) バックアップ制御方法、および情報処理装置
US20140115255A1 (en) Storage system and method for controlling storage system
JP6311365B2 (ja) 記憶領域管理装置、記憶領域管理方法及び記憶領域管理プログラム
JP5673396B2 (ja) 情報処理システム、情報処理プログラム、情報処理方法
US9448871B2 (en) Information processing device and method for selecting processor for memory dump processing
US20150269092A1 (en) Information processing device and shared memory management method
JP6677021B2 (ja) 情報処理装置、情報処理方法、プログラム
JP6175566B2 (ja) ストレージシステム及び記憶制御方法
CN107515723B (zh) 用于管理存储系统中的存储器的方法和系统
WO2016006108A1 (ja) ストレージおよびその制御方法
US20140019678A1 (en) Disk subsystem and method for controlling memory access
KR20210067014A (ko) 캐싱 장치 및 방법
JP2019144932A (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: 14897903

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15112740

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14897903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP