|
From: | Michael R. Hines |
Subject: | Re: [Qemu-devel] [RFC PATCH RDMA support v2: 4/6] initialize RDMA options when QEMU first runs on command-line |
Date: | Tue, 19 Feb 2013 01:00:24 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
To explain the host and port:The separate host and port are used by the library "librdmacm". This library performs a network translation between the IP address and a unique infiniband user-level Port number and the physical interface that has the RDMA capabilities. This library requires an IP address and port bound specifically to the requested RDMA interface to work.
The patch does not assume that the network interface used for TCP traffic will necessarily be the same as the interface used for RDMA traffic.
Alternatively, this host and port could be specified using the QMP "migrate" command, but this command already has the URI for the TCP side of things reserved.
If you guys like, we could specify a *second* URI on the QMP command line - we don't really have a preference.
Either way is fine........ whatever the consensus is. - Michael On 02/18/2013 05:37 AM, Paolo Bonzini wrote:
Il 11/02/2013 23:49, Michael R. Hines ha scritto:+/* + * Memory regions need to be registered with the device and queue pairs setup + * in advanced before the migration starts. This tells us where the RAM blocks + * are so that we can register them individually. + */ +int rdma_init_ram_blocks(struct rdma_ram_blocks *rdma_ram_blocks) +{ + RAMBlock *block; + int num_blocks = 0; + + memset(rdma_ram_blocks, 0, sizeof *rdma_ram_blocks); + QTAILQ_FOREACH(block, &ram_list.blocks, next) { + if (num_blocks >= RDMA_MAX_RAM_BLOCKS) { + return -1; + } + rdma_ram_blocks->block[num_blocks].local_host_addr = block->host; + rdma_ram_blocks->block[num_blocks].offset = (uint64_t)block->offset; + rdma_ram_blocks->block[num_blocks].length = (uint64_t)block->length; + num_blocks++; + } + rdma_ram_blocks->num_blocks = num_blocks; + + return 0; +}Memory regions are not static data, so you have to do this at the time migration starts. For the RDMA-impaired among us, why do you need a separate host+port? Can it be the same by default, and if it is different you can then specify it like rdma://host:port/?rdmahost=HOST&rdmaport=PORT Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |