|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 8 of 8] [CA-39589] Refactoring: flattens a number of ne
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1269859685 -3600
# Node ID d93c2f8aa929805921aab70209d620efcfa20b8c
# Parent a2aefdf05e1db543982a258ea46fb35400f8d050
[CA-39589] Refactoring: flattens a number of nested function applications.
Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Acked-by: Marcus Granado <Marcus.Granado@xxxxxxxxxxxxx>
diff -r a2aefdf05e1d -r d93c2f8aa929 ocaml/xapi/vmops.ml
--- a/ocaml/xapi/vmops.ml Mon Mar 29 11:48:04 2010 +0100
+++ b/ocaml/xapi/vmops.ml Mon Mar 29 11:48:05 2010 +0100
@@ -948,12 +948,13 @@
(fun () -> Unix.close fd);
debug "suspend: complete");
debug "suspend phase 4/4: recording memory usage";
- (* Record the final memory usage of the VM, so *)
- (* that we know how much memory to free before *)
- (* attempting to resume this VM in future. *)
+ (* Record the final memory usage of the VM, so that we know how
much *)
+ (* memory to free before attempting to resume this VM in
future. *)
let di = with_xc (fun xc -> Xc.domain_getinfo xc domid) in
- let final_memory_bytes = Memory.bytes_of_pages
(Int64.of_nativeint di.Xc.total_memory_pages) in
- debug "total_memory_pages=%Ld; storing target=%Ld"
(Int64.of_nativeint di.Xc.total_memory_pages) final_memory_bytes;
+ let final_memory_bytes = Memory.bytes_of_pages
+ (Int64.of_nativeint di.Xc.total_memory_pages) in
+ debug "total_memory_pages=%Ld; storing target=%Ld"
+ (Int64.of_nativeint di.Xc.total_memory_pages)
final_memory_bytes;
(* CA-31759: avoid using the LBR to simplify upgrade *)
Db.VM.set_memory_target ~__context ~self:vm
~value:final_memory_bytes
in
@@ -962,14 +963,12 @@
Memory_control.balance_memory ~__context ~xc ~xs;
if is_paused then (try Domain.pause ~xc domid with _ -> ())
in
- Xapi_xenops_errors.handle_xenops_error
- (fun () ->
- with_xc_and_xs
- (fun xc xs ->
- if is_paused then Domain.unpause ~xc
domid;
- finally
- (do_suspend)
-
(do_final_actions_after_suspend)))
+ Xapi_xenops_errors.handle_xenops_error (fun () ->
+ with_xc_and_xs (fun xc xs ->
+ if is_paused then Domain.unpause ~xc domid;
+ finally
+ (do_suspend)
+ (do_final_actions_after_suspend)))
let resume ~__context ~xc ~xs ~vm =
let domid = Helpers.domid_of_vm ~__context ~self:vm in
1 file changed, 12 insertions(+), 13 deletions(-)
ocaml/xapi/vmops.ml | 25 ++++++++++++-------------
xen-api.hg-8.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-API] [PATCH 0 of 8] [CA-39589] After a VM suspend operation, Xapi now reverses any destructive update it makes to XenStore's copy of dynamic-max., Jonathan Knowles
- [Xen-API] [PATCH 2 of 8] [CA-39589] After a VM suspend operation, Xapi now reverses any destructive update it makes to XenStore's copy of dynamic-max, Jonathan Knowles
- [Xen-API] [PATCH 5 of 8] [CA-39589] Refactoring: extracts out the "suspend_domain" function from a deeply nested block, Jonathan Knowles
- [Xen-API] [PATCH 1 of 8] [CA-39589] Fixes confusing code structure, which made it hard to discern the true execution path through a relatively long and deeply nested function, Jonathan Knowles
- [Xen-API] [PATCH 4 of 8] [CA-39589] Refactoring: extracts out the "handle_death" function from a deeply nested block, Jonathan Knowles
- [Xen-API] [PATCH 3 of 8] [CA-39589] Refactoring: lifts a number of definitions out of a deeply nested block, Jonathan Knowles
- [Xen-API] [PATCH 7 of 8] [CA-39589] Refactoring: extracts out the "do_final_actions_after_suspend" function from a deeply-nested block, Jonathan Knowles
- [Xen-API] [PATCH 6 of 8] [CA-39589] Refactoring: extracts out the "do_suspend" function from a deeply-nested block, Jonathan Knowles
- [Xen-API] [PATCH 8 of 8] [CA-39589] Refactoring: flattens a number of nested function applications,
Jonathan Knowles <=
|
|
|
|
|