[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variabl
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variable |
Date: |
Tue, 17 May 2022 17:21:05 +0200 |
On Tue, May 17, 2022 at 5:20 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> 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?
Yes, of course.
Paolo
[PATCH v3 3/3] thread-pool: remove stopping variable, Paolo Bonzini, 2022/05/14
Re: [PATCH v3 0/3] thread-pool: fix performance regression, Nicolas Saenz Julienne, 2022/05/17