From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
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, eblake@redhat.com
Subject: Re: [PATCH 1/3] util & iothread: Introduce event-loop abstract class
Date: Sat, 26 Feb 2022 08:36:52 +0100 [thread overview]
Message-ID: <50fedd74-81b5-dab6-6279-b01591970acd@redhat.com> (raw)
In-Reply-To: <YhdUcRNi95PY0X98@stefanha-x1.localdomain>
On 2/24/22 10:48, Stefan Hajnoczi wrote:
> On Mon, Feb 21, 2022 at 06:08:43PM +0100, Nicolas Saenz Julienne wrote:
>> diff --git a/qom/meson.build b/qom/meson.build
>> index 062a3789d8..c20e5dd1cb 100644
>> --- a/qom/meson.build
>> +++ b/qom/meson.build
>> @@ -4,6 +4,7 @@ qom_ss.add(files(
>> 'object.c',
>> 'object_interfaces.c',
>> 'qom-qobject.c',
>> + '../util/event-loop.c',
>
> This looks strange. I expected util/event-loop.c to be in
> util/meson.build and added to the util_ss SourceSet instead of qom_ss.
Or alternatively, to be in the root just like iothread.c.
Paolo
> What is the reason for this?
>
>> ))
>>
>> qmp_ss.add(files('qom-qmp-cmds.c'))
>> diff --git a/util/event-loop.c b/util/event-loop.c
>> new file mode 100644
>> index 0000000000..f3e50909a0
>> --- /dev/null
>> +++ b/util/event-loop.c
>
> The naming is a little inconsistent. The filename "event-loop.c" does
> match the QOM type or typedef name event-loop-backend/EventLoopBackend.
>
> I suggest calling the source file event-loop-base.c and the QOM type
> "event-loop-base".
>
>> @@ -0,0 +1,142 @@
>> +/*
>> + * QEMU event-loop backend
>> + *
>> + * Copyright (C) 2022 Red Hat Inc
>> + *
>> + * Authors:
>> + * Nicolas Saenz Julienne <nsaenzju@redhat.com>
>
> Most of the code is cut and pasted. It would be nice to carry over the
> authorship information too.
>
>> +struct EventLoopBackend {
>> + Object parent;
>> +
>> + /* AioContext poll parameters */
>> + int64_t poll_max_ns;
>> + int64_t poll_grow;
>> + int64_t poll_shrink;
>
> These parameters do not affect the main loop because it cannot poll. If
> you decide to keep them in the base class, please document that they
> have no effect on the main loop so users aren't confused. I would keep
> them unique to IOThread for now.
next prev parent reply other threads:[~2022-02-26 7:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 17:08 [PATCH 0/3] util/thread-pool: Expose minimun and maximum size Nicolas Saenz Julienne
2022-02-21 17:08 ` [PATCH 1/3] util & iothread: Introduce event-loop abstract class Nicolas Saenz Julienne
2022-02-24 9:48 ` Stefan Hajnoczi
2022-02-26 7:36 ` Paolo Bonzini [this message]
2022-02-28 19:05 ` Nicolas Saenz Julienne
2022-03-01 9:17 ` Stefan Hajnoczi
2022-02-21 17:08 ` [PATCH 2/3] util/main-loop: Introduce the main loop into QOM Nicolas Saenz Julienne
2022-02-22 6:07 ` Markus Armbruster
2022-02-24 10:01 ` Stefan Hajnoczi
2022-02-28 19:12 ` Nicolas Saenz Julienne
2022-02-21 17:08 ` [PATCH 3/3] util/event-loop: Introduce options to set the thread pool size Nicolas Saenz Julienne
2022-02-24 10:40 ` Stefan Hajnoczi
2022-02-28 19:20 ` 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=50fedd74-81b5-dab6-6279-b01591970acd@redhat.com \
--to=pbonzini@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=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).