[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 09/29] migration: provide postcopy_fault_thread_no
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [RFC 09/29] migration: provide postcopy_fault_thread_notify() |
Date: |
Tue, 1 Aug 2017 11:01:04 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Jul 31, 2017 at 07:45:38PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (address@hidden) wrote:
> > A general helper to notify the fault thread.
> >
> > Signed-off-by: Peter Xu <address@hidden>
> > ---
> > migration/postcopy-ram.c | 35 ++++++++++++++++++++---------------
> > migration/postcopy-ram.h | 2 ++
> > 2 files changed, 22 insertions(+), 15 deletions(-)
> >
> > diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> > index 4278fe7..9ce391d 100644
> > --- a/migration/postcopy-ram.c
> > +++ b/migration/postcopy-ram.c
> > @@ -287,6 +287,21 @@ int postcopy_ram_incoming_init(MigrationIncomingState
> > *mis, size_t ram_pages)
> > return 0;
> > }
> >
> > +void postcopy_fault_thread_notify(MigrationIncomingState *mis)
> > +{
> > + uint64_t tmp64 = 1;
> > +
> > + /*
> > + * Tell the fault_thread to exit, it's an eventfd that should
> > + * currently be at 0, we're going to increment it to 1
> > + */
> > + if (write(mis->userfault_event_fd, &tmp64, 8) != 8) {
> > + /* Not much we can do here, but may as well report it */
> > + error_report("%s: incrementing userfault_quit_fd: %s", __func__,
>
> minor; that error message needs updating with the new name, or since
> it's a standalone function, 'incrementing failed:' would work.
> Other than that:
Will fix (possibly should be in previous patch since that patch did
the name change). Also, I think I need to touch up the comment as well
with s/exit/wake/.
>
>
> Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Thanks!
--
Peter Xu
- [Qemu-devel] [RFC 05/29] bitmap: introduce bitmap_count_one(), (continued)
- [Qemu-devel] [RFC 05/29] bitmap: introduce bitmap_count_one(), Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 06/29] migration: dump str in migrate_set_state trace, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 08/29] migration: reuse mis->userfault_quit_fd, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 07/29] migration: better error handling with QEMUFile, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 09/29] migration: provide postcopy_fault_thread_notify(), Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 10/29] migration: new property "x-postcopy-fast", Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 11/29] migration: new postcopy-pause state, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 12/29] migration: allow dst vm pause on postcopy, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 13/29] migration: allow src return path to pause, Peter Xu, 2017/07/28
- [Qemu-devel] [RFC 14/29] migration: allow send_rq to fail, Peter Xu, 2017/07/28