From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Gregory Price <gourry@gourry.net>
Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-team@meta.com, mst@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
hannes@cmpxchg.org, surenb@google.com, peterz@infradead.org,
mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com
Subject: Re: [RFC PATCH 2/2] virtio-balloon: add stats push mode
Date: Tue, 16 Jun 2026 17:52:29 +0200 [thread overview]
Message-ID: <3e7d2d74-ceb2-4064-928f-921401fea75e@kernel.org> (raw)
In-Reply-To: <ajFhOa5kEkPfqPVD@gourry-fedora-PF4VCD3F>
On 6/16/26 16:44, Gregory Price wrote:
> On Tue, Jun 16, 2026 at 04:32:46PM +0200, David Hildenbrand (Arm) wrote:
>> On 6/16/26 15:57, Gregory Price wrote:
>>>
>>> Definitely an RFC here because I'm not sure if I was missing something
>>> that might help me solve the problem.
>>
>> Well, in QEMU we just run a timer internally that does the polling.
>>
>> Then, upper layers in the stack can ask QEMU for the latest stats.
>>
>> There, you just get the stats along with a "last-update" timestamp.
>>
>
> That makes sense, although don't you just push the blocking operation
> into yet another thread on the host?
I think timers are run from the QEMU main thread, so no separate thread just for
the timer.
And IIRC, there will be no blocking. At least if I understand your concern
correctly.
balloon_stats_poll_cb() will do a virtqueue_push()+virtio_notify(), which will
notify the device. The main thread will continue afterwards doing what a main
thread usually does.
A VCPU will process the request in the VM and send it back + notify the device.
--
Cheers,
David
next prev parent reply other threads:[~2026-06-16 15:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 16:50 [RFC PATCH 0/2] virtio-balloon: extended stats and push mode Gregory Price
2026-05-13 16:50 ` [RFC PATCH 1/2] virtio-balloon: extend stats with memory composition and pressure data Gregory Price
2026-06-16 12:30 ` David Hildenbrand (Arm)
2026-06-16 13:49 ` Gregory Price
2026-06-16 14:19 ` David Hildenbrand (Arm)
2026-05-13 16:50 ` [RFC PATCH 2/2] virtio-balloon: add stats push mode Gregory Price
2026-06-16 12:33 ` David Hildenbrand (Arm)
2026-06-16 13:57 ` Gregory Price
2026-06-16 14:32 ` David Hildenbrand (Arm)
2026-06-16 14:44 ` Gregory Price
2026-06-16 15:52 ` David Hildenbrand (Arm) [this message]
2026-06-16 15:58 ` Gregory Price
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=3e7d2d74-ceb2-4064-928f-921401fea75e@kernel.org \
--to=david@kernel.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=eperezma@redhat.com \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=jasowang@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@meta.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=surenb@google.com \
--cc=vincent.guittot@linaro.org \
--cc=virtualization@lists.linux.dev \
--cc=vschneid@redhat.com \
--cc=xuanzhuo@linux.alibaba.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 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.