[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/5] qemu-file: Add fast ftell code path
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/5] qemu-file: Add fast ftell code path |
Date: |
Tue, 06 Jan 2015 08:46:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/26/2014 07:42 AM, Alexander Graf wrote:
> For ftell we flush the output buffer to ensure that we don't have anything
> lingering in our internal buffers. This is a very safe thing to do.
>
> However, with the dynamic size measurement that the dynamic vmstate
> description will bring this would turn out quite slow.
>
> Instead, we can fast path this specific measurement and just take the
> internal buffers into account when telling the kernel our position.
>
> I'm sure I overlooked some corner cases where this doesn't work, so
> instead of tuning the safe, existing version, this patch adds a fast
> variant of ftell that gets used by the dynamic vmstate description code
> which isn't critical when it fails.
>
> Signed-off-by: Alexander Graf <address@hidden>
>
> ---
>
> v2 -> v3:
>
> - improve ftell_fast, now works with bdrv too
> ---
> include/migration/qemu-file.h | 1 +
> migration/qemu-file.c | 16 ++++++++++++++++
> 2 files changed, 17 insertions(+)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v3 3/5] qemu-file: Add fast ftell code path,
Eric Blake <=