[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignm
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignment |
Date: |
Mon, 09 Dec 2013 14:40:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 09/12/2013 13:58, Kevin Wolf ha scritto:
> How is BlockLimits supposed with respect to inheritance of values
> through the BDS tree?
I think right now the accessor wrappers for the various BlockLimits
field sort that out. Of course this could be slow if the accessors end
up in the fast path (but that's not different from what your series does
already).
> I tried looking at the code, but for example
> bl.opt_transfer_length is only forwarded in raw, so for any other format
> (or if you ever put a filter there) it simply doesn't work.
That's correct.
For example, for qcow2 the optimal transfer length could be the cluster
size. Without benchmarking, I didn't complain about Peter's choice of
leaving it zero.
> I could initialise a new BlockLimits.opt_mem_align field in
> bdrv_open_common() with the value of bs->file->bl.opt_mem_align, and in
> bdrv_open_backing_file() change it to MAX(bs->bl.opt_mem_align,
> bs->backing_hd->bl.opt_mem_align). The block driver could then in
> bdrv_open() override the former, but never the latter.
>
> What would happen on bdrv_reopen(), specifically toggling O_DIRECT? The
> values would have to change then.
Yes. This also goes in favor of making wrappers handle the stacking of
limits, at least for now.
Paolo
- [Qemu-devel] [RFC PATCH 00/19] block: Support for 512b-on-4k emulation, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 01/19] qemu_memalign: Allow small alignments, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 02/19] block: Detect unaligned length in bdrv_qiov_is_aligned(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 03/19] block: Don't use guest sector size for qemu_blockalign(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 04/19] block: rename buffer_alignment to guest_block_size, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignment, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 06/19] block: Introduce bdrv_aligned_preadv(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 07/19] block: Introduce bdrv_co_do_preadv(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 08/19] block: Introduce bdrv_aligned_pwritev(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 09/19] block: write: Handle COR dependency after I/O throttling, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 10/19] block: Introduce bdrv_co_do_pwritev(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 11/19] block: Switch BdrvTrackedRequest to byte granularity, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 12/19] block: Allow waiting for overlapping requests between begin/end, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 13/19] block: Make zero-after-EOF work with larger alignment, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 14/19] block: Generalise and optimise COR serialisation, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 15/19] block: Make overlap range for serialisation dynamic, Kevin Wolf, 2013/12/06