Skip to contentSkip to conversation

Two signalfd_compat threads created: remove one

Qemu-devel Blue Swirl 2 participants 2 messages Sep 20, 2008 – Sep 22, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Hi,

Function qemu_aio_init() is called from both vl.c and block.c. This means that two threads handling signalfd_compat are created. This patch removes the call from vl.c.

vl.c +0 -1
Index: qemu/vl.c
===================================================================
@@ -8981,7 +8981,6 @@
 
     init_timers();
     init_timer_alarm();
-    qemu_aio_init();
     if (use_icount && icount_time_shift < 0) {
         use_icount = 2;
         /* 125MIPS seems a reasonable initial guess at the guest speed.
#1 lore raw
Quoted 6 lines · Blue Swirl

Hi,

Function qemu_aio_init() is called from both vl.c and block.c. This means that two threads handling signalfd_compat are created. This patch removes the call from vl.c.

Thanks for catching this. I committed a slightly different patch. We already go through the trouble of maintaining an aio_initialized variable so I added a simple check to short-cut the aio_init function if we've already been initialized. Your patch isn't necessary a bad one though since it's already called from bdrv_init. Please commit.

Regards,

Anthony Liguori