> -----Original Message----- > From: KY Srinivasan > Sent: Wednesday, October 11, 2017 11:10 AM > To: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>; Greg KH > <gregkh@xxxxxxxxxxxxxxxxxxx> > Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>; stable@xxxxxxxxxxxxxxx; Stephen > Hemminger <sthemmin@xxxxxxxxxxxxx> > Subject: RE: [PATCH] vmbus: fix missing signaling in hv_signal_on_read() > > -----Original Message----- > > From: Stephen Hemminger [mailto:stephen@xxxxxxxxxxxxxxxxxx] > > Sent: Wednesday, October 11, 2017 9:56 AM > > To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > > Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>; stable@xxxxxxxxxxxxxxx; KY > > Srinivasan <kys@xxxxxxxxxxxxx>; Stephen Hemminger > > <sthemmin@xxxxxxxxxxxxx> > > Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read() > > > > On Tue, 10 Oct 2017 17:01:29 +0200 > > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > > > > On Thu, Sep 07, 2017 at 08:41:13AM -0700, Stephen Hemminger wrote: > > > > On Thu, 7 Sep 2017 06:27:25 +0200 > > > > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > > > > > > > > On Thu, Sep 07, 2017 at 12:54:09AM +0000, Dexuan Cui wrote: > > > > > > > From: Stephen Hemminger [mailto:stephen@xxxxxxxxxxxxxxxxxx] > > > > > > > Sent: Wednesday, August 16, 2017 9:16 AM > > > > > > > To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > > > > > > > Cc: KY Srinivasan <kys@xxxxxxxxxxxxx>; Dexuan Cui > > <decui@xxxxxxxxxxxxx>; > > > > > > > devel@xxxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; > > > > > > > stable@xxxxxxxxxxxxxxx; Stephen Hemminger > > <sthemmin@xxxxxxxxxxxxx>; > > > > > > > John Starks <jon.Starks@xxxxxxxxxxxxx> > > > > > > > Subject: Re: [PATCH] vmbus: fix missing signaling in > > hv_signal_on_read() > > > > > > > > > > > > > > On Wed, 16 Aug 2017 09:10:40 -0700 > > > > > > > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > > > > > > > > > > > > > > On Wed, Aug 16, 2017 at 08:49:46AM -0700, Stephen Hemminger > > wrote: > > > > > > > > > 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 <jon.Starks@xxxxxxxxxxxxx> > > > > > > > > > Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx> > > > > > > > > > Signed-off-by: Stephen Hemminger > > <sthemmin@xxxxxxxxxxxxx> > > > > > > > > > --- > > > > > > > > > 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 > > > > > > > to it. > > > > > > > > > > > > Hi Greg and stable@xxxxxxxxxxxxxxx, > > > > > > 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 > > > > > > > > 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 > > > > 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 >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. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Thanks, -- Dexuan