From: Anthony Liguori <anthony@codemonkey.ws>
To: Yehuda Sadeh Weinraub <yehudasa@gmail.com>
Cc: Sage Weil <sage@newdream.net>, Kevin Wolf <kwolf@redhat.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org,
ceph-devel@vger.kernel.org, Christian Brunner <chb@muc.de>
Subject: Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v4)
Date: Fri, 08 Oct 2010 11:05:14 -0500 [thread overview]
Message-ID: <4CAF413A.1000407@codemonkey.ws> (raw)
In-Reply-To: <AANLkTinim=+MebUgSkpn2d2C2vY2bREwBor4xCf27s6n@mail.gmail.com>
On 10/08/2010 10:50 AM, Yehuda Sadeh Weinraub wrote:
> Oh, that makes it more clean. Considering that we did it for kvm, and
> looking at the kvm qemu_bh_schedule() implementation, it does look
> thread safe (there might be an issue though with canceling the bh
> though, haven't looked at it, not really relevant).
It's definitely not thread safe. Even though you can set the flag
atomically (not guaranteed, but assume you can), we rely on the fact
that we can check for pending BHs before entering sleep without having
to worry about new BHs being scheduled in between the sleep and the
check. If you schedule a BH in a thread then you open yourself up to
the race.
Regards,
Anthony Liguori
WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Yehuda Sadeh Weinraub <yehudasa@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org,
Sage Weil <sage@newdream.net>,
ceph-devel@vger.kernel.org, Christian Brunner <chb@muc.de>
Subject: Re: [Qemu-devel] [PATCH] ceph/rbd block driver for qemu-kvm (v4)
Date: Fri, 08 Oct 2010 11:05:14 -0500 [thread overview]
Message-ID: <4CAF413A.1000407@codemonkey.ws> (raw)
In-Reply-To: <AANLkTinim=+MebUgSkpn2d2C2vY2bREwBor4xCf27s6n@mail.gmail.com>
On 10/08/2010 10:50 AM, Yehuda Sadeh Weinraub wrote:
> Oh, that makes it more clean. Considering that we did it for kvm, and
> looking at the kvm qemu_bh_schedule() implementation, it does look
> thread safe (there might be an issue though with canceling the bh
> though, haven't looked at it, not really relevant).
It's definitely not thread safe. Even though you can set the flag
atomically (not guaranteed, but assume you can), we rely on the fact
that we can check for pending BHs before entering sleep without having
to worry about new BHs being scheduled in between the sleep and the
check. If you schedule a BH in a thread then you open yourself up to
the race.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2010-10-08 16:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 19:46 [PATCH] ceph/rbd block driver for qemu-kvm (v4) Christian Brunner
2010-08-02 19:46 ` [Qemu-devel] " Christian Brunner
2010-08-02 20:37 ` malc
2010-08-02 20:37 ` malc
2010-08-03 20:14 ` Christian Brunner
2010-08-03 20:14 ` Christian Brunner
2010-09-23 2:21 ` Yehuda Sadeh Weinraub
2010-09-23 2:21 ` Yehuda Sadeh Weinraub
2010-10-07 12:23 ` Kevin Wolf
2010-10-07 12:23 ` Kevin Wolf
2010-10-07 14:12 ` Anthony Liguori
2010-10-07 14:12 ` Anthony Liguori
2010-10-07 18:08 ` Yehuda Sadeh Weinraub
2010-10-07 18:08 ` Yehuda Sadeh Weinraub
2010-10-07 18:38 ` Anthony Liguori
2010-10-07 18:38 ` Anthony Liguori
2010-10-07 18:41 ` Yehuda Sadeh Weinraub
2010-10-07 18:41 ` Yehuda Sadeh Weinraub
2010-10-07 19:51 ` Anthony Liguori
2010-10-07 19:51 ` Anthony Liguori
2010-10-07 20:47 ` Yehuda Sadeh Weinraub
2010-10-07 20:47 ` Yehuda Sadeh Weinraub
2010-10-07 21:04 ` Anthony Liguori
2010-10-07 21:04 ` Anthony Liguori
2010-10-07 21:49 ` Yehuda Sadeh Weinraub
2010-10-07 21:49 ` Yehuda Sadeh Weinraub
2010-10-07 21:55 ` Anthony Liguori
2010-10-07 21:55 ` Anthony Liguori
2010-10-07 22:45 ` Sage Weil
2010-10-07 22:45 ` Sage Weil
2010-10-08 14:06 ` Anthony Liguori
2010-10-08 14:06 ` Anthony Liguori
2010-10-08 15:50 ` Yehuda Sadeh Weinraub
2010-10-08 15:50 ` Yehuda Sadeh Weinraub
2010-10-08 16:05 ` Anthony Liguori [this message]
2010-10-08 16:05 ` Anthony Liguori
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=4CAF413A.1000407@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=ceph-devel@vger.kernel.org \
--cc=chb@muc.de \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sage@newdream.net \
--cc=yehudasa@gmail.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.