Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, "Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Adam Litke" <agl@us.ibm.com>,
	"Rusty Russell" <rusty@rustcorp.com.au>,
	virtualization@lists.linux.dev,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH v2] virtio_balloon: prime stats vq after virtio_device_ready()
Date: Mon, 6 Jul 2026 10:57:33 +0200	[thread overview]
Message-ID: <24336f56-1024-4c9b-8653-b1a4658b627c@kernel.org> (raw)
In-Reply-To: <20260706044122-mutt-send-email-mst@kernel.org>

On 7/6/26 10:43, Michael S. Tsirkin wrote:
> On Mon, Jul 06, 2026 at 10:38:18AM +0200, David Hildenbrand (Arm) wrote:
>>>
>>> Yes.
>>>
>>>
>>> Why not?
>>
>> I was wondering whether the spec would state something about that.
> 
> Sorry I do not get the question. Virtio API expects
> callers to serialize calls for each VQ. So this just prevents the work
> from running and accessing the VQ while probe calls add_buf/kick.
> I'll add a comment explaining that.
> But it has nothing to do with the spec.

The device is clearly not properly initialized yet.

Yet, we expect that we get a stats_request() callback that would try to
queue_work(). And IIUC, the stats_request() will be directly issued by the device.

In QEMU, that would mean that balloon_stats_poll_cb() runs, which would do a

if (s->stats_vq_elem == NULL) {
	...
	return
}

virtqueue_push(s->svq, s->stats_vq_elem, 0);
virtio_notify(vdev, s->svq);


That's why I'm confused :)

-- 
Cheers,

David


  reply	other threads:[~2026-07-06  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05 19:12 [PATCH v2] virtio_balloon: prime stats vq after virtio_device_ready() Michael S. Tsirkin
2026-07-06  7:28 ` David Hildenbrand (Arm)
2026-07-06  8:23   ` Michael S. Tsirkin
2026-07-06  8:38     ` David Hildenbrand (Arm)
2026-07-06  8:43       ` Michael S. Tsirkin
2026-07-06  8:57         ` David Hildenbrand (Arm) [this message]
2026-07-06 12:59           ` Michael S. Tsirkin
2026-07-06 13:42             ` David Hildenbrand (Arm)

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=24336f56-1024-4c9b-8653-b1a4658b627c@kernel.org \
    --to=david@kernel.org \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox