Re: [PATCH 5.4.y] hv_utils: drain the timesync packets on onchannelcallback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 17, 2024 at 04:25:07PM -0700, Dexuan Cui wrote:
> From: Vineeth Pillai <viremana@xxxxxxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Michael Kelley <mikelley@xxxxxxxxxxxxx>
> Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@xxxxxxxxxxxxxxxxxxx
> Signed-off-by: Wei Liu <wei.liu@xxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>

Both now queued up, thanks.

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux