qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

qemu_coroutine_yield switches thread?


From: Stefan Reiter
Subject: qemu_coroutine_yield switches thread?
Date: Thu, 16 Apr 2020 10:06:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Hi list,

quick question: Can a resume from a qemu_coroutine_yield happen in a different thread?

Well, it can, since I'm seeing it happen, but is that okay or a bug?

I.e. in a backup-job the following can sporadically trip:

  unsigned long tid = pthread_self();
  qemu_get_current_aio_context(); // returns main context
  qemu_coroutine_yield();
  qemu_get_current_aio_context(); // still returns main context, but:
  assert(tid == pthread_self()); // this fails

It seems to be called from a vCPU thread when it happens. VM uses no iothreads.

~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]