xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Grytsov <al1img@gmail.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Ian Jackson <ian.jackson@citrix.com>,
	Oleksandr Grytsov <oleksandr_grytsov@epam.com>,
	"wl@xen.org" <wl@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH v1 2/2] libxl: add removing XS backend path for PV devices on domain destroy
Date: Wed, 16 Oct 2019 13:39:28 +0300	[thread overview]
Message-ID: <CACvf2oWcTQDJ-ZBVFXJM9055mDRfkD8KC2+3CkkhsuBr6a5+mQ@mail.gmail.com> (raw)
In-Reply-To: <20191015153947.GA17494@Air-de-Roger>

On Tue, Oct 15, 2019 at 6:39 PM Roger Pau Monné <roger.pau@citrix.com> wrote:
>
> On Fri, Oct 11, 2019 at 04:55:32PM +0100, Ian Jackson wrote:
> > Roger Pau Monne writes ("Re: [PATCH v1 2/2] libxl: add removing XS backend path for PV devices on domain destroy"):
> > > When this code was added (devd) those where the only backends handled
> > > by libxl. VDISPL, VSND, VINPUT didn't exist at that point, so I think
> > > the issue is that when support for those was added, it wasn't properly
> > > wired into devd.
> > >
> > > > I think:
> > > >
> > > > >      switch(ddev->dev->backend_kind) {
> > > > > +    case LIBXL__DEVICE_KIND_VDISPL:
> > > > > +    case LIBXL__DEVICE_KIND_VSND:
> > > > > +    case LIBXL__DEVICE_KIND_VINPUT:
> > > > >      case LIBXL__DEVICE_KIND_VBD:
> > > > >      case LIBXL__DEVICE_KIND_VIF:
> > > >
> > > > If we do want this to handle *all* kinds of device, maybe it should
> > > > have a fallback that aborts, or something ?  (I don't think it is
> > > > easy to make it a compile error to forget to add an entry here but if
> > > > we could do that it would probably be best.)
> > >
> > > Maybe we could have some generic handling for everything != qdisk?
> >
> > So make that the "default:" ?  That would be fine by me.
>
> If possible yes, that would be my preference, and would prevent having
> to add new device types to this switch unless special handling is
> required.
>
> >
> > > IIRC qdisk needs special handling so that devd can launch and destroy
> > > a QEMU instance when required, but other backends that run in the
> > > kernel don't need such handling and could maybe share the same generic
> > > code path.
> >
> > Right.
> >
> > > > All of that assuming that the basic idea is right, which I would like
> > > > Roger's opinion about.
> > >
> > > Looking at the patch itself, you also seem to be doing some changes
> > > related to num_vbds and num_vifs, but those are not mentioned in the
> > > commit message, is that a stray change?
> >
> > No, I don't think so.  Those variables just tell us when the thing is
> > torn down but Oleksandr's code is able to use the devices slist itself
> > for that.  Please do check to see if you agree.
>
> Yes, that's fine. I don't think those changes are wrong, I just think
> that at least they should be mentioned in the commit message. Ie:
> "while there remove the num_vifs and num_vbds since they are not
> needed and the same can be achieved by checking that the device list
> is empty." or some such.
>
> Thanks, Roger.

Ian, Roger,

Thanks for reviewing and comments. I will update the patch with your
comments above.

-- 
Best Regards,
Oleksandr Grytsov.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-10-16 10:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 14:10 [Xen-devel] [PATCH v1 0/2] Remove backend xen store entry on domain destroy Oleksandr Grytsov
2019-10-08 14:10 ` [Xen-devel] [PATCH v1 1/2] libxl: introduce new backend type VINPUT Oleksandr Grytsov
2019-10-11 14:58   ` Ian Jackson
2019-10-11 15:57     ` Oleksandr Grytsov
2019-10-11 17:03       ` Ian Jackson
2019-10-16 13:26         ` Oleksandr Grytsov
2019-10-28 14:06           ` Oleksandr Grytsov
2019-11-04 14:52             ` Oleksandr Grytsov
2019-11-15 19:43               ` Ian Jackson
2019-11-18 11:40                 ` Oleksandr Grytsov
2019-11-18 17:48                   ` Ian Jackson
2019-11-18 17:55   ` [Xen-devel] [PATCH for-4.13 " Ian Jackson
2019-11-19 12:40     ` Oleksandr Grytsov
2019-11-20 16:04       ` Ian Jackson
2019-10-08 14:10 ` [Xen-devel] [PATCH v1 2/2] libxl: add removing XS backend path for PV devices on domain destroy Oleksandr Grytsov
2019-10-11 15:07   ` Ian Jackson
2019-10-11 15:32     ` Roger Pau Monné
2019-10-11 15:55       ` Ian Jackson
2019-10-15 15:39         ` Roger Pau Monné
2019-10-16 10:39           ` Oleksandr Grytsov [this message]

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=CACvf2oWcTQDJ-ZBVFXJM9055mDRfkD8KC2+3CkkhsuBr6a5+mQ@mail.gmail.com \
    --to=al1img@gmail.com \
    --cc=ian.jackson@citrix.com \
    --cc=oleksandr_grytsov@epam.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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).