qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: benoit.hudzia@gmail.com, aarcange@redhat.com,
	aliguori@us.ibm.com, kvm@vger.kernel.org,
	satoshi.itoh@aist.go.jp, stefanha@gmail.com,
	t.hirofuchi@aist.go.jp, dlaor@redhat.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp,
	owasserm@redhat.com, avi@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy
Date: Sat, 16 Jun 2012 15:19:57 +0200	[thread overview]
Message-ID: <87vcircs1u.fsf@elfo.mitica> (raw)
In-Reply-To: <20120616094827.GL23851@valinux.co.jp> (Isaku Yamahata's message of "Sat, 16 Jun 2012 18:48:27 +0900")

Isaku Yamahata <yamahata@valinux.co.jp> 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.

  reply	other threads:[~2012-06-16 13:20 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  9:57 [Qemu-devel] [PATCH v2 00/41] postcopy live migration Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 01/41] arch_init: export sort_ram_list() and ram_save_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 02/41] arch_init: export RAM_SAVE_xxx flags for postcopy Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 03/41] arch_init/ram_save: introduce constant for ram save version = 4 Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 04/41] arch_init: refactor host_from_stream_offset() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 05/41] arch_init/ram_save_live: factor out RAM_SAVE_FLAG_MEM_SIZE case Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 06/41] arch_init: refactor ram_save_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 07/41] arch_init/ram_save_live: factor out ram_save_limit Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 08/41] arch_init/ram_load: refactor ram_load Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 09/41] arch_init: introduce helper function to find ram block with id string Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 10/41] arch_init: simplify a bit by ram_find_block() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 11/41] arch_init: factor out counting transferred bytes Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 12/41] arch_init: factor out setting last_block, last_offset Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 13/41] exec.c: factor out qemu_get_ram_ptr() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 14/41] exec.c: export last_ram_offset() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 15/41] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 16/41] savevm: qemu_pending_size() to return pending buffered size Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 17/41] savevm, buffered_file: introduce method to drain buffer of buffered file Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 18/41] QEMUFile: add qemu_file_fd() for later use Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 19/41] savevm/QEMUFile: drop qemu_stdio_fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 20/41] savevm/QEMUFileSocket: drop duplicated member fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 21/41] savevm: rename QEMUFileSocket to QEMUFileFD, socket_close to fd_close Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 22/41] savevm/QEMUFile: introduce qemu_fopen_fd Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 23/41] migration.c: remove redundant line in migrate_init() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 24/41] migration: export migrate_fd_completed() and migrate_fd_cleanup() Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 25/41] migration: factor out parameters into MigrationParams Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 26/41] buffered_file: factor out buffer management logic Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 27/41] buffered_file: Introduce QEMUFileNonblock for nonblock write Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 28/41] buffered_file: add qemu_file to read/write to buffer in memory Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 29/41] umem.h: import Linux umem.h Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 30/41] update-linux-headers.sh: teach umem.h to update-linux-headers.sh Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 31/41] configure: add CONFIG_POSTCOPY option Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 32/41] savevm: add new section that is used by postcopy Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 33/41] postcopy: introduce -postcopy and -postcopy-flags option Isaku Yamahata
2012-06-08 10:52   ` Juan Quintela
2012-06-08 16:07     ` Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 34/41] postcopy outgoing: add -p and -n option to migrate command Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy Isaku Yamahata
2012-06-14 21:34   ` Juan Quintela
2012-06-16  9:48     ` Isaku Yamahata
2012-06-16 13:19       ` Juan Quintela [this message]
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration Isaku Yamahata
2012-06-14 21:56   ` Juan Quintela
2012-06-14 21:58   ` Juan Quintela
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 37/41] postcopy: implement outgoing " Isaku Yamahata
2012-06-14 22:12   ` Juan Quintela
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 38/41] postcopy/outgoing: add forward, backward option to specify the size of prefault Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 39/41] postcopy/outgoing: implement prefault Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 40/41] migrate: add -m (movebg) option to migrate command Isaku Yamahata
2012-06-04  9:57 ` [Qemu-devel] [PATCH v2 41/41] migration/postcopy: add movebg mode Isaku Yamahata
2012-06-04 12:37 ` [Qemu-devel] [PATCH v2 00/41] postcopy live migration Anthony Liguori
2012-06-04 13:38   ` Isaku Yamahata
2012-06-05 11:23     ` Dor Laor
2012-06-07  7:46   ` Orit Wasserman
2012-06-08 10:16   ` Juan Quintela
2012-06-08 10:23     ` Avi Kivity
2012-06-14 21:07       ` Juan Quintela
2012-06-14 22:18 ` Juan Quintela

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=87vcircs1u.fsf@elfo.mitica \
    --to=quintela@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=benoit.hudzia@gmail.com \
    --cc=dlaor@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=satoshi.itoh@aist.go.jp \
    --cc=stefanha@gmail.com \
    --cc=t.hirofuchi@aist.go.jp \
    --cc=yamahata@valinux.co.jp \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /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).