From: Paolo Bonzini <pbonzini@redhat.com>
To: liu ping fan <qemulist@gmail.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] make bh safe with hot-unplug
Date: Thu, 27 Jun 2013 08:59:03 +0200 [thread overview]
Message-ID: <51CBE2B7.7020904@redhat.com> (raw)
In-Reply-To: <CAJnKYQkSQezM3mkYrAweEZgGYwjy+8hMxvx70+3oFfHp2HpFQg@mail.gmail.com>
Il 27/06/2013 04:08, liu ping fan ha scritto:
>> > qdev_free is triggered by the guest, but free is a misnomer. It is
>> > really "make it inaccessible from the guest and management" (the kernel
>> > equivalent would be removal of /dev and /sys entries, for example). The
>> > actual "free" will happen later.
>
> Without seeing your detail design, but I suggest that leaving the
> "exit" as it is, and pick out the inaccessible related code to
> removal.
We already have a reclamation point, it is instance_finalize.
I posted a series a few weeks ago ("[PATCH 00/39] Delay destruction of
memory regions to instance_finalize").
> Finally, when refcnt->0, exit is called, and it play as the
> final sync point for the remaining access.
It is the guest that determines when to start the removal phase. That's
qdev_free.
refcnt = 0 means that the memory is inaccessible to the guest, and
that's when the reclamation phase is started (asynchronously: the
instance_finalize callback is actually called at the end of the RCU
grace period).
Paolo
next prev parent reply other threads:[~2013-06-27 6:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 17:38 [Qemu-devel] [PATCH 0/3] make bh safe with hot-unplug Liu Ping Fan
2013-06-25 6:24 ` Paolo Bonzini
2013-06-25 6:32 ` liu ping fan
2013-06-25 7:53 ` Paolo Bonzini
2013-06-26 2:59 ` liu ping fan
2013-06-26 6:34 ` Paolo Bonzini
2013-06-26 8:20 ` liu ping fan
2013-06-26 8:38 ` Paolo Bonzini
2013-06-26 9:44 ` liu ping fan
2013-06-26 9:55 ` Paolo Bonzini
2013-06-27 2:08 ` liu ping fan
2013-06-27 6:59 ` Paolo Bonzini [this message]
2013-06-25 17:38 ` [Qemu-devel] [PATCH 1/3] QEMUBH: introduce canceled member for bh Liu Ping Fan
2013-06-25 17:38 ` [Qemu-devel] [PATCH 2/3] QEMUBH: pin bh's referring object while scheduling Liu Ping Fan
2013-06-25 17:38 ` [Qemu-devel] [PATCH 3/3] virtio-net: set referred object for virtio net's bh Liu Ping Fan
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=51CBE2B7.7020904@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.com \
--cc=stefanha@redhat.com \
/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).