[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM |
Date: |
Mon, 26 Oct 2015 10:48:08 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Thu, Oct 22, 2015 at 05:22:16PM -0400, Gabriel L. Somlo wrote:
> I was re-reading the documentation for fw_cfg_add_file_callback(),
> and noticed that non-dma read operations check for the presence
> of a callback (and call it if present) for *every* *single* *byte*,
> even on 64-bit MMIO reads. That's also what the documentation says
> (in docs/specs/fw_cfg.txt, being moved into fw_cfg.h as per
> http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05315.html).
>
> During DMA reads, however, the callback is only checked once before
> each chunk, effectively once per DMA read operation.
>
> Now, typical callbacks I found throughout the qemu source tend to return
> immediately except for the first time they're invoked, but I wonder if
> skipping over all those extra "do I have a callback, if so call it,
> mostly so it can return without doing anything" per-byte operations
> account in some significant part for the dramatically faster transfers?
>
> Not sure how I'd test for that -- besides my not having anything
> resembling a viable ARM setup, I'm not sure if limiting the callbacks
> to only be invoked if (s->cur_offset == 0) would make sense, just as a
> test ?
I think Marc came to the conclusion that it's safe and therefore made
that optimization for DMA.
The same can be done for PIO.
Stefan
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Gabriel L. Somlo, 2015/10/22
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Gabriel L. Somlo, 2015/10/26
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Laszlo Ersek, 2015/10/26
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Gabriel L. Somlo, 2015/10/26
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Gerd Hoffmann, 2015/10/27
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Laszlo Ersek, 2015/10/27
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Gabriel L. Somlo, 2015/10/27
- Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM, Laszlo Ersek, 2015/10/28