Jan Beulich
2012-Sep-05 12:40 UTC
[PATCH 10/11] tmem: fixup 2010 cleanup patch that breaks tmem save/restore
20918:a3fa6d444b25 "Fix domain reference leaks" (in Feb 2010, by Jan) does some cleanup in addition to the leak fixes. Unfortunately, that cleanup inadvertently resulted in an incorrect fallthrough in a switch statement which breaks tmem save/restore. That broken patch was apparently applied to 4.0-testing and 4.1-testing so those are broken as well. What is the process now for requesting back-patches to 4.0 and 4.1? (Side note: This does not by itself entirely fix save/restore in 4.2.) Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -2415,6 +2415,7 @@ static NOINLINE int tmemc_save_subop(int break; tmh_copy_to_client_buf(buf, pool->uuid, 2); rc = 0; + break; case TMEMC_SAVE_END: if ( client == NULL ) break; @@ -2425,6 +2426,7 @@ static NOINLINE int tmemc_save_subop(int pgp_free_from_inv_list(client,pgp); client->frozen = client->was_frozen; rc = 0; + break; } return rc; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
zhenzhong.duan
2012-Sep-07 10:50 UTC
Re: [PATCH 10/11] tmem: fixup 2010 cleanup patch that breaks tmem save/restore
Hi Jan, Dan With this patch applied, 'xm save' worked, restore failed. See below: [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 537 2 r----- 255.3 OVM_OL5U7_X86_64_PVM_10GB 1 1024 2 -b---- 76.2 [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm save 1 delete [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm restore delete Error: /usr/lib64/xen/bin/xc_restore 4 2 1 2 0 0 0 0 failed Usage: xm restore <CheckpointFile> [-p] Restore a domain from a saved state. -p, --paused Do not unpause domain after restoring it [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm dmesg: (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains (XEN) tmem.c:1220:d1 tmem: initializing tmem capability for domid=1...<G><2>tmem.c:1256:d1 ok (XEN) tmem.c:1912:d1 tmem: allocating ephemeral-private tmem pool for domid=1...<G><2>tmem.c:2014:d1 pool_id=0 (XEN) tmem.c:1912:d1 tmem: allocating ephemeral-private tmem pool for domid=1...<G><2>tmem.c:2014:d1 pool_id=1 (XEN) tmem.c:1912:d1 tmem: allocating persistent-private tmem pool for domid=1...<G><2>tmem.c:2014:d1 pool_id=2 (XEN) tmem.c:2855:d0 tmem: flushing tmem pools for domid=1 (XEN) tmem.c:1197:d0 destroying ephemeral-private tmem pool <G><2>tmem.c:1198:d0 domid=1 pool_id=0 (XEN) tmem.c:1197:d0 destroying ephemeral-private tmem pool <G><2>tmem.c:1198:d0 domid=1 pool_id=1 (XEN) tmem.c:1197:d0 destroying persistent-private tmem pool <G><2>tmem.c:1198:d0 domid=1 pool_id=2 (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains (XEN) tmem.c:1220:d0 tmem: initializing tmem capability for domid=2...<G><2>tmem.c:1256:d0 ok (XEN) tmem.c:2268:d0 tmem: weight set to 0 for domid=2 (XEN) tmem.c:2274:d0 tmem: cap set to 0 for domid=2 (XEN) tmem.c:1912:d0 tmem: allocating ephemeral-private tmem pool for domid=2...<G><2>tmem.c:1915:d0 failed... unsupported spec version δΊ 2012-09-05 20:40, Jan Beulich ει:> 20918:a3fa6d444b25 "Fix domain reference leaks" (in Feb 2010, by Jan) > does some cleanup in addition to the leak fixes. Unfortunately, that > cleanup inadvertently resulted in an incorrect fallthrough in a switch > statement which breaks tmem save/restore. > > That broken patch was apparently applied to 4.0-testing and 4.1-testing > so those are broken as well. > > What is the process now for requesting back-patches to 4.0 and 4.1? > > (Side note: This does not by itself entirely fix save/restore in 4.2.) > > Signed-off-by: Dan Magenheimer<dan.magenheimer@oracle.com> > Signed-off-by: Jan Beulich<jbeulich@suse.com> > > --- a/xen/common/tmem.c > +++ b/xen/common/tmem.c > @@ -2415,6 +2415,7 @@ static NOINLINE int tmemc_save_subop(int > break; > tmh_copy_to_client_buf(buf, pool->uuid, 2); > rc = 0; > + break; > case TMEMC_SAVE_END: > if ( client == NULL ) > break; > @@ -2425,6 +2426,7 @@ static NOINLINE int tmemc_save_subop(int > pgp_free_from_inv_list(client,pgp); > client->frozen = client->was_frozen; > rc = 0; > + break; > } > return rc; > } > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jan Beulich
2012-Sep-07 11:39 UTC
Re: [PATCH 10/11] tmem: fixup 2010 cleanup patch that breaks tmem save/restore
>>> On 07.09.12 at 12:50, "zhenzhong.duan" <zhenzhong.duan@oracle.com> wrote: > With this patch applied, ''xm save'' worked, restore failed. See below: > [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm list > Name ID Mem VCPUs State Time(s) > Domain-0 0 537 2 r----- 255.3 > OVM_OL5U7_X86_64_PVM_10GB 1 1024 2 -b---- 76.2 > [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm save 1 delete > [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# > [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm restore delete > Error: /usr/lib64/xen/bin/xc_restore 4 2 1 2 0 0 0 0 failed > Usage: xm restore <CheckpointFile> [-p] > > Restore a domain from a saved state. > -p, --paused Do not unpause domain after restoring it > [root@sustaining13 OVM_OL5U7_X86_64_PVM_10GB]# xm dmesg: > (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains > (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains > (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains > (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains > (XEN) tmem.c:1220:d1 tmem: initializing tmem capability for > domid=1...<G><2>tmem.c:1256:d1 ok > (XEN) tmem.c:1912:d1 tmem: allocating ephemeral-private tmem pool for > domid=1...<G><2>tmem.c:2014:d1 pool_id=0 > (XEN) tmem.c:1912:d1 tmem: allocating ephemeral-private tmem pool for > domid=1...<G><2>tmem.c:2014:d1 pool_id=1 > (XEN) tmem.c:1912:d1 tmem: allocating persistent-private tmem pool for > domid=1...<G><2>tmem.c:2014:d1 pool_id=2 > (XEN) tmem.c:2855:d0 tmem: flushing tmem pools for domid=1 > (XEN) tmem.c:1197:d0 destroying ephemeral-private tmem pool > <G><2>tmem.c:1198:d0 domid=1 pool_id=0 > (XEN) tmem.c:1197:d0 destroying ephemeral-private tmem pool > <G><2>tmem.c:1198:d0 domid=1 pool_id=1 > (XEN) tmem.c:1197:d0 destroying persistent-private tmem pool > <G><2>tmem.c:1198:d0 domid=1 pool_id=2 > (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains > (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains > (XEN) tmem.c:2037:d0 tmem: all pools frozen for all domains > (XEN) tmem.c:2037:d0 tmem: all pools thawed for all domains > (XEN) tmem.c:1220:d0 tmem: initializing tmem capability for > domid=2...<G><2>tmem.c:1256:d0 ok > (XEN) tmem.c:2268:d0 tmem: weight set to 0 for domid=2 > (XEN) tmem.c:2274:d0 tmem: cap set to 0 for domid=2 > (XEN) tmem.c:1912:d0 tmem: allocating ephemeral-private tmem pool for > domid=2...<G><2>tmem.c:1915:d0 failed... unsupported spec versionLooks like Dan''s patches to bump the tmem ABI from 0 to 1 (22136:b7f0ea22880d, 22137:fd2e5008c2e0 ) failed to fully update tools/libxc/xc_tmem.c (xc_tmem_restore_new_pool() in particular for the problem above). Jan