754cb9c0eb
Currently, qemu_ram_foreach_* calls RAMBlockIterFunc with many block-specific arguments. But often iter func needs RAMBlock*. This refactoring is needed for fast access to RAMBlock flags from qemu_ram_foreach_block's callback. The only way to achieve this now is to call qemu_ram_block_from_host (which also enumerates blocks). So, this patch reduces complexity of qemu_ram_foreach_block() -> cb() -> qemu_ram_block_from_host() from O(n^2) to O(n). Fix RAMBlockIterFunc definition and add some functions to read RAMBlock* fields witch were passed. Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru> Message-Id: <20190215174548.2630-2-yury-kotov@yandex-team.ru> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> |
||
---|---|---|
.. | ||
aio-posix.c | ||
aio-wait.c | ||
aio-win32.c | ||
aiocb.c | ||
async.c | ||
atomic64.c | ||
base64.c | ||
bitmap.c | ||
bitops.c | ||
buffer.c | ||
bufferiszero.c | ||
cacheinfo.c | ||
compatfd.c | ||
coroutine-sigaltstack.c | ||
coroutine-ucontext.c | ||
coroutine-win32.c | ||
crc32c.c | ||
cutils.c | ||
drm.c | ||
envlist.c | ||
error.c | ||
event_notifier-posix.c | ||
event_notifier-win32.c | ||
fifo8.c | ||
filemonitor-inotify.c | ||
filemonitor-stub.c | ||
getauxval.c | ||
hbitmap.c | ||
hexdump.c | ||
host-utils.c | ||
id.c | ||
iohandler.c | ||
iov.c | ||
iova-tree.c | ||
keyval.c | ||
lockcnt.c | ||
log.c | ||
main-loop.c | ||
Makefile.objs | ||
memfd.c | ||
mmap-alloc.c | ||
module.c | ||
notify.c | ||
osdep.c | ||
oslib-posix.c | ||
oslib-win32.c | ||
pagesize.c | ||
path.c | ||
qdist.c | ||
qemu-config.c | ||
qemu-coroutine-io.c | ||
qemu-coroutine-lock.c | ||
qemu-coroutine-sleep.c | ||
qemu-coroutine.c | ||
qemu-error.c | ||
qemu-openpty.c | ||
qemu-option.c | ||
qemu-progress.c | ||
qemu-sockets.c | ||
qemu-thread-common.h | ||
qemu-thread-posix.c | ||
qemu-thread-win32.c | ||
qemu-timer-common.c | ||
qemu-timer.c | ||
qht.c | ||
qsp.c | ||
range.c | ||
rcu.c | ||
readline.c | ||
stats64.c | ||
sys_membarrier.c | ||
systemd.c | ||
thread-pool.c | ||
throttle.c | ||
timed-average.c | ||
trace-events | ||
unicode.c | ||
uri.c | ||
uuid.c | ||
vfio-helpers.c |