aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/qemu_test/linuxkernel.py
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2025-03-04 23:03:31 +0100
committerCédric Le Goater <clg@redhat.com>2025-03-06 06:47:33 +0100
commitb5aa74968b27f37523c180e9c42ca007dbc7758f (patch)
tree0d12c52307e66002fd9f64c40f58a9e97437383b /tests/functional/qemu_test/linuxkernel.py
parentdc67daeed579ea52f045f78b88d9e5e712038ccf (diff)
downloadqemu-b5aa74968b27f37523c180e9c42ca007dbc7758f.zip
qemu-b5aa74968b27f37523c180e9c42ca007dbc7758f.tar.gz
qemu-b5aa74968b27f37523c180e9c42ca007dbc7758f.tar.bz2
thread-pool: Implement generic (non-AIO) pool support
Migration code wants to manage device data sending threads in one place. QEMU has an existing thread pool implementation, however it is limited to queuing AIO operations only and essentially has a 1:1 mapping between the current AioContext and the AIO ThreadPool in use. Implement generic (non-AIO) ThreadPool by essentially wrapping Glib's GThreadPool. This brings a few new operations on a pool: * thread_pool_wait() operation waits until all the submitted work requests have finished. * thread_pool_set_max_threads() explicitly sets the maximum thread count in the pool. * thread_pool_adjust_max_threads_to_work() adjusts the maximum thread count in the pool to equal the number of still waiting in queue or unfinished work. Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Link: https://lore.kernel.org/qemu-devel/b1efaebdbea7cb7068b8fb74148777012383e12b.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'tests/functional/qemu_test/linuxkernel.py')
0 files changed, 0 insertions, 0 deletions