All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Roman Pen <roman.penyaev@profitbricks.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine after another one has been entered
Date: Wed, 31 May 2017 15:22:58 +0200	[thread overview]
Message-ID: <3066658b-be68-a69a-6f9e-5c8801bc7091@redhat.com> (raw)
In-Reply-To: <20170531130609.GE16733@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]



On 31/05/2017 15:06, Stefan Hajnoczi wrote:
>> +
>> +    while ((next = QSIMPLEQ_FIRST(&tmp_queue_wakeup))) {
>> +        QSIMPLEQ_REMOVE_HEAD(&tmp_queue_wakeup, co_queue_next);
>>          qemu_coroutine_enter(next);
>>      }
>>  }
> What happens if co remains alive and qemu_coroutine_enter(next) causes
> additional coroutines to add themselves to co->co_queue_wakeup?

Wouldn't that happen only if co is entered again?  Then it will also
reenter qemu_co_queue_run_restart, which may cause a different wakeup
order but not any missing wakeups.

Paolo


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2017-05-31 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 10:07 [Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine after another one has been entered Roman Pen
2017-05-30 11:35 ` Fam Zheng
2017-06-01  9:38   ` Roman Penyaev
2017-06-01  9:42     ` Paolo Bonzini
2017-06-01  9:48     ` Fam Zheng
2017-05-31 13:06 ` Stefan Hajnoczi
2017-05-31 13:22   ` Paolo Bonzini [this message]
2017-05-31 13:25     ` Roman Penyaev
2017-05-31 13:23   ` Roman Penyaev
2017-06-01 13:15     ` Stefan Hajnoczi
2017-06-01 16:08       ` Roman Penyaev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3066658b-be68-a69a-6f9e-5c8801bc7091@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roman.penyaev@profitbricks.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.