linux/drivers/hv
Dexuan Cui 433e19cf33 Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Commit a389fcfd2c ("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 guest because the host
thinks the guest is buggy or malicious; finally the user
running stress test can perceive intermittent freeze of
the guest.

This patch brings back the test, and properly handles the
in-place consumption APIs used by NetVSC (see get_next_pkt_raw(),
put_pkt_raw() and commit_rd_index()).

Fixes: a389fcfd2c ("Drivers: hv: vmbus: Fix signaling logic in
hv_need_to_signal_on_read()")

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Tested-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-31 10:59:48 +01:00
..
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: util: introduce hv_utils_transport abstraction 2015-05-24 12:17:41 -07:00
channel.c Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host 2016-11-07 10:01:18 +01:00
channel_mgmt.c hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels() 2016-12-06 11:10:54 +01:00
connection.c uio-hv-generic: new userspace i/o driver for VMBus 2016-12-06 11:52:49 +01:00
hv.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
hv_balloon.c Drivers: hv: balloon: Fix info request to show max page count 2016-11-07 10:01:17 +01:00
hv_fcopy.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_kvp.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_snapshot.c Drivers: hv: vss: Operation timeouts should match host expectation 2016-11-07 10:01:17 +01:00
hv_util.c Drivers: hv: utils: Fix the mapping between host version and protocol to use 2016-11-07 10:01:17 +01:00
hv_utils_transport.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_utils_transport.h Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hyperv_vmbus.h Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host 2016-11-07 10:01:18 +01:00
ring_buffer.c Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() 2017-01-31 10:59:48 +01:00
vmbus_drv.c vmbus: add support for dynamic device id's 2016-12-06 11:52:49 +01:00