qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Cc: kwolf@redhat.com, fam@euphon.net, berrange@redhat.com,
	qemu-block@nongnu.org, michael.roth@amd.com, mtosatti@redhat.com,
	qemu-devel@nongnu.org, armbru@redhat.com, eduardo@habkost.net,
	hreitz@redhat.com, pbonzini@redhat.com, eblake@redhat.com
Subject: Re: [PATCH v3 0/3] util/thread-pool: Expose minimun and maximum size
Date: Wed, 30 Mar 2022 13:22:47 +0100	[thread overview]
Message-ID: <YkRLl35Mq9cOoPbb@stefanha-x1.localdomain> (raw)
In-Reply-To: <20220316135321.142850-1-nsaenzju@redhat.com>

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

On Wed, Mar 16, 2022 at 02:53:20PM +0100, Nicolas Saenz Julienne wrote:
> As discussed on the previous RFC[1] the thread-pool's dynamic thread
> management doesn't play well with real-time and latency sensitive
> systems. This series introduces a set of controls that'll permit
> achieving more deterministic behaviours, for example by fixing the
> pool's size.
> 
> We first introduce a new common interface to event loop configuration by
> moving iothread's already available properties into an abstract class
> called 'EventLooopBackend' and have both 'IOThread' and the newly
> created 'MainLoop' inherit the properties from that class.
> 
> With this new configuration interface in place it's relatively simple to
> introduce new options to fix the even loop's thread pool sizes. The
> resulting QAPI looks like this:
> 
>     -object main-loop,id=main-loop,thread-pool-min=1,thread-pool-max=1
> 
> Note that all patches are bisect friendly and pass all the tests.
> 
> [1] https://patchwork.ozlabs.org/project/qemu-devel/patch/20220202175234.656711-1-nsaenzju@redhat.com/
> 
> ---
> Changes since v2:
>  - Get rid of wrong locking/waiting
>  - Fix qapi versioning
>  - Better commit messages
> 
> Changes since v1:
>  - Address all Stefan's comments
>  - Introduce new fix
> 
> Nicolas Saenz Julienne (3):
>   Introduce event-loop-base abstract class
>   util/main-loop: Introduce the main loop into QOM
>   util/event-loop-base: Introduce options to set the thread pool size
> 
>  event-loop-base.c                | 140 +++++++++++++++++++++++++++++++
>  include/block/aio.h              |  10 +++
>  include/block/thread-pool.h      |   3 +
>  include/qemu/main-loop.h         |  10 +++
>  include/sysemu/event-loop-base.h |  41 +++++++++
>  include/sysemu/iothread.h        |   6 +-
>  iothread.c                       |  68 +++++----------
>  meson.build                      |  26 +++---
>  qapi/qom.json                    |  34 +++++++-
>  util/aio-posix.c                 |   1 +
>  util/async.c                     |  20 +++++
>  util/main-loop.c                 |  65 ++++++++++++++
>  util/thread-pool.c               |  55 +++++++++++-
>  13 files changed, 414 insertions(+), 65 deletions(-)
>  create mode 100644 event-loop-base.c
>  create mode 100644 include/sysemu/event-loop-base.h
> 
> -- 
> 2.35.1
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

      parent reply	other threads:[~2022-03-30 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 13:53 [PATCH v3 0/3] util/thread-pool: Expose minimun and maximum size Nicolas Saenz Julienne
2022-03-16 13:53 ` [PATCH v3 1/3] Introduce event-loop-base abstract class Nicolas Saenz Julienne
2022-03-16 13:53 ` [PATCH v3 2/3] util/main-loop: Introduce the main loop into QOM Nicolas Saenz Julienne
2022-03-16 14:28   ` Markus Armbruster
2022-03-29 11:30     ` Nicolas Saenz Julienne
2022-03-16 13:53 ` [PATCH v3 3/3] util/event-loop-base: Introduce options to set the thread pool size Nicolas Saenz Julienne
2022-03-30 12:22 ` 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=YkRLl35Mq9cOoPbb@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mtosatti@redhat.com \
    --cc=nsaenzju@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).