qemu-patch-raspberry4/util
Vladimir Sementsov-Ogievskiy f16ba00de9 util: introduce SharedResource
Introduce an API for some shared splittable resource, like memory.
It's going to be used by backup. Backup uses both read/write io and
copy_range. copy_range may consume memory implictly, so the new API is
abstract: it doesn't allocate any real memory but only hands out
tickets.

The idea is that we have some total amount of something and callers
should wait in coroutine queue if there is not enough of the resource
at the moment.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20191022111805.3432-5-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28 11:22:31 +01:00
..
aio-posix.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
aio-wait.c block: Use a single global AioWait 2018-09-25 15:50:15 +02:00
aio-win32.c aio-posix: Fix concurrent aio_poll/set_fd_handler. 2019-01-14 14:09:41 +00:00
aiocb.c block: move AioContext, QEMUTimer, main-loop to libqemuutil 2017-02-21 11:14:07 +00:00
async.c util/async: avoid useless cast 2019-10-24 19:26:05 +02:00
atomic64.c util: add atomic64 2018-10-02 18:47:55 +02:00
base64.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
bitmap.c bitmap: Add bitmap_copy_with_{src|dst}_offset() 2019-07-15 15:39:02 +02:00
bitops.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
buffer.c qemu-common: stop including qemu/host-utils.h from qemu-common.h 2016-05-19 16:42:28 +02:00
bufferiszero.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
cacheinfo.c Fix cacheline detection on FreeBSD/powerpc. 2019-09-19 14:42:13 +02:00
compatfd.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
coroutine-sigaltstack.c coroutine-sigaltstack: use helper for allocating stack memory 2016-09-29 14:13:39 +02:00
coroutine-ucontext.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
coroutine-win32.c coroutine: add a macro for the coroutine stack size 2016-09-29 14:13:39 +02:00
crc32c.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
cutils.c cutils: remove one unnecessary pointer operation 2019-07-15 15:39:02 +02:00
drm.c util: promote qemu_egl_rendernode_open() to libqemuutil 2018-08-27 10:51:44 +02:00
envlist.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
error.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
event_notifier-posix.c event_notifier: avoid dandling file descriptor in event_notifier_cleanup 2019-10-24 19:26:52 +02:00
event_notifier-win32.c Revert "qemu: add a cleanup callback function to EventNotifier" 2018-01-24 19:20:19 +02:00
fifo8.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
filemonitor-inotify.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
filemonitor-stub.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
getauxval.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
guest-random.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
hbitmap.c hbitmap: handle set/reset with zero length 2019-10-28 11:22:30 +01:00
hexdump.c util: Improved qemu_hexmap() to include an ascii dump of the buffer 2016-04-06 09:52:07 +08:00
host-utils.c host-utils: Implement unsigned quadword left/right shift and unit tests 2017-01-31 10:10:14 +11:00
id.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
iov.c util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended 2019-10-08 14:27:35 +01:00
iova-tree.c util: remove redundant include of glib.h and add osdep.h 2018-06-29 12:22:28 +01:00
keyval.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
lockcnt.c qemu-thread: optimize QemuLockCnt with futexes on Linux 2017-01-16 13:25:18 +00:00
log.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
main-loop.c util: merge main-loop.c and iohandler.c 2019-07-15 11:20:43 +02:00
Makefile.objs util: introduce SharedResource 2019-10-28 11:22:31 +01:00
memfd.c linux-user: add memfd_create 2019-09-11 08:46:17 +02:00
mmap-alloc.c util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap() 2019-04-25 14:17:36 -03:00
module.c module: return success on module load 2019-08-21 16:29:57 +02:00
notify.c xen / notify: introduce a new XenWatchList abstraction 2019-09-24 12:18:47 +01:00
osdep.c slirp: prefer c99 types over BSD kind 2019-02-07 15:49:08 +02:00
oslib-posix.c memory: fetch pmem size in get_file_size() 2019-09-16 12:32:21 +02:00
oslib-win32.c util: WSAEWOULDBLOCK on connect should map to EINPROGRESS 2019-10-04 18:49:18 +02:00
pagesize.c util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
path.c util/path: Do not cache all filenames at startup 2019-06-24 22:19:30 +02:00
qdist.c qdist: return "(empty)" instead of NULL when printing an empty dist 2016-08-03 18:44:56 +02:00
qemu-co-shared-resource.c util: introduce SharedResource 2019-10-28 11:22:31 +01:00
qemu-config.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-coroutine-io.c yield_until_fd_readable: make it work with any AioContect 2019-10-25 14:38:29 +02:00
qemu-coroutine-lock.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-coroutine-sleep.c qemu-coroutine-sleep: introduce qemu_co_sleep_wake 2019-10-22 09:22:07 -05:00
qemu-coroutine.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-error.c monitor error: Make printf()-like functions return a value 2019-04-18 22:18:59 +02:00
qemu-openpty.c util: Clean up includes 2016-02-04 17:01:04 +00:00
qemu-option.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-print.c qemu-print: New qemu_fprintf(), qemu_vfprintf() 2019-04-18 22:18:59 +02:00
qemu-progress.c progress: Show current progress on SIGINFO 2017-04-28 18:48:11 +02:00
qemu-sockets.c util/qemu-sockets: fix keep_alive handling in inet_connect_saddr 2019-09-25 08:15:44 -05:00
qemu-thread-common.h Clean up includes 2018-12-20 10:29:08 +01:00
qemu-thread-posix.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
qemu-thread-win32.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
qemu-timer-common.c util: Clean up includes 2016-02-04 17:01:04 +00:00
qemu-timer.c qemu-timer: reuse MIN macro in qemu_timeout_ns_to_ms 2019-10-24 20:10:18 +02:00
qht.c qht: constify arguments to some internal functions 2018-09-26 08:55:54 -07:00
qsp.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
range.c Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
rcu.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
readline.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
stats64.c util/stats64: Fix min/max comparisons 2017-11-15 09:34:51 +01:00
sys_membarrier.c sys_membarrier: fix up include directives 2018-04-05 14:37:38 +02:00
systemd.c qemu-ga: obey LISTEN_PID when using systemd socket activation 2017-03-19 11:12:12 +01:00
thread-pool.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
throttle.c throttle: Assert that bkt->max is valid in throttle_compute_wait() 2017-09-26 14:46:23 +02:00
timed-average.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
trace-events socket: Add backlog parameter to socket_listen 2019-09-03 23:24:42 +02:00
unicode.c json: Reject invalid UTF-8 sequences 2018-08-24 20:26:37 +02:00
uri.c cutils: Provide strchrnul 2018-06-29 12:32:10 +02:00
uuid.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vfio-helpers.c Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00