From: Paolo Bonzini <pbonzini@redhat.com>
To: Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
qemu devel <qemu-devel@nongnu.org>,
qemu block <qemu-block@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Fam Zheng <famz@redhat.com>, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
Wen Congyang <wency@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex
Date: Wed, 12 Oct 2016 12:53:32 +0200 [thread overview]
Message-ID: <ca1b07b0-be7e-78d2-7c09-6016c23e0c71@redhat.com> (raw)
In-Reply-To: <1476267508-19499-1-git-send-email-xiecl.fnst@cn.fujitsu.com>
On 12/10/2016 12:18, Changlong Xie wrote:
> + if (s->in_flight == MAX_NBD_REQUESTS) {
> + qemu_co_queue_wait(&s->free_sema);
> assert(s->in_flight < MAX_NBD_REQUESTS);
> }
I was wondering if this should be a while loop instead, but the
assertion protects against that. So:
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2016-10-12 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 10:18 [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex Changlong Xie
2016-10-12 10:32 ` Changlong Xie
2016-10-12 10:53 ` Paolo Bonzini [this message]
2016-10-24 1:44 ` Changlong Xie
2016-10-24 9:36 ` Paolo Bonzini
2016-10-25 2:09 ` Changlong Xie
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=ca1b07b0-be7e-78d2-7c09-6016c23e0c71@redhat.com \
--to=pbonzini@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wency@cn.fujitsu.com \
--cc=xiecl.fnst@cn.fujitsu.com \
--cc=zhang.zhanghailiang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).