All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
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 04:43:59 -0400	[thread overview]
Message-ID: <20260706044122-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <6b8e4ad3-6909-4d0a-89a4-104a5ad9fe79@kernel.org>

On Mon, Jul 06, 2026 at 10:38:18AM +0200, David Hildenbrand (Arm) wrote:
> >>> -		virtqueue_kick(vb->stats_vq);
> >>> +		disable_work(&vb->update_balloon_stats_work);
> >>
> >> That's to stop the stats queue triggering stats_request() I assume?
> > 
> > Yes.
> > 
> >> Is that
> >> valid before we actually added+kicked ourselves?
> > 
> > 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.

> > 
> >> Also, can't we simply handle that in stats_request(), just ignoring it there?
> > 
> > Then we'd need to maintain a special flag and I dislike that.
> 
> I was hoping that we could use the device-ready indication, but there would be a
> small race window indeed.
> 
> -- 
> Cheers,
> 
> David



  reply	other threads:[~2026-07-06  8:44 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 [this message]
2026-07-06  8:57         ` David Hildenbrand (Arm)
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=20260706044122-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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 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.