[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()
From: |
Jason Gunthorpe |
Subject: |
Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd() |
Date: |
Wed, 18 May 2022 12:42:37 -0300 |
On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote:
> >> Is there a really performance difference to just use:
> >>
> >> uint8_t buffer[size];
> >>
> >> qemu_get_buffer(f, buffer, size);
> >> write(fd, buffer, size);
> >>
> >> Or telling it otherwise, what sizes are we talking here?
> >
> > It depends on the device, but It can range from a few MBs to several
> > GBs AFAIK.
>
> a few MB is ok.
>
> Several GB on the main migration channel without a single
> header/whatever?
IIRC it iterates in multi-megabyte chunks each which gets a header.
The chunking size is set by the size of the buffer mmap
The overall point is that memcpying GB's is going to be taxing so we
want to eliminate copies on this path, especially copies that result
in more system calls.
We are expecting to look into further optimization down the road here
because even this is still too slow.
Jason
[PATCH 6/9] vfio/migration: Implement VFIO migration protocol v2, Avihai Horon, 2022/05/12
[PATCH 7/9] vfio/migration: Reset device if setting recover state fails, Avihai Horon, 2022/05/12
[PATCH 8/9] vfio: Alphabetize migration section of VFIO trace-events file, Avihai Horon, 2022/05/12
[PATCH 9/9] docs/devel: Align vfio-migration docs to VFIO migration v2, Avihai Horon, 2022/05/12
Re: [PATCH 0/9] vfio/migration: Implement VFIO migration protocol v2, Alex Williamson, 2022/05/12