[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of th
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data |
Date: |
Fri, 26 May 2017 12:12:05 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 24.05.2017 um 21:05 hat Alberto Garcia geschrieben:
> On Wed 24 May 2017 06:43:31 PM CEST, Anton Nefedov wrote:
> >> + if (m->data_qiov) {
> >> + qemu_iovec_reset(&qiov);
> >> + qemu_iovec_add(&qiov, start_buffer, start->nb_bytes);
> >> + qemu_iovec_concat(&qiov, m->data_qiov, 0, data_bytes);
> >> + qemu_iovec_add(&qiov, end_buffer, end->nb_bytes);
> >
> > Can it be a problem if (m->data_qiov->niov == IOV_MAX)?
> > We had to add merge-iovecs code for the case (maybe there's better
> > solution?)
>
> You're right, good catch! I'll add a check for that. To be honest I
> don't think that's likely to happen in practice, so if it does we can
> simply fall back to the old behavior (separate writes).
>
> > Also, will this work if allocation is split into several l2metas?
> > e.g. one has cow_start.nb_bytes and another has cow_end.nb_bytes
>
> The guest request will be merged with the first l2meta that has to copy
> at least one of the two regions. It doesn't matter if the other one has
> nb_bytes == 0.
I think we can improve this later so that we merge everything together
(multiple l2metas and guest data) into a single request, but what this
seris implements is still a very good first step, so we shouldn't let
this stop us from taking the good rather than waiting for the perfect.
Kevin
- [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/23
- [Qemu-block] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow(), Alberto Garcia, 2017/05/23
- [Qemu-block] [PATCH 5/7] qcow2: Allow reading both COW regions with only one request, Alberto Garcia, 2017/05/23
- [Qemu-block] [PATCH 6/7] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}(), Alberto Garcia, 2017/05/23
- [Qemu-block] [PATCH 2/7] qcow2: Use unsigned int for both members of Qcow2COWRegion, Alberto Garcia, 2017/05/23
- [Qemu-block] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data, Alberto Garcia, 2017/05/23
- Re: [Qemu-block] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data, Alberto Garcia, 2017/05/26
[Qemu-block] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice, Alberto Garcia, 2017/05/23
[Qemu-block] [PATCH 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write(), Alberto Garcia, 2017/05/23
Re: [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Eric Blake, 2017/05/23