linux/drivers/hv
Kimberly Brown 396ae57ef1 Drivers: hv: vmbus: Expose counters for interrupts and full conditions
Counter values for per-channel interrupts and ring buffer full
conditions are useful for investigating performance.

Expose counters in sysfs for 2 types of guest to host interrupts:
1) Interrupts caused by the channel's outbound ring buffer transitioning
from empty to not empty
2) Interrupts caused by the channel's inbound ring buffer transitioning
from full to not full while a packet is waiting for enough buffer space to
become available

Expose 2 counters in sysfs for the number of times that write operations
encountered a full outbound ring buffer:
1) The total number of write operations that encountered a full
condition
2) The number of write operations that were the first to encounter a
full condition

Increment the outbound full condition counters in the
hv_ringbuffer_write() function because, for most drivers, a full
outbound ring buffer is detected in that function. Also increment the
outbound full condition counters in the set_channel_pending_send_size()
function. In the hv_sock driver, a full outbound ring buffer is detected
and set_channel_pending_send_size() is called before
hv_ringbuffer_write() is called.

I tested this patch by confirming that the sysfs files were created and
observing the counter values. The values seemed to increase by a
reasonable amount when the Hyper-v related drivers were in use.

Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
Reviewed-by:  Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-14 20:56:10 -05:00
..
channel_mgmt.c vmbus: Switch to use new generic UUID API 2019-02-14 20:45:23 -05:00
channel.c vmbus: Switch to use new generic UUID API 2019-02-14 20:45:23 -05:00
connection.c Drivers: hv: vmbus: Offload the handling of channels to two workqueues 2018-12-03 08:01:01 +01:00
hv_balloon.c hv_balloon: avoid touching uninitialized struct page during tail onlining 2019-01-09 14:20:47 -05:00
hv_fcopy.c Drivers: hv: fcopy: restore correct transfer length 2017-09-22 10:29:54 +02:00
hv_kvp.c Merge 4.20-rc4 into char-misc-next 2018-11-26 07:50:56 +01:00
hv_snapshot.c Merge 4.11-rc4 into char-misc-next 2017-03-27 09:13:04 +02:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_util.c hv_utils: update name in struct hv_driver util_drv 2018-11-11 12:58:26 -08:00
hv_utils_transport.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
hv_utils_transport.h Drivers: hv: util: move waiting for release to hv_utils_transport itself 2017-03-16 16:42:00 +09:00
hv.c Char/Misc driver patches for 4.21-rc1 2018-12-28 20:54:57 -08:00
hyperv_vmbus.h vmbus: Switch to use new generic UUID API 2019-02-14 20:45:23 -05:00
Kconfig x86, hyperv: remove PCI dependency 2018-12-13 14:55:57 -05:00
Makefile hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
ring_buffer.c Drivers: hv: vmbus: Expose counters for interrupts and full conditions 2019-02-14 20:56:10 -05:00
vmbus_drv.c Drivers: hv: vmbus: Expose counters for interrupts and full conditions 2019-02-14 20:56:10 -05:00