public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: David Stevens <stevensd@chromium.org>,
	"Michael S . Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] virtio_balloon: Treat stats requests as wakeup events
Date: Tue, 19 Mar 2024 09:54:24 +0100	[thread overview]
Message-ID: <659fc57f-0c02-4bf2-9938-976200262145@redhat.com> (raw)
In-Reply-To: <20240318091034.535573-3-stevensd@google.com>

On 18.03.24 10:10, David Stevens wrote:
> From: David Stevens <stevensd@chromium.org>
> 
> Treat stats requests as wakeup events to ensure that the driver responds
> to device requests in a timely manner.
> 
> Signed-off-by: David Stevens <stevensd@chromium.org>
> ---
>   drivers/virtio/virtio_balloon.c | 75 ++++++++++++++++++++-------------
>   1 file changed, 46 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 7fe7ef5f1c77..402dec98e08c 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -121,11 +121,14 @@ struct virtio_balloon {
>   	struct page_reporting_dev_info pr_dev_info;
>   
>   	/* State for keeping the wakeup_source active while adjusting the balloon */
> -	spinlock_t adjustment_lock;
> -	bool adjustment_signal_pending;
> -	bool adjustment_in_progress;
> +	spinlock_t wakeup_lock;
> +	bool processing_wakeup_event;
> +	u32 wakeup_signal_mask;
>   };
>   
> +#define ADJUSTMENT_WAKEUP_SIGNAL (1 << 0)
> +#define STATS_WAKEUP_SIGNAL (1 << 1)

I'd suggest a different naming like:

VIRTIO_BALLOON_WAKEUP_SIGNAL_ADJUST
VIRTIO_BALLOON_WAKEUP_SIGNAL_STATS


Apart from that, nothing jumped at me.

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


      reply	other threads:[~2024-03-19  8:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  9:10 [PATCH 0/2] Improvements to virtio_balloon pm David Stevens
2024-03-18  9:10 ` [PATCH 1/2] virtio_balloon: Give the balloon its own wakeup source David Stevens
2024-03-19  8:44   ` David Hildenbrand
2024-03-18  9:10 ` [PATCH 2/2] virtio_balloon: Treat stats requests as wakeup events David Stevens
2024-03-19  8:54   ` David Hildenbrand [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=659fc57f-0c02-4bf2-9938-976200262145@redhat.com \
    --to=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=stevensd@chromium.org \
    --cc=virtualization@lists.linux-foundation.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