|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/xl: Remove the filelock when building VM if autoballooning is off
Dmitry Isaykin writes ("[PATCH] tools/xl: Remove the filelock when building VM
if autoballooning is off"):
> The presence of this filelock does not allow building several VMs at the same
> time. This filelock was added to prevent other xl instances from using memory
> freeed for the currently building VM in autoballoon mode.
>
> Signed-off-by: Dmitry Isaykin <isaikin-dmitry@xxxxxxxxx>
Reviewed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
This was deferred due to the Xen 4.13 freeze. I found it in a todo
list of mine. I think it should be committed and I will do so soon
unless someone objects.
Sorry for the delay, Dmitry!
Regards,
Ian.
> tools/xl/xl_vmcontrol.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c
> index a1d633795c..2b42bb487d 100644
> --- a/tools/xl/xl_vmcontrol.c
> +++ b/tools/xl/xl_vmcontrol.c
> @@ -873,9 +873,11 @@ int create_domain(struct domain_create *dom_info)
> start:
> assert(domid == INVALID_DOMID);
>
> - rc = acquire_lock();
> - if (rc < 0)
> - goto error_out;
> + if (autoballoon) {
> + rc = acquire_lock();
> + if (rc < 0)
> + goto error_out;
> + }
>
> if (domid_soft_reset == INVALID_DOMID) {
> if (!freemem(domid, &d_config.b_info)) {
> @@ -935,7 +937,8 @@ start:
> if ( ret )
> goto error_out;
>
> - release_lock();
> + if (autoballoon)
> + release_lock();
>
> if (restore_fd_to_close >= 0) {
> if (close(restore_fd_to_close))
> @@ -1109,7 +1112,8 @@ start:
> }
>
> error_out:
> - release_lock();
> + if (autoballoon)
> + release_lock();
> if (libxl_domid_valid_guest(domid)) {
> libxl_domain_destroy(ctx, domid, 0);
> domid = INVALID_DOMID;
> --
> 2.17.1
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |