qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()
Date: Tue, 7 Apr 2015 14:45:19 +0100	[thread overview]
Message-ID: <20150407134519.GC21559@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1427992762-10126-1-git-send-email-stefanha@redhat.com>

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

On Thu, Apr 02, 2015 at 05:39:22PM +0100, Stefan Hajnoczi wrote:
> This patch simplifies thread_pool_completion_bh().
> 
> The function first checks elem->state:
> 
>   if (elem->state != THREAD_DONE) {
>       continue;
>   }
> 
> It then goes on to check elem->state == THREAD_DONE although we already
> know this must be the case.
> 
> The QLIST_REMOVE() is duplicated down both branches of an if-else
> statement so that can be lifted out as well.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  thread-pool.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2015-04-07 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 16:39 [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh() Stefan Hajnoczi
2015-04-02 17:12 ` Paolo Bonzini
2015-04-07 13:45 ` Stefan Hajnoczi [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=20150407134519.GC21559@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).