[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions f
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy |
Date: |
Sat, 16 Jun 2012 15:19:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) |
Isaku Yamahata <address@hidden> wrote:
> On Thu, Jun 14, 2012 at 11:34:09PM +0200, Juan Quintela wrote:
>> > +size_t umem_pages_size(uint64_t nr)
>> > +{
>> > + return sizeof(struct umem_pages) + nr * sizeof(uint64_t);
>>
>> Can we make sure that the pgoffs field is aligned? I know that as it is
>> now it is aligned, but better to be sure?
>
> It is already done by gcc extension, zero length array.
Ah, I didn't knew that propierty of the zero arrays extension. thanks.
>>
>> Grr, we don't have a function that writes does a "safe_write". The most
>> similar thing in qemu looks to be send_all().
>
> So we should introduce something like qemu_safe_write/read?
I guess so. If you look around, you will see that we have a lot of
cases where we have this pattern. But that is not a problem ofthis
patch, was already there.
>
>> Talking about looking, what protects that no other thread enters this
>> function before this one calls madvise? Or I am losing something obvious?
>
> It is assumed that only main thread calls this function via iohandler.
Ok. Can we add a comment then?
Later, Juan.
- [Qemu-devel] [PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration, (continued)
- [Qemu-devel] [PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration, Isaku Yamahata, 2012/06/04
- [Qemu-devel] [PATCH v2 41/41] migration/postcopy: add movebg mode, Isaku Yamahata, 2012/06/04
- [Qemu-devel] [PATCH v2 40/41] migrate: add -m (movebg) option to migrate command, Isaku Yamahata, 2012/06/04
- [Qemu-devel] [PATCH v2 37/41] postcopy: implement outgoing part of postcopy live migration, Isaku Yamahata, 2012/06/04
- [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy, Isaku Yamahata, 2012/06/04
- Re: [Qemu-devel] [PATCH v2 00/41] postcopy live migration, Anthony Liguori, 2012/06/04
Re: [Qemu-devel] [PATCH v2 00/41] postcopy live migration, Juan Quintela, 2012/06/14