stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: stable@vger.kernel.org, mhklinux@outlook.com,
	Vineeth Pillai <viremana@linux.microsoft.com>,
	Wei Liu <wei.liu@kernel.org>
Subject: Re: [PATCH 5.4.y] hv_utils: drain the timesync packets on onchannelcallback
Date: Wed, 19 Jun 2024 11:30:02 +0200	[thread overview]
Message-ID: <2024061955-dance-civic-048d@gregkh> (raw)
In-Reply-To: <20240617232507.488-1-decui@microsoft.com>

On Mon, Jun 17, 2024 at 04:25:07PM -0700, Dexuan Cui wrote:
> From: Vineeth Pillai <viremana@linux.microsoft.com>
> 
> commit b46b4a8a57c377b72a98c7930a9f6969d2d4784e
> 
> There could be instances where a system stall prevents the timesync
> packets to be consumed. And this might lead to more than one packet
> pending in the ring buffer. Current code empties one packet per callback
> and it might be a stale one. So drain all the packets from ring buffer
> on each callback.
> 
> Signed-off-by: Vineeth Pillai <viremana@linux.microsoft.com>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com
> Signed-off-by: Wei Liu <wei.liu@kernel.org>
> 
> The old code in the upstream commit uses HV_HYP_PAGE_SIZE, but
> the old code in 5.4.y sitll uses PAGE_SIZE. Fixed this manually for 5.4.y.
> Note: 5.4.y already has the define HV_HYP_PAGE_SIZE, so the new code in
> in the upstream commit works for 5.4.y.
> 
> If there are multiple messages in the host-to-guest ringbuffer of the TimeSync
> device, 5.4.y only handles 1 message, and later the host puts new messages
> into the ringbuffer without signaling the guest because the ringbuffer is not
> empty, causing a "hung" ringbuffer. Backported the mainline fix for this issue.
> 
> Signed-off-by: Dexuan Cui <decui@microsoft.com>

Both now queued up, thanks.

greg k-h

      reply	other threads:[~2024-06-19  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 23:25 [PATCH 5.4.y] hv_utils: drain the timesync packets on onchannelcallback Dexuan Cui
2024-06-19  9:30 ` Greg KH [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=2024061955-dance-civic-048d@gregkh \
    --to=greg@kroah.com \
    --cc=decui@microsoft.com \
    --cc=mhklinux@outlook.com \
    --cc=stable@vger.kernel.org \
    --cc=viremana@linux.microsoft.com \
    --cc=wei.liu@kernel.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;
as well as URLs for NNTP newsgroup(s).