[xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Marcelo Henrique Cerri
From: Dexuan Cui <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1826416

[Fixes upstream in a much larger set of patches that are not worth backporting
to 4.9 - gregkh]

When the space available before start of reading (cached_write_sz)
is the same as the host required space (pending_sz), we need to
still signal host.

Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")

Signed-off-by: John Starks <[hidden email]>
Signed-off-by: Dexuan Cui <[hidden email]>
Signed-off-by: Stephen Hemminger <[hidden email]>
Signed-off-by: Greg Kroah-Hartman <[hidden email]>
(cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a)
Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
---
 include/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index c92a083bcf16..f55a4c0c1475 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1520,11 +1520,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
 
  cur_write_sz = hv_get_bytes_to_write(rbi);
 
- if (cur_write_sz < pending_sz)
+ if (cur_write_sz <= pending_sz)
  return;
 
  cached_write_sz = hv_get_cached_bytes_to_write(rbi);
- if (cached_write_sz < pending_sz)
+ if (cached_write_sz <= pending_sz)
  vmbus_setevent(channel);
 
  return;
--
2.20.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Marcelo Henrique Cerri
On Mon, May 13, 2019 at 11:42:35AM -0300, Marcelo Henrique Cerri wrote:

> From: Dexuan Cui <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1826416
>
> [Fixes upstream in a much larger set of patches that are not worth backporting
> to 4.9 - gregkh]
>
> When the space available before start of reading (cached_write_sz)
> is the same as the host required space (pending_sz), we need to
> still signal host.
>
> Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")
>
> Signed-off-by: John Starks <[hidden email]>
> Signed-off-by: Dexuan Cui <[hidden email]>
> Signed-off-by: Stephen Hemminger <[hidden email]>
> Signed-off-by: Greg Kroah-Hartman <[hidden email]>
> (cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a)
s/cherry picked from/cherry picked from stable 4.9.x/

We have several upstream patches for hyper-v applied on our 4.4.

> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
> ---
>  include/linux/hyperv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index c92a083bcf16..f55a4c0c1475 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -1520,11 +1520,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
>  
>   cur_write_sz = hv_get_bytes_to_write(rbi);
>  
> - if (cur_write_sz < pending_sz)
> + if (cur_write_sz <= pending_sz)
>   return;
>  
>   cached_write_sz = hv_get_cached_bytes_to_write(rbi);
> - if (cached_write_sz < pending_sz)
> + if (cached_write_sz <= pending_sz)
>   vmbus_setevent(channel);
>  
>   return;
> --
> 2.20.1
>
--
Regards,
Marcelo


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Kamal Mostafa-2
ACK (with the cherry line correction).  Patch surely would have been
suitable for stable 4.4, if that still existed.

Acked-by: Kamal Mostafa <[hidden email]>

 -Kamal

On Mon, May 13, 2019 at 12:20:25PM -0300, Marcelo Henrique Cerri wrote:

> On Mon, May 13, 2019 at 11:42:35AM -0300, Marcelo Henrique Cerri wrote:
> > From: Dexuan Cui <[hidden email]>
> >
> > BugLink: http://bugs.launchpad.net/bugs/1826416
> >
> > [Fixes upstream in a much larger set of patches that are not worth backporting
> > to 4.9 - gregkh]
> >
> > When the space available before start of reading (cached_write_sz)
> > is the same as the host required space (pending_sz), we need to
> > still signal host.
> >
> > Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")
> >
> > Signed-off-by: John Starks <[hidden email]>
> > Signed-off-by: Dexuan Cui <[hidden email]>
> > Signed-off-by: Stephen Hemminger <[hidden email]>
> > Signed-off-by: Greg Kroah-Hartman <[hidden email]>
> > (cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a)
>
> s/cherry picked from/cherry picked from stable 4.9.x/
>
> We have several upstream patches for hyper-v applied on our 4.4.
>
> > Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
> > ---
> >  include/linux/hyperv.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> > index c92a083bcf16..f55a4c0c1475 100644
> > --- a/include/linux/hyperv.h
> > +++ b/include/linux/hyperv.h
> > @@ -1520,11 +1520,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
> >  
> >   cur_write_sz = hv_get_bytes_to_write(rbi);
> >  
> > - if (cur_write_sz < pending_sz)
> > + if (cur_write_sz <= pending_sz)
> >   return;
> >  
> >   cached_write_sz = hv_get_cached_bytes_to_write(rbi);
> > - if (cached_write_sz < pending_sz)
> > + if (cached_write_sz <= pending_sz)
> >   vmbus_setevent(channel);
> >  
> >   return;
> > --
> > 2.20.1
> >
>
> --
> Regards,
> Marcelo
>



> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Connor Kuehl
In reply to this post by Marcelo Henrique Cerri
On 5/13/19 7:42 AM, Marcelo Henrique Cerri wrote:

> From: Dexuan Cui <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1826416
>
> [Fixes upstream in a much larger set of patches that are not worth backporting
> to 4.9 - gregkh]
>
> When the space available before start of reading (cached_write_sz)
> is the same as the host required space (pending_sz), we need to
> still signal host.
>
> Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")
>
> Signed-off-by: John Starks <[hidden email]>
> Signed-off-by: Dexuan Cui <[hidden email]>
> Signed-off-by: Stephen Hemminger <[hidden email]>
> Signed-off-by: Greg Kroah-Hartman <[hidden email]>
> (cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a)
> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
Acked-by: Connor Kuehl <[hidden email]>

> ---
>  include/linux/hyperv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index c92a083bcf16..f55a4c0c1475 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -1520,11 +1520,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
>  
>   cur_write_sz = hv_get_bytes_to_write(rbi);
>  
> - if (cur_write_sz < pending_sz)
> + if (cur_write_sz <= pending_sz)
>   return;
>  
>   cached_write_sz = hv_get_cached_bytes_to_write(rbi);
> - if (cached_write_sz < pending_sz)
> + if (cached_write_sz <= pending_sz)
>   vmbus_setevent(channel);
>  
>   return;
>

--
Connor

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

pEpkey.asc (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [xenial][PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Kleber Souza
In reply to this post by Marcelo Henrique Cerri
On 5/13/19 4:42 PM, Marcelo Henrique Cerri wrote:

> From: Dexuan Cui <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1826416
>
> [Fixes upstream in a much larger set of patches that are not worth backporting
> to 4.9 - gregkh]
>
> When the space available before start of reading (cached_write_sz)
> is the same as the host required space (pending_sz), we need to
> still signal host.
>
> Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")
>
> Signed-off-by: John Starks <[hidden email]>
> Signed-off-by: Dexuan Cui <[hidden email]>
> Signed-off-by: Stephen Hemminger <[hidden email]>
> Signed-off-by: Greg Kroah-Hartman <[hidden email]>
> (cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a)
> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
> ---
>  include/linux/hyperv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index c92a083bcf16..f55a4c0c1475 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -1520,11 +1520,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
>  
>   cur_write_sz = hv_get_bytes_to_write(rbi);
>  
> - if (cur_write_sz < pending_sz)
> + if (cur_write_sz <= pending_sz)
>   return;
>  
>   cached_write_sz = hv_get_cached_bytes_to_write(rbi);
> - if (cached_write_sz < pending_sz)
> + if (cached_write_sz <= pending_sz)
>   vmbus_setevent(channel);
>  
>   return;
>

Applied to xenial/master-next branch, with the provenance line
changed to:

(cherry picked from commit 13c5e97701091f9b02ded0c68809f8a6b08c747a linux-4.9.y)

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team