thread-pool: avoid per-thread-pool EventNotifier
commit75ada6b7631bdf5d9f56af845c5096f5d75d33bf
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Jul 2014 14:44:25 +0000 (15 16:44 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 8 Sep 2014 16:23:06 +0000 (8 11:23 -0500)
tree4559d459ba46a6f6d4edccaea62a24e80ca1e018
parentbe3af755ac1f5bd13a555ca75908b9e9b90aaa31
thread-pool: avoid per-thread-pool EventNotifier

EventNotifier is implemented using an eventfd or pipe.  It therefore
consumes file descriptors, which can be limited by rlimits and should
therefore be used sparingly.

Switch from EventNotifier to QEMUBH in thread-pool.c.  Originally
EventNotifier was used because qemu_bh_schedule() was not thread-safe
yet.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit c2e50e3d11a0bf4c973cc30478c1af0f2d5f8e81)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
thread-pool.c