All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: liu ping fan <qemulist@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Liu Ping Fan <pingfank@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] QEMUBH: make AioContext's bh re-entrant
Date: Thu, 20 Jun 2013 11:19:01 +0200	[thread overview]
Message-ID: <51C2C905.1060207@redhat.com> (raw)
In-Reply-To: <CAJnKYQkshFRK6CKxm-4dK6z3GQb9b9ZsajZWZQj1+Z0LQZ_eVg@mail.gmail.com>

Il 20/06/2013 11:12, liu ping fan ha scritto:
>> Right.  You need to order ->idle writes before ->scheduled writes, and
>> add memory barriers, or alternatively use two bits in ->scheduled so
>> that you can assign both atomically.
>>
> I think just shift the position of smp_rmb/wmb in _schedule and _poll,
> we can acheive this (callbacks will not refer to ->idle)

Yes, but you also need to swap ->idle and ->scheduled assignments
(aio_bh_poll reads scheduled before idle; qemu_bh_schedule* must write
idle before scheduled).

Paolo

  reply	other threads:[~2013-06-20  9:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 20:59 [Qemu-devel] [PATCH v3 0/2] QEMUBH: make AioContext's bh re-entrant Liu Ping Fan
2013-06-19 20:59 ` [Qemu-devel] [PATCH v3 1/2] add a header file for atomic operations Liu Ping Fan
2013-06-19 16:37   ` Richard Henderson
2013-06-19 16:42     ` Paolo Bonzini
2013-06-19 20:39   ` Torvald Riegel
2013-06-19 20:44     ` Richard Henderson
2013-06-20  8:03       ` Paolo Bonzini
2013-06-19 20:59 ` [Qemu-devel] [PATCH v3 2/2] QEMUBH: make AioContext's bh re-entrant Liu Ping Fan
2013-06-20  7:39   ` Stefan Hajnoczi
2013-06-20  8:16     ` Paolo Bonzini
2013-06-20  9:12       ` liu ping fan
2013-06-20  9:19         ` Paolo Bonzini [this message]
2013-06-20  9:41       ` liu ping fan
2013-06-20  9:45         ` Paolo Bonzini
2013-06-21  4:35           ` liu ping fan

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=51C2C905.1060207@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemulist@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.