xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org, Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH v2 04/10] libxl: synchronize device removal when using driver domains
Date: Thu, 14 Nov 2013 11:37:42 +0100	[thread overview]
Message-ID: <5284A7F6.2020409@citrix.com> (raw)
In-Reply-To: <21121.3500.980869.456356@mariner.uk.xensource.com>

On 11/11/13 18:02, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH v2 04/10] libxl: synchronize device removal when using driver domains"):
>> Synchronize the clean up of the backend from the toolstack domain when
>> the driver domain has actually finished closing the backend for the
>> device.
>>
>> This is accomplished by waiting for the driver domain to  remove the
>> directory containing the backend keys, then the toolstack domain will
>> finish the cleanup by removing the empty folders on the backend path.
> ...
>> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
>> index d726f0b..8987434 100644
>> --- a/tools/libxl/libxl_device.c
>> +++ b/tools/libxl/libxl_device.c
>> @@ -443,6 +443,11 @@ void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev)
>>      aodev->num_exec = 0;
>>      /* Initialize timer for QEMU Bodge and hotplug execution */
>>      libxl__ev_time_init(&aodev->timeout);
>> +    /*
>> +     * Initialize xs_watch, because it's not used on all possible
>> +     * execution paths, but it's unconditionally destroyed when finished.
>> +     */
>> +    libxl__ev_xswatch_init(&aodev->xs_watch);
> 
> FWIW I think this is entirely unremarkable and does not deserve a
> comment.  Every field in the newly created aodev should be
> initialised.  The fact that it wasn't was a latent bug.  So I would
> mention that in the commit message instead.
> 
> But I don't feel strongly about this so keep it as it is if you like.
> And there are several other similar comments in the same function.
> 
>>  static void device_hotplug_clean(libxl__gc *gc, libxl__ao_device *aodev);
>> @@ -781,12 +794,14 @@ void libxl__initiate_device_remove(libxl__egc *egc,
>>          LOG(ERROR, "unable to get info for domain %d", domid);
>>          goto out;
>>      }
>> +
>>      if (QEMU_BACKEND(aodev->dev) &&
>>          (info.paused || info.dying || info.shutdown)) {
>>          /*
>>           * TODO: 4.2 Bodge due to QEMU, see comment on top of
>>           * libxl__initiate_device_remove in libxl_internal.h
>>           */
>> +
>>          rc = libxl__ev_time_register_rel(gc, &aodev->timeout,
>>                                           device_qemu_timeout,
>>                                           LIBXL_QEMU_BODGE_TIMEOUT * 1000);
> 
> Unintentional whitespace changes ?

Yes, sorry for that.

> Aside from that, this patch all looks good to me.

Great, if you have other comments on the series I will resend it with
the whitespace removed. Should I take the "looks good to me" as an Ack
if the whitespace is removed?

  reply	other threads:[~2013-11-14 10:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 12:10 [PATCH v2 00/10] libxl: add driver domain backend daemon Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 01/10] libxl: Introduce nested async operations (nested ao) Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 02/10] libxl: create a local xenstore libxl and device-model dir for guests Roger Pau Monne
2013-11-11 15:24   ` Ian Jackson
2013-11-11 16:36     ` Roger Pau Monné
2013-11-12 15:03       ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 03/10] libxl: don't remove device frontend path from driver domains Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 04/10] libxl: synchronize device removal when using " Roger Pau Monne
2013-11-11 17:02   ` Ian Jackson
2013-11-14 10:37     ` Roger Pau Monné [this message]
2013-11-14 12:42       ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 05/10] libxl: remove the Qemu bodge for driver domain devices Roger Pau Monne
2013-11-15 17:09   ` Ian Jackson
2013-11-18 10:07     ` Roger Pau Monné
2013-11-18 11:26       ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 06/10] libxl: don't launch Qemu on Dom0 for Qdisk devices on driver domains Roger Pau Monne
2013-11-15 17:11   ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 07/10] libxl: add Qdisk backend launch helper Roger Pau Monne
2013-11-15 17:34   ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 08/10] xl: put daemonize code in it's own function Roger Pau Monne
2013-11-15 17:36   ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 09/10] libxl: revert 326a7b74 Roger Pau Monne
2013-11-15 17:37   ` Ian Jackson
2013-11-15 18:16     ` Ian Jackson
2013-11-15 18:22   ` Andrew Cooper
2013-11-11 12:10 ` [PATCH v2 10/10] libxl: add device backend listener in order to launch backends Roger Pau Monne
2013-11-15 17:54   ` Ian Jackson
2013-11-18 11:47     ` Roger Pau Monné
2013-11-18 14:22       ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5284A7F6.2020409@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).