[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH RDMA support v5: 09/12] transmit pc.ram usin
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH RDMA support v5: 09/12] transmit pc.ram using RDMA |
Date: |
Tue, 09 Apr 2013 18:50:41 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 09/04/2013 05:04, address@hidden ha scritto:
>
> + if ((bytes_sent = save_rdma_page(f, block->offset,
> + offset, cont, TARGET_PAGE_SIZE, zero)) >= 0) {
> + acct_info.norm_pages++;
> + qemu_file_update_position(f, bytes_sent);
> + } else if (zero) {
I think this should become a new QEMUFileOps member, save_ram_page. If
NULL it can return ENOTSUP.
> +/*
> + * Inform server to begin handling dynamic page registrations
> + */
> +static void ram_registration_start(QEMUFile *f)
> +{
> + if(qemu_file_ops_are(f, &rdma_write_ops)) {
> + qemu_put_be64(f, RAM_SAVE_FLAG_RDMA);
> + }
> +}
> +
> +/*
> + * Inform server that dynamic registrations are done for now.
> + * First, flush writes, if any.
> + */
> +static int ram_registration_stop(QEMUFile *f)
> +{
> + int ret = 0;
> +
> + if (qemu_file_ops_are(f, &rdma_write_ops)) {
> + ret = qemu_rdma_drain_cq(f);
> + if(ret >= 0)
> + ret = qemu_rdma_finish_registrations(f);
> + }
> +
> + return ret;
I think this should become two QEMUFileOps instead: before_ram_iterate
and after_ram_iterate, or something like that. Again, if NULL they
should just do nothing.
Errors from the callback should be persisted in the QEMUFile with
qemu_file_set_error. Then you do not need any checks in the caller.
Paolo
- [Qemu-devel] [RFC PATCH RDMA support v5: 06/12] connection-establishment for RDMA, (continued)
- [Qemu-devel] [RFC PATCH RDMA support v5: 06/12] connection-establishment for RDMA, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 08/12] new capabilities added and check for QMP string 'rdma', mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 10/12] new header file prototypes for savevm.c, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 11/12] update schema to define new capabilities, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 07/12] additional savevm.c accessors for RDMA, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 09/12] transmit pc.ram using RDMA, mrhines, 2013/04/08
- Re: [Qemu-devel] [RFC PATCH RDMA support v5: 09/12] transmit pc.ram using RDMA,
Paolo Bonzini <=
- [Qemu-devel] [RFC PATCH RDMA support v5: 12/12] don't set nonblock on invalid file descriptor, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 05/12] core RDMA migration logic w/ new protocol, mrhines, 2013/04/08
- [Qemu-devel] [RFC PATCH RDMA support v5: 04/12] introduce qemu_ram_foreach_block(), mrhines, 2013/04/08
- Re: [Qemu-devel] [RFC PATCH RDMA support v5: 00/12] new formal protocol design, Michael R. Hines, 2013/04/09
- Re: [Qemu-devel] [RFC PATCH RDMA support v5: 00/12] new formal protocol design, Michael S. Tsirkin, 2013/04/09