RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread KY Srinivasan
ephen Hemminger > ; o...@aepfle.de; Rolf Neugebauer > ; jasow...@redhat.com; linux- > ker...@vger.kernel.org; a...@canonical.com > Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix > hv_need_to_signal_on_read() > > On Thu, Jan 26, 2017 at 10:24:32AM +, Dexuan Cui wrote: > >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > Hi Greg, > > I expect this patch (i.e. the "real" patch) would go in your char-misc tree > > first, > > then it would be merged into Linus's tree, as we usually did. > > That's fine, I'll wait for the maintainer of the sub

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread gre...@linuxfoundation.org
On Thu, Jan 26, 2017 at 10:24:32AM +, Dexuan Cui wrote: > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > To: Dexuan Cui > > > > > > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not > > > in > > > Linus's tree yet). Only backporting the firs

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > To: Dexuan Cui > > > > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in > > Linus's tree yet). Only backporting the first patch immediately is not > > enough > > and is also improper IMO, because

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread gre...@linuxfoundation.org
On Thu, Jan 26, 2017 at 09:31:32AM +, Dexuan Cui wrote: > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > > > > It's interesting v4.4.44 is not impacted, but actually it needs > > > > >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > > > It's interesting v4.4.44 is not impacted, but actually it needs > > > > > > both the 2 > > > patches: > > > > > > i.e. this patch, and the p

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread gre...@linuxfoundation.org
On Thu, Jan 26, 2017 at 08:27:26AM +, Dexuan Cui wrote: > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > > It's interesting v4.4.44 is not impacted, but actually it needs both > > > > > the 2 > > patches: > > > > > i.e. this patch, and the previous one: > > > >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > It's interesting v4.4.44 is not impacted, but actually it needs both > > > > the 2 > patches: > > > > i.e. this patch, and the previous one: > > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in > > >

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread gre...@linuxfoundation.org
On Thu, Jan 26, 2017 at 07:44:46AM +, Dexuan Cui wrote: > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > Dexuan Cui wrote: > > > As I checked against the kernels listed on the homapage, > > > the below versions are impacted: > > > v3.16.39 > > > v3.18.47 > > > v4.

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > Dexuan Cui wrote: > > As I checked against the kernels listed on the homapage, > > the below versions are impacted: > > v3.16.39 > > v3.18.47 > > v4.1.38 > > v4.8.17 > > v4.9.5 > > v4.10-rc5 > > > > It's interesting v4.4.44

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread gre...@linuxfoundation.org
gt; Srinivasan ; Haiyang Zhang ; > > Stephen Hemminger ; o...@aepfle.de; Rolf > > Neugebauer ; jasow...@redhat.com; linux- > > ker...@vger.kernel.org; a...@canonical.com > > Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix > > hv_need_to_signal_on_read() >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread Dexuan Cui
t; Neugebauer ; jasow...@redhat.com; linux- > ker...@vger.kernel.org; a...@canonical.com > Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix > hv_need_to_signal_on_read() > > On Tue, 24 Jan 2017 06:54:46 + > Dexuan Cui wrote: > > > +static inline void > >

Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-24 Thread Stephen Hemminger
On Tue, 24 Jan 2017 06:54:46 + Dexuan Cui wrote: > +static inline void > +init_cached_read_index(struct vmbus_channel *channel) > +{ > + struct hv_ring_buffer_info *rbi = &channel->inbound; > + > + rbi->cached_read_index = rbi->ring_buffer->read_index; > +} Looks good thanks. This sh

[PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-23 Thread Dexuan Cui
Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") added the proper mb(), but removed the test "prev_write_sz < pending_sz" when making the signal decision. As a result, the guest can signal the host unnecessarily, and then the host can throttle the gu