From: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: Let bdrv_drain_all() to call aio_poll() for each AioContext
Date: Wed, 13 May 2015 19:37:15 +0300 [thread overview]
Message-ID: <87r3qk77t0.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <w511tik8nzc.fsf@maestria.local.igalia.com> (Alberto Garcia's message of "Wed, 13 May 2015 18:02:31 +0200")
Alberto Garcia <berto@igalia.com> writes:
> On Wed 13 May 2015 05:18:31 PM CEST, Alexander Yarygin <yarygin@linux.vnet.ibm.com> wrote:
>
>> + if (!aio_ctxs || !g_list_find(aio_ctxs, aio_context)) {
>> + busy |= aio_poll(aio_context, busy);
>> + aio_ctxs = g_list_append(aio_ctxs, aio_context);
>> + }
>
> g_list_append() walks the whole list in order to append an element, I
> think you should use _prepend() instead.
>
> And since that's the only operation you're doing you can use a GSList
> instead.
>
> Berto
This seems reasonable, thanks.
prev parent reply other threads:[~2015-05-13 16:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 15:18 [Qemu-devel] [PATCH] block: Let bdrv_drain_all() to call aio_poll() for each AioContext Alexander Yarygin
2015-05-13 15:23 ` Paolo Bonzini
2015-05-13 16:34 ` Alexander Yarygin
2015-05-14 2:25 ` Fam Zheng
2015-05-14 10:57 ` Alexander Yarygin
2015-05-14 12:05 ` Paolo Bonzini
2015-05-14 14:29 ` Alexander Yarygin
2015-05-14 14:34 ` Paolo Bonzini
2015-05-13 16:02 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-05-13 16:37 ` Alexander Yarygin [this message]
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=87r3qk77t0.fsf@linux.vnet.ibm.com \
--to=yarygin@linux.vnet.ibm.com \
--cc=berto@igalia.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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 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).