All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, nsaenzju@redhat.com,
	"Lukáš Doktor" <ldoktor@redhat.com>
Subject: Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variable
Date: Tue, 17 May 2022 16:19:58 +0100	[thread overview]
Message-ID: <YoO9HrmmpvBBN9Zi@stefanha-x1.localdomain> (raw)
In-Reply-To: <20220514065012.1149539-3-pbonzini@redhat.com>

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

On Sat, May 14, 2022 at 08:50:11AM +0200, Paolo Bonzini wrote:
> @@ -134,6 +122,12 @@ static void *worker_thread(void *opaque)
>      pool->cur_threads--;
>      qemu_cond_signal(&pool->worker_stopped);
>      qemu_mutex_unlock(&pool->lock);
> +
> +    /*
> +     * Wake up another thread, in case we got a wakeup but decided
> +     * to exit due to pool->cur_threads > pool->max_threads.
> +     */
> +    qemu_cond_signal(&pool->worker_stopped);

&pool->worker_stopped? Was this supposed to be &pool->request_cond?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2022-05-17 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14  6:50 [PATCH v3 0/3] thread-pool: fix performance regression Paolo Bonzini
2022-05-14  6:50 ` [PATCH v3 1/3] thread-pool: optimize scheduling of completion bottom half Paolo Bonzini
2022-05-17 15:20   ` Stefan Hajnoczi
2022-05-14  6:50 ` [PATCH v3 2/3] thread-pool: replace semaphore with condition variable Paolo Bonzini
2022-05-17 12:46   ` Nicolas Saenz Julienne
2022-05-17 14:18     ` Paolo Bonzini
2022-05-17 14:37       ` Nicolas Saenz Julienne
2022-05-17 15:19   ` Stefan Hajnoczi [this message]
2022-05-17 15:21     ` Paolo Bonzini
2022-05-14  6:50 ` [PATCH v3 3/3] thread-pool: remove stopping variable Paolo Bonzini
2022-05-17 15:20   ` Stefan Hajnoczi
2022-05-17 14:30 ` [PATCH v3 0/3] thread-pool: fix performance regression Nicolas Saenz Julienne

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=YoO9HrmmpvBBN9Zi@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=ldoktor@redhat.com \
    --cc=nsaenzju@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 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.