Stefan Hajnoczi d37c975fb1 aio: use g_slice_alloc() for AIOCB pooling
AIO control blocks are frequently acquired and released because each aio
request involves at least one AIOCB.  Therefore, we pool them to avoid
heap allocation overhead.

The problem with the freelist approach in AIOPool is thread-safety.  If
we want BlockDriverStates to associate with AioContexts that execute in
multiple threads, then a global freelist becomes a problem.

This patch drops the freelist and instead uses g_slice_alloc() which is
tuned for per-thread fixed-size object pools.  qemu_aio_get() and
qemu_aio_release() are now thread-safe.

Note that the change from g_malloc0() to g_slice_alloc() should be safe
since the freelist reuse case doesn't zero the AIOCB either.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14 18:19:21 +01:00
2012-10-22 13:26:42 -05:00
2012-08-28 20:38:39 +02:00
2012-11-01 13:10:06 +01:00
2012-10-24 10:26:22 +02:00
2012-08-28 20:38:39 +02:00
2012-11-05 11:54:49 +01:00
2012-09-07 09:02:44 +03:00
2012-10-05 16:07:49 -05:00
2012-11-01 13:10:06 +01:00
2012-08-04 15:51:23 +00:00
2012-01-13 10:37:00 +00:00
2012-11-02 18:34:59 +01:00
2012-05-14 07:27:24 +02:00
2012-11-14 13:29:12 +01:00
2012-11-05 11:54:49 +01:00
2012-10-31 04:12:23 +01:00
2012-11-01 19:49:45 +01:00
2012-10-31 04:12:23 +01:00
2012-10-31 04:12:23 +01:00
2012-03-30 08:14:11 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-01-10 09:36:43 +01:00
2012-03-07 13:03:51 +00:00
2012-09-15 15:34:27 +00:00
2012-04-01 20:30:23 +02:00
2012-11-10 13:49:20 +00:00
2012-11-10 13:49:20 +00:00
2012-10-23 08:58:25 -05:00
2012-09-22 17:59:12 +00:00
2012-03-14 22:20:27 +01:00
2012-10-23 08:58:25 -05:00
2012-11-12 14:38:29 +01:00
2012-11-12 14:38:29 +01:00
2012-11-12 14:38:29 +01:00
2012-10-23 08:58:25 -05:00
2012-03-19 15:17:21 +02:00
2012-10-29 18:25:22 +02:00
2012-10-31 04:12:23 +01:00
2011-12-09 11:25:22 +00:00
2012-11-05 11:54:49 +01:00
2012-10-05 16:07:49 -05:00
2012-11-10 13:24:39 +00:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-11-13 10:34:50 +01:00
2012-09-19 15:26:31 +02:00
2012-02-17 08:33:32 -06:00
2012-02-17 08:33:32 -06:00
2012-08-08 13:51:12 +02:00
2012-01-10 18:23:58 +01:00
2012-04-07 14:00:45 +00:00
2012-01-10 18:23:58 +01:00
2012-11-10 13:49:20 +00:00
2012-04-07 14:00:45 +00:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:16 -05:00
2012-10-31 09:45:47 +01:00
2011-12-06 10:07:04 +00:00
2012-08-13 14:17:53 -03:00
2012-08-16 13:41:15 -05:00
2012-08-16 13:41:15 -05:00
2012-11-02 13:07:54 -05:00
2012-04-24 09:50:31 -05:00
2011-12-11 17:50:43 -06:00
2012-11-01 19:49:44 +01:00
2012-10-06 18:47:04 +02:00
2012-09-28 17:51:47 +02:00
2012-09-28 17:51:47 +02:00
2012-09-05 11:44:53 -05:00
2012-10-23 08:58:25 -05:00
2012-10-03 13:48:45 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
A fork of QEMU-Nyx which is better suited for my bachelors thesis
Readme 154 MiB
Languages
C 90.3%
Dylan 2.5%
Python 2.1%
C++ 2%
Shell 1.7%
Other 1.4%