Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1567131
| From | Dexuan Cui <decui@microsoft.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() |
| Date | 2017-01-26 07:20 +0100 |
| Message-ID | <t3Lzz-3RH-1@gated-at.bofh.it> (permalink) |
| References | <t33fc-T4-1@gated-at.bofh.it> <t3bPs-6sB-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, January 25, 2017 00:08
> To: Dexuan Cui <decui@microsoft.com>
> Cc: gregkh@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; KY
> Srinivasan <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>;
> Stephen Hemminger <sthemmin@microsoft.com>; olaf@aepfle.de; Rolf
> Neugebauer <rolf.neugebauer@docker.com>; jasowang@redhat.com; linux-
> kernel@vger.kernel.org; apw@canonical.com
> Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
>
> On Tue, 24 Jan 2017 06:54:46 +0000
> Dexuan Cui <decui@microsoft.com> 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 should go in right away. Which versions are impacted?
> Should it also go to stable?
Yes, it needs to go to stable.
I have Cc-ed <stable@vger.kernel.org> in the patch's changelog, so it should be
included in the stable tree automatically.
As I checked against the kernels listed on the homapage of www.kernel.org, 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 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 hv_need_to_signal_on_read()")
> In a future patch, the API function names for interacting with the ring buffer
> should be changed to all have common prefix (hv_) and maybe do a little
> rethinking about what needs to be in ring buffer and what could be local variables.
>
> For example, the cached_read_index is only useful over the span of the loop
> reading from the ring buffer. For me, it would be cleaner with a ring_buffer
> iterator object which could abstract the API better.
>
> struct vmbus_ringbuffer_iter iter;
>
> vmbus_begin_read(&iter, channel);
> while ((desc = vmbus_next_read(&iter), channel) {
> ...
> }
> vmbus_end_read(&iter, channel);
I agree. Please help to clean all these up. :-)
Thanks,
-- Dexuan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-24 08:00 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Stephen Hemminger <stephen@networkplumber.org> - 2017-01-24 17:10 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 07:20 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 08:20 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 08:50 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 09:30 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 10:20 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 10:40 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 11:20 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 11:30 +0100
Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 11:30 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 11:40 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() KY Srinivasan <kys@microsoft.com> - 2017-01-26 20:20 +0100
RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 08:50 +0100
csiph-web