Skip to contentSkip to conversation

vmbus: fix missing signaling in hv_signal_on_read()

PATCH In review Stephen Hemminger 4 participants 13 messages Aug 16, 2017 – Oct 19, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmbus: fix missing signaling in hv_signal_on_read()

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()")

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

 include/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/hyperv.h +2 -2
index e09fc8290c2f..080a0797c6f3 100644
@@ -1515,11 +1515,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);
 }
 
Signature · 1 line
2.11.0
maintainer
#1 lore raw
Quoted 4 lines · Stephen Hemminger

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.

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

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

thanks,

greg k-h

#2 lore raw
Quoted 14 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger

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.

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

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

maintainer
#3 lore raw
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

commit 4226ff69a3dff78bead7d9a270423cd21f8d40b8

Author: Stephen Hemminger <[email protected]>
Date:   Sun Jun 25 12:30:24 2017 -0700

vmbus: simplify hv_ringbuffer_read

With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified.

commit 8dd45f2ab005a1f3301296059b23b03ec3dbf79b

Author: Stephen Hemminger <[email protected]>
Date:   Sun Jun 25 12:30:26 2017 -0700

vmbus: refactor hv_signal_on_read

The function hv_signal_on_read was defined in hyperv.h and only used in one place in ring_buffer code. Clearer to just move it inline there.

commit 05d00bc94ac27d220d8a78e365d7fa3a26dcca17

Author: Stephen Hemminger <[email protected]>
Date:   Sun Jun 25 12:30:27 2017 -0700

vmbus: eliminate duplicate cached index

Don't need cached read index anymore now that packet iterator is used. The iterator has the original read index until the visible read_index is updated.

commit 03bad714a1619c0074eb44d6f217c505fe27030f

Author: Stephen Hemminger <[email protected]>
Date:   Sun Jun 25 12:30:28 2017 -0700

vmbus: more host signalling avoidance

Don't signal host if it has disabled interrupts for that ring buffer. Check the feature bit to see if host supports pending send size flag.

Thanks,
-- Dexuan

maintainer
#4 lore raw
Quoted 34 lines · Dexuan Cui
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Quoted 8 lines

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

thanks,

greg k-h

#5 lore raw
Quoted 38 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 37 lines · Dexuan Cui
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

Quoted 8 lines
Quoted 5 lines

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

I will try for 4.13 but going back to 4.9 might be hard.

#6 lore raw
In reply to Greg KH
Quoted 44 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 34 lines · Dexuan Cui
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Quoted 8 lines

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

Quoted 6 lines

It is always better to backport the original commits. Will they work as-is, or do they need porting?

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

maintainer
#7 lore raw
Quoted 50 lines · Stephen Hemminger
Quoted 47 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 34 lines · Dexuan Cui
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Quoted 8 lines

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

Quoted 6 lines
Quoted 3 lines

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

Ok, any suggestion of what I should do here? Drag in the series for 4.13? Something else for 4.9? As long as you all are willing to "support" whatever we do here, I'll go along with it...

thanks,

greg k-h

#8 lore raw
Quoted 58 lines · On Tue, 10 Oct 2017 17:01:29 +0200 Greg KH <[email protected]> wrote:
Quoted 50 lines · Stephen Hemminger
Quoted 47 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 34 lines · Dexuan Cui
Quoted 27 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui <[email protected]>; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 6 lines · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

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()")

Quoted 8 lines
Quoted 7 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Quoted 6 lines
Quoted 2 lines

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close before he gets to it.

Quoted 8 lines

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a series
of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

Quoted 6 lines
Quoted 3 lines

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

Quoted 7 lines

Ok, any suggestion of what I should do here? Drag in the series for 4.13? Something else for 4.9? As long as you all are willing to "support" whatever we do here, I'll go along with it...

thanks,

greg k-h

I would prefer the single patch for 4.9 rather than creating increased risk by dragging in the full patch set.

#9 lore raw
Quoted 85 lines

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 9:56 AM
To: Greg KH <[email protected]>
Cc: Dexuan Cui <[email protected]>; [email protected]; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 9 lines · On Tue, 10 Oct 2017 17:01:29 +0200 Greg KH <[email protected]> wrote:
Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 4 lines · Dexuan Cui
Quoted 4 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]; [email protected]; [email protected]; Stephen Hemminger

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in

hv_signal_on_read()

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:

On Wed, Aug 16, 2017 at 08:49:46AM -0700, Stephen Hemminger

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

When the space available before start of reading

(cached_write_sz)

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

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()")

Quoted 4 lines
Quoted 4 lines
Signed-off-by Stephen Hemminger

<[email protected]>

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close

before he gets

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

to it.

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a

series

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather

than

Quoted 16 lines
Quoted 11 lines
Quoted 8 lines
Quoted 1 line

backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

Ok, any suggestion of what I should do here? Drag in the series for 4.13? Something else for 4.9? As long as you all are willing to "support" whatever we do here, I'll go along with it...

Quoted 6 lines
Quoted 3 lines

thanks,

greg k-h

I would prefer the single patch for 4.9 rather than creating increased risk by dragging in the full patch set.

I agree. Just to reiterate, we will apply the series for 4.13 and will submit a single patch for 4.9.

K. Y

maintainer
#10 lore raw
Quoted 95 lines

-----Original Message-----
From: KY Srinivasan
Sent: Wednesday, October 11, 2017 11:10 AM
To: Stephen Hemminger <[email protected]>; Greg KH <[email protected]>
Cc: Dexuan Cui <[email protected]>; [email protected]; Stephen Hemminger <[email protected]>
Subject: RE: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 87 lines

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 9:56 AM
To: Greg KH <[email protected]>
Cc: Dexuan Cui <[email protected]>; [email protected]; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 9 lines · On Tue, 10 Oct 2017 17:01:29 +0200 Greg KH <[email protected]> wrote:
Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 4 lines · Dexuan Cui
Quoted 4 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]; [email protected]; [email protected]; Stephen Hemminger

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in

hv_signal_on_read()

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:

On Wed, Aug 16, 2017 at 08:49:46AM -0700, Stephen Hemminger

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

When the space available before start of reading

(cached_write_sz)

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

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()")

Quoted 4 lines
Quoted 4 lines
Signed-off-by Stephen Hemminger

<[email protected]>

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close

before he gets

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

to it.

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a

series

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather

than

Quoted 19 lines
Quoted 11 lines
Quoted 8 lines
Quoted 1 line

backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

Ok, any suggestion of what I should do here? Drag in the series for 4.13? Something else for 4.9? As long as you all are willing to "support" whatever we do here, I'll go along with it...

thanks,

greg k-h

Quoted 7 lines
Quoted 2 lines

I would prefer the single patch for 4.9 rather than creating increased risk by dragging in the full patch set.

I agree. Just to reiterate, we will apply the series for 4.13 and will submit a single patch for 4.9.

K. Y

Hi Greg,
Just in case, let me provide the detailed information for your convenience:

For v4.9.56, we need this single patch (should Stephen or I re-submit it?):
https://patchwork.kernel.org/patch/9904081/
It can apply clean with fuzz 2 (offset 6 lines).

For v4.13.6 and v4.12.9, we need these 4 paches below (the commit IDs are

Quoted 1 line

From Linus's tree), and I have verified they can apply cleanly:

commit 4226ff69a3dff78bead7d9a270423cd21f8d40b8

Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Date:   Sun Jun 25 12:30:24 2017 -0700

vmbus: simplify hv_ringbuffer_read

With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified.

commit 8dd45f2ab005a1f3301296059b23b03ec3dbf79b

Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Date:   Sun Jun 25 12:30:26 2017 -0700

vmbus: refactor hv_signal_on_read

The function hv_signal_on_read was defined in hyperv.h and only used in one place in ring_buffer code. Clearer to just move it inline there.

commit 05d00bc94ac27d220d8a78e365d7fa3a26dcca17

Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Date:   Sun Jun 25 12:30:27 2017 -0700

vmbus: eliminate duplicate cached index

Don't need cached read index anymore now that packet iterator is used. The iterator has the original read index until the visible read_index is updated.

commit 03bad714a1619c0074eb44d6f217c505fe27030f

Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Date:   Sun Jun 25 12:30:28 2017 -0700

vmbus: more host signalling avoidance

Don't signal host if it has disabled interrupts for that ring buffer. Check the feature bit to see if host supports pending send size flag.

Thanks,
-- Dexuan

maintainer
#11 lore raw
Quoted 101 lines · Dexuan Cui
Quoted 101 lines

-----Original Message-----
From: KY Srinivasan
Sent: Wednesday, October 11, 2017 11:10 AM
To: Stephen Hemminger <[email protected]>; Greg KH <[email protected]>
Cc: Dexuan Cui <[email protected]>; [email protected]; Stephen Hemminger <[email protected]>
Subject: RE: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 83 lines

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 9:56 AM
To: Greg KH <[email protected]>
Cc: Dexuan Cui <[email protected]>; [email protected]; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()

Quoted 9 lines · On Tue, 10 Oct 2017 17:01:29 +0200 Greg KH <[email protected]> wrote:
Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Thu, 7 Sep 2017 06:27:25 +0200 Greg KH <[email protected]> wrote:
Quoted 4 lines · Dexuan Cui
Quoted 4 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, August 16, 2017 9:16 AM
To: Greg KH <[email protected]>
Cc: KY Srinivasan <[email protected]>; Dexuan Cui

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected]; [email protected]; [email protected]; Stephen Hemminger

<[email protected]>;

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

John Starks <[email protected]>
Subject: Re: [PATCH] vmbus: fix missing signaling in

hv_signal_on_read()

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line · On Wed, 16 Aug 2017 09:10:40 -0700 Greg KH <[email protected]> wrote:

On Wed, Aug 16, 2017 at 08:49:46AM -0700, Stephen Hemminger

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

When the space available before start of reading

(cached_write_sz)

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

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()")

Quoted 4 lines
Quoted 4 lines
Signed-off-by Stephen Hemminger

<[email protected]>

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.

Is there a fix for this in Linus's tree? If so, what's the git commit id? We need to wait for that until I can take it in -stable.

There is no commit yet in Linus's tree. Was submitting for both Linus and stable. Wasn't sure about the timing since 4.13 might close

before he gets

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

to it.

Hi Greg and [email protected],
We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47.

The patch is not in Linus's tree, because the bug is resolved there by a

series

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

of 4 patches (see the below).

IMO it's better to apply this small patch to the stable kernels rather

than

Quoted 16 lines
Quoted 11 lines
Quoted 8 lines
Quoted 1 line

backporting the 4 big commits?

It is always better to backport the original commits. Will they work as-is, or do they need porting?

thanks,

greg k-h

The four patches apply (and kernel builds and runs) for 4.12.10 and 4.13. They do not apply to 4.9 unless several other patches are dragged in.

Ok, any suggestion of what I should do here? Drag in the series for 4.13? Something else for 4.9? As long as you all are willing to "support" whatever we do here, I'll go along with it...

Quoted 6 lines
Quoted 3 lines

thanks,

greg k-h

I would prefer the single patch for 4.9 rather than creating increased risk by dragging in the full patch set.

I agree. Just to reiterate, we will apply the series for 4.13 and will submit a single patch for 4.9.

Quoted 8 lines
Quoted 1 line

K. Y

Hi Greg,
Just in case, let me provide the detailed information for your convenience:

For v4.9.56, we need this single patch (should Stephen or I re-submit it?):
https://patchwork.kernel.org/patch/9904081/
It can apply clean with fuzz 2 (offset 6 lines).

Please resend it, with no fuzz, so I know you have properly generated it and tested it :)

Quoted 2 lines

For v4.13.6 and v4.12.9, we need these 4 paches below (the commit IDs are

Quoted 1 line

From Linus's tree), and I have verified they can apply cleanly:

4.12 is end-of-life :)

But I've now applied these 4 patches to the 4.13-stable tree.

thanks,

greg k-h

maintainer
#12 lore raw
Quoted 6 lines

From: Greg KH [mailto:[email protected]]
Sent: Thursday, October 19, 2017 6:13 AM
...

Quoted 3 lines

Hi Greg,
Just in case, let me provide the detailed information for your convenience:

Quoted 7 lines
Quoted 4 lines

For v4.9.56, we need this single patch (should Stephen or I re-submit it?):

https://patchwork.kernel.org/patch/9904081/
It can apply clean with fuzz 2 (offset 6 lines).

Please resend it, with no fuzz, so I know you have properly generated it and tested it :)

OK, I rebased & re-sent it to you and [email protected] just now with the subject:
"[PATCH] [linux-4.9.y only] vmbus: fix missing signaling in hv_signal_on_read()"

Please apply it to linux-4.9.y.

Quoted 7 lines
Quoted 2 lines

For v4.13.6 and v4.12.9, we need these 4 paches below (the commit IDs are

Quoted 1 line

From Linus's tree), and I have verified they can apply cleanly:

4.12 is end-of-life :)

But I've now applied these 4 patches to the 4.13-stable tree. greg k-h

Thanks, Greg!

Thanks,
-- Dexuan