All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, berrange@redhat.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] net: delay peer host device delete
Date: Mon, 20 Sep 2010 22:15:24 +0200	[thread overview]
Message-ID: <20100920201524.GA760@redhat.com> (raw)
In-Reply-To: <4C97C0F1.9040201@codemonkey.ws>

On Mon, Sep 20, 2010 at 03:15:45PM -0500, Anthony Liguori wrote:
> On 09/20/2010 02:37 PM, Michael S. Tsirkin wrote:
> >On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote:
> >>On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote:
> >>>>You can also initiate the unplug from the OS without the ACPI event
> >>>>ever happening.  I suspect that in our current implementation, that
> >>>>means that we'll automatically delete the device which may have
> >>>>strange effects on management tools.
> >>>>
> >>>>So it probably makes sense for our interface to present the same
> >>>>procedure.  What do you think?
> >>>>
> >>>>Regards,
> >>>>
> >>>>Anthony Liguori
> >>>We seem to have two discussions here. you speak about how an ideal hot plug
> >>>interface will look. This can involve new commands etc.
> >>>I speak about fixing existing ones so qemu and/or guest won't crash.
> >>To be fair, existing qemu won't crash if you do:
> >>
> >>(qemu) device_del<device>
> >>Use info_qtree to notice when device goes away
> >>(qemu) netdev_del<backend>
> >Asking libvirt to busy loop polling the monitor sounds like a really bad
> >situation: note that guest is blocked from doing any io while monitor is
> >used, so it may in fact prevent it from making progress. Right?
> 
> With a busy loop?  No, the guest will always make some progress
> because we drop back to the main loop.  But that's besides the point
> really.  libvirt can just do a usleep() when polling.
> 
> Yes, this interface sucks but that's the interface we have today.
> 
> >So why can't we let management do netdev_del and have it take effect
> >when this becomes possible?
> 
> You're making netdev_del be a semantic request that a network
> backend is eventually deleted after some guest controlled period of
> time.
> 
> If libvirt is trying to do useful things like manage a limit set of
> resources (maybe VFs using SR-IOV passthrough), then libvirt needs
> to know when it can reassign a VF to another guest.  But now it
> can't do that after it does netdev_del.  Is it supposed to poll to
> figure out when it can do it?
> 
> >>You're trying to come up with a workaround for the fact that libvirt
> >>is making bad assumptions.
> >BTW, even if it is, I don't think we should be crashing qemu or guest.
> 
> That's certainly true.  But that's a different patch.
> 
> >>That's wrong.  We either need to fix
> >>libvirt to not make bad assumptions or we need to provide better
> >>interfaces for libvirt to use if the current interfaces aren't
> >>desirable.
> >>
> >>Regards,
> >>
> >>Anthony Liguori
> >>
> >>>This requires fixing existing commands, unless we can't
> >>>fix them at all - which is demonstrably not the case.
> >But frankly, most command semantics are completely ad hock and not well
> >undefined, in my mind it's better to define them to accomodate existing
> >users.
> 
> Okay, let's give them an interface they actually want.  Forcing them
> to poll for when a netdev is actually removed is probably not what
> they actually want.
> 
> Regards,
> 
> Anthony Liguori


Agreed. Any libvirt guys listening in on this discussion
and have an opinion on what does libvirt actually want?

-- 
MST

  reply	other threads:[~2010-09-20 20:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 16:30 [Qemu-devel] [PATCH] net: delay peer host device delete Michael S. Tsirkin
2010-09-20 16:41 ` Anthony Liguori
2010-09-20 16:47   ` Michael S. Tsirkin
2010-09-20 16:56     ` Anthony Liguori
2010-09-20 17:14       ` Michael S. Tsirkin
2010-09-20 18:14         ` Anthony Liguori
2010-09-20 18:19           ` Anthony Liguori
2010-09-20 18:59             ` [Qemu-devel] " Michael S. Tsirkin
2010-09-20 19:22               ` Anthony Liguori
2010-09-20 19:37                 ` Michael S. Tsirkin
2010-09-20 20:15                   ` Anthony Liguori
2010-09-20 20:15                     ` Michael S. Tsirkin [this message]
2010-09-21  8:58                   ` Daniel P. Berrange
2010-09-21  9:20                     ` Michael S. Tsirkin
2010-09-21 12:47                       ` Anthony Liguori
2010-09-20 18:24           ` Michael S. Tsirkin
2010-09-20 18:39             ` Anthony Liguori
2010-09-20 19:15               ` Michael S. Tsirkin
2010-09-20 19:28                 ` Anthony Liguori
2010-09-20 19:44                   ` Michael S. Tsirkin
2010-09-20 20:20                     ` Anthony Liguori
2010-09-20 20:27                       ` Michael S. Tsirkin
2010-09-20 20:38                         ` Anthony Liguori
2010-09-20 20:37                           ` Michael S. Tsirkin
2010-09-20 20:50                             ` Anthony Liguori
2010-09-21  9:18                               ` Michael S. Tsirkin
2010-09-21 12:42                                 ` Anthony Liguori

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=20100920201524.GA760@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.