qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]