[PATCH 1/2] vmbus: add per-channel sysfs info

2017-09-21 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary

[PATCH 1/2] vmbus: add per-channel sysfs info

2017-09-21 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH 2/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-09-21 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by:

[PATCH 2/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-09-21 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 0/2] Drivers: hv: vmbus: Add additional per-channel sysfs info

2017-09-21 Thread kys
From: "K. Y. Srinivasan" Add additional per-channel sysfs information to help debug performance issues. Greg, please apply this patch-set to 4.15-rc1. Stephen Hemminger (2): vmbus: add per-channel sysfs info Drivers: hv: vmbus: Expose per-channel interrupts and events

[PATCH 0/2] Drivers: hv: vmbus: Add additional per-channel sysfs info

2017-09-21 Thread kys
From: "K. Y. Srinivasan" Add additional per-channel sysfs information to help debug performance issues. Greg, please apply this patch-set to 4.15-rc1. Stephen Hemminger (2): vmbus: add per-channel sysfs info Drivers: hv: vmbus: Expose per-channel interrupts and events counters

[PATCH V2 4/4] Drivers: hv: vmbus: Expose per-channel event counters events counters

2017-09-17 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by:

[PATCH V2 4/4] Drivers: hv: vmbus: Expose per-channel event counters events counters

2017-09-17 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH V2 1/4] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-17 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... ->

[PATCH V2 2/4] Drivers: hv: fcopy: restore correct transfer length

2017-09-17 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the

[PATCH V2 3/4] vmbus: add per-channel sysfs info

2017-09-17 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary

[PATCH V2 1/4] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-17 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() ->

[PATCH V2 2/4] Drivers: hv: fcopy: restore correct transfer length

2017-09-17 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the daemon changed

[PATCH V2 3/4] vmbus: add per-channel sysfs info

2017-09-17 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH V2 0/4] Drivers: hv: Miscellaneous fixes

2017-09-17 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. V2: Dropped the patch: "vmbus: suppress uevents for hv_sock devices" as this was only to address test trigerred issues. Dexuan Cui (1): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() Olaf Hering (1):

[PATCH V2 0/4] Drivers: hv: Miscellaneous fixes

2017-09-17 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. V2: Dropped the patch: "vmbus: suppress uevents for hv_sock devices" as this was only to address test trigerred issues. Dexuan Cui (1): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() Olaf Hering (1): Drivers: hv: fcopy:

[PATCH 4/5] vmbus: add per-channel sysfs info

2017-09-10 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary

[PATCH 4/5] vmbus: add per-channel sysfs info

2017-09-10 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH 2/5] vmbus: suppress uevents for hv_sock devices

2017-09-10 Thread kys
From: Dexuan Cui hv_sock driver is automatically loaded when an application creates an AF_VSOCK socket, so we don't really need to trigger uevents to the user space udevd. And hv_sock devices can appear and disappear frequency, e.g. 100 per second, so triggering the

[PATCH 2/5] vmbus: suppress uevents for hv_sock devices

2017-09-10 Thread kys
From: Dexuan Cui hv_sock driver is automatically loaded when an application creates an AF_VSOCK socket, so we don't really need to trigger uevents to the user space udevd. And hv_sock devices can appear and disappear frequency, e.g. 100 per second, so triggering the udevents can cause a high

[PATCH 5/5] Drivers: hv: vmbus: Expose per-channel event counters

2017-09-10 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by:

[PATCH 1/5] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-10 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... ->

[PATCH 3/5] Drivers: hv: fcopy: restore correct transfer length

2017-09-10 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the

[PATCH 5/5] Drivers: hv: vmbus: Expose per-channel event counters

2017-09-10 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 1/5] vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

2017-09-10 Thread kys
From: Dexuan Cui Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() ->

[PATCH 3/5] Drivers: hv: fcopy: restore correct transfer length

2017-09-10 Thread kys
From: Olaf Hering Till recently the expected length of bytes read by the daemon did depend on the context. It was either hv_start_fcopy or hv_do_fcopy. The daemon had a buffer size of two pages, which was much larger than needed. Now the expected length of bytes read by the daemon changed

[PATCH 0/5] Drivers: hv: Miscellaneous fixes

2017-09-09 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (2): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() vmbus: suppress uevents for hv_sock devices Olaf Hering (1): Drivers: hv: fcopy: restore correct transfer length Stephen Hemminger (2):

[PATCH 0/5] Drivers: hv: Miscellaneous fixes

2017-09-09 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (2): vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister() vmbus: suppress uevents for hv_sock devices Olaf Hering (1): Drivers: hv: fcopy: restore correct transfer length Stephen Hemminger (2): vmbus: add

[PATCH 1/1] x86/hyper-V: Allocate the IDT entry early in boot

2017-09-08 Thread kys
From: "K. Y. Srinivasan" Allocate the hypervisor callback IDT entry early in the boot sequence. Signed-off-by: K. Y. Srinivasan --- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 1/1] x86/hyper-V: Allocate the IDT entry early in boot

2017-09-08 Thread kys
From: "K. Y. Srinivasan" Allocate the hypervisor callback IDT entry early in the boot sequence. Signed-off-by: K. Y. Srinivasan --- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c

[PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-08-11 Thread kys
From: K. Y. Srinivasan This patch handles the following issues that were observed when we are handling racing channel offer message and rescind message for the same offer: 1. Since the host does not respond to messages on a rescinded channel, in the current code, we could be

[PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-08-11 Thread kys
From: K. Y. Srinivasan This patch handles the following issues that were observed when we are handling racing channel offer message and rescind message for the same offer: 1. Since the host does not respond to messages on a rescinded channel, in the current code, we could be indefinitely

[PATCH 2/2] Tools: hv: update buffer handling in hv_fcopy_daemon

2017-08-10 Thread kys
From: Olaf Hering Currently this warning is triggered when compiling hv_fcopy_daemon: hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] kernel_modver = *(__u32 *)buffer; Convert the send/receive buffer

[PATCH 2/2] Tools: hv: update buffer handling in hv_fcopy_daemon

2017-08-10 Thread kys
From: Olaf Hering Currently this warning is triggered when compiling hv_fcopy_daemon: hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] kernel_modver = *(__u32 *)buffer; Convert the send/receive buffer to a union and

[PATCH 1/2] Tools: hv: fix snprintf warning in kvp_daemon

2017-08-10 Thread kys
From: Olaf Hering Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_kvp_daemon.c |2 +- 1 files changed, 1

[PATCH 1/2] Tools: hv: fix snprintf warning in kvp_daemon

2017-08-10 Thread kys
From: Olaf Hering Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_kvp_daemon.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 0/2] Tools: hv: Miscellaneous adjustments

2017-08-10 Thread kys
From: K. Y. Srinivasan Miscellaneous adjustments. Olaf Hering (2): Tools: hv: fix snprintf warning in kvp_daemon Tools: hv: update buffer handling in hv_fcopy_daemon tools/hv/hv_fcopy_daemon.c | 32 +--- tools/hv/hv_kvp_daemon.c |2

[PATCH 0/2] Tools: hv: Miscellaneous adjustments

2017-08-10 Thread kys
From: K. Y. Srinivasan Miscellaneous adjustments. Olaf Hering (2): Tools: hv: fix snprintf warning in kvp_daemon Tools: hv: update buffer handling in hv_fcopy_daemon tools/hv/hv_fcopy_daemon.c | 32 +--- tools/hv/hv_kvp_daemon.c |2 +- 2 files changed,

[PATCH 4/5] Drivers: hv: balloon: Initialize last_post_time on startup

2017-08-06 Thread kys
From: Alex Ng When left uninitialized, this sometimes fails the following check in post_status(): if (!time_after(now, (last_post_time + HZ))) { return; } This causes unnecessary delays in reporting memory pressure to host after

[PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id

2017-08-06 Thread kys
From: Alex Ng There's a bug which passes the output buffer size as MAX_IP_ADDR_SIZE, when converting the adapter_id field to UTF16. This is much larger than the actual size (MAX_ADAPTER_ID_SIZE). Fix this by passing the proper size. Fortunately, the translation is

[PATCH 4/5] Drivers: hv: balloon: Initialize last_post_time on startup

2017-08-06 Thread kys
From: Alex Ng When left uninitialized, this sometimes fails the following check in post_status(): if (!time_after(now, (last_post_time + HZ))) { return; } This causes unnecessary delays in reporting memory pressure to host after booting up. Signed-off-by: Alex

[PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id

2017-08-06 Thread kys
From: Alex Ng There's a bug which passes the output buffer size as MAX_IP_ADDR_SIZE, when converting the adapter_id field to UTF16. This is much larger than the actual size (MAX_ADAPTER_ID_SIZE). Fix this by passing the proper size. Fortunately, the translation is limited by the length of the

[PATCH 3/5] Drivers: hv: balloon: Show the max dynamic memory assigned

2017-08-06 Thread kys
From: Alex Ng Previously we were only showing max number of pages. We should make it more clear that this value is the max amount of dynamic memory that the Hyper-V host is willing to assign to this guest. Signed-off-by: Alex Ng

[PATCH 3/5] Drivers: hv: balloon: Show the max dynamic memory assigned

2017-08-06 Thread kys
From: Alex Ng Previously we were only showing max number of pages. We should make it more clear that this value is the max amount of dynamic memory that the Hyper-V host is willing to assign to this guest. Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_balloon.c |

[PATCH 2/5] Drivers: hv: balloon: Correctly update onlined page count

2017-08-06 Thread kys
From: Alex Ng Previously, num_pages_onlined was updated using value from memory online notifier. This is incorrect because they assume that all hot-added pages are online, even though we only online the amount that's backed by the host. We should update

[PATCH 2/5] Drivers: hv: balloon: Correctly update onlined page count

2017-08-06 Thread kys
From: Alex Ng Previously, num_pages_onlined was updated using value from memory online notifier. This is incorrect because they assume that all hot-added pages are online, even though we only online the amount that's backed by the host. We should update num_pages_onlined only when the balloon

[PATCH 1/5] Tools: hv: vss: Skip freezing filesystems backed by loop

2017-08-06 Thread kys
From: Alex Ng Since a loop device is backed by a file, a backup will already result in its parent filesystem being frozen. It's sufficient to just freeze the parent filesystem, so we can skip the loop device. This avoids a situation where a loop device and its

[PATCH 1/5] Tools: hv: vss: Skip freezing filesystems backed by loop

2017-08-06 Thread kys
From: Alex Ng Since a loop device is backed by a file, a backup will already result in its parent filesystem being frozen. It's sufficient to just freeze the parent filesystem, so we can skip the loop device. This avoids a situation where a loop device and its parent filesystem are both frozen

[PATCH 0/5] Drivers: hv: Miscellaneous fixes

2017-08-06 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Alex Ng (5): Tools: hv: vss: Skip freezing filesystems backed by loop Drivers: hv: balloon: Correctly update onlined page count Drivers: hv: balloon: Show the max dynamic memory assigned Drivers: hv: balloon: Initialize

[PATCH 0/5] Drivers: hv: Miscellaneous fixes

2017-08-06 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Alex Ng (5): Tools: hv: vss: Skip freezing filesystems backed by loop Drivers: hv: balloon: Correctly update onlined page count Drivers: hv: balloon: Show the max dynamic memory assigned Drivers: hv: balloon: Initialize last_post_time on

[PATCH 2/2] vmbus: re-enable channel tasklet

2017-06-25 Thread kys
From: Stephen Hemminger This problem shows up in 4.11 when netvsc driver is removed and reloaded. The problem is that the channel is closed during module removal and the tasklet for processing responses is disabled. When module is reloaded the channel is reopened but

[PATCH 2/2] vmbus: re-enable channel tasklet

2017-06-25 Thread kys
From: Stephen Hemminger This problem shows up in 4.11 when netvsc driver is removed and reloaded. The problem is that the channel is closed during module removal and the tasklet for processing responses is disabled. When module is reloaded the channel is reopened but the tasklet is marked as

[PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop

2017-06-25 Thread kys
From: Alex Ng Skip loop devices from the freeze/thaw operation. Signed-off-by: Alex Ng Signed-off-by: Vyronas Tsingaras Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_vss_daemon.c |

[PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop

2017-06-25 Thread kys
From: Alex Ng Skip loop devices from the freeze/thaw operation. Signed-off-by: Alex Ng Signed-off-by: Vyronas Tsingaras Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_vss_daemon.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c

[PATCH 0/2] Drivers: hv: Miscellaneous fixes

2017-06-25 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Alex Ng (1): Tools: hv: vss: Skip freezing filesystems backed by loop Stephen Hemminger (1): vmbus: re-enable channel tasklet drivers/hv/channel.c |2 ++ tools/hv/hv_vss_daemon.c |7 +++ 2 files changed, 9

[PATCH 0/2] Drivers: hv: Miscellaneous fixes

2017-06-25 Thread kys
From: K. Y. Srinivasan Miscellaneous fixes. Alex Ng (1): Tools: hv: vss: Skip freezing filesystems backed by loop Stephen Hemminger (1): vmbus: re-enable channel tasklet drivers/hv/channel.c |2 ++ tools/hv/hv_vss_daemon.c |7 +++ 2 files changed, 9 insertions(+), 0

[PATCH 2/6] vmbus: drop unused ring_buffer_info elements

2017-06-25 Thread kys
From: Stephen Hemminger The elements ring_data_start_offset and priv_write_index are not used. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- include/linux/hyperv.h |2 -- 1 files changed, 0

[PATCH 5/6] vmbus: more host signalling avoidance

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan

[PATCH 2/6] vmbus: drop unused ring_buffer_info elements

2017-06-25 Thread kys
From: Stephen Hemminger The elements ring_data_start_offset and priv_write_index are not used. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- include/linux/hyperv.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/linux/hyperv.h

[PATCH 5/6] vmbus: more host signalling avoidance

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c | 27 +++

[PATCH 4/6] vmbus: eliminate duplicate cached index

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan

[PATCH 4/6] vmbus: eliminate duplicate cached index

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c | 17

[PATCH 1/6] vmbus: simplify hv_ringbuffer_read

2017-06-25 Thread kys
From: Stephen Hemminger With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 1/6] vmbus: simplify hv_ringbuffer_read

2017-06-25 Thread kys
From: Stephen Hemminger With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c | 118 +++--- 1 files

[PATCH 3/6] vmbus: refactor hv_signal_on_read

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan

[PATCH 6/6] vmbus: add prefetch to ring buffer iterator

2017-06-25 Thread kys
From: Stephen Hemminger When iterating over incoming ring elements from the host, prefetch the next descriptor so that it is cache hot. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

[PATCH 3/6] vmbus: refactor hv_signal_on_read

2017-06-25 Thread kys
From: Stephen Hemminger 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 Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c | 32

[PATCH 6/6] vmbus: add prefetch to ring buffer iterator

2017-06-25 Thread kys
From: Stephen Hemminger When iterating over incoming ring elements from the host, prefetch the next descriptor so that it is cache hot. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan --- drivers/hv/ring_buffer.c |7 ++- 1 files changed, 6 insertions(+), 1

[PATCH 0/6] Drivers: hv: vmbus: Ringbuffer cleanup and optimizations

2017-06-25 Thread kys
From: K. Y. Srinivasan This patch set removes unused bits from vmbus internals, and also does some optimization to the host signalling part of ring buffer logic. Stephen Hemminger (6): vmbus: simplify hv_ringbuffer_read vmbus: drop unused ring_buffer_info elements

[PATCH 0/6] Drivers: hv: vmbus: Ringbuffer cleanup and optimizations

2017-06-25 Thread kys
From: K. Y. Srinivasan This patch set removes unused bits from vmbus internals, and also does some optimization to the host signalling part of ring buffer logic. Stephen Hemminger (6): vmbus: simplify hv_ringbuffer_read vmbus: drop unused ring_buffer_info elements vmbus: refactor

[PATCH 0/6] Drivers: hv: vmbus: Ringbuffer cleanup and optimizations

2017-06-25 Thread kys
From: K. Y. Srinivasan This removes unused bits from vmbus internals, and also does some optimization to the host signalling part of ring buffer logic. Stephen Hemminger (6): vmbus: simplify hv_ringbuffer_read vmbus: drop unused ring_buffer_info elements vmbus:

[PATCH 0/6] Drivers: hv: vmbus: Ringbuffer cleanup and optimizations

2017-06-25 Thread kys
From: K. Y. Srinivasan This removes unused bits from vmbus internals, and also does some optimization to the host signalling part of ring buffer logic. Stephen Hemminger (6): vmbus: simplify hv_ringbuffer_read vmbus: drop unused ring_buffer_info elements vmbus: refactor hv_signal_on_read

[PATCH 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-06-25 Thread kys
From: Vitaly Kuznetsov Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov

[PATCH 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-06-25 Thread kys
From: Vitaly Kuznetsov Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko

[PATCH 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-06-25 Thread kys
From: Vitaly Kuznetsov Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov

[PATCH 04/10] x86/hyper-v: fast hypercall implementation

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov

[PATCH 04/10] x86/hyper-v: fast hypercall implementation

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Signed-off-by: K.

[PATCH 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-06-25 Thread kys
From: Vitaly Kuznetsov Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko

[PATCH 07/10] hyper-v: globalize vp_index

2017-06-25 Thread kys
From: Vitaly Kuznetsov To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko

[PATCH 07/10] hyper-v: globalize vp_index

2017-06-25 Thread kys
From: Vitaly Kuznetsov To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Signed-off-by: K. Y. Srinivasan ---

[PATCH 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-06-25 Thread kys
From: Vitaly Kuznetsov We need to pass only 8 bytes of input for HvSignalEvent which makes it a perfect fit for fast hypercall. hv_input_signal_event_buffer is not needed any more and hv_input_signal_event is converted to union for convenience. Signed-off-by: Vitaly

[PATCH 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-06-25 Thread kys
From: Vitaly Kuznetsov We need to pass only 8 bytes of input for HvSignalEvent which makes it a perfect fit for fast hypercall. hv_input_signal_event_buffer is not needed any more and hv_input_signal_event is converted to union for convenience. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy

[PATCH 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-06-25 Thread kys
From: Vitaly Kuznetsov We have only three call sites for hv_do_hypercall() and we're going to change HVCALL_SIGNAL_EVENT to doing fast hypercall so we can inline this function for optimization. Hyper-V top level functional specification states that r9-r11 registers and

[PATCH 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-25 Thread kys
From: Vitaly Kuznetsov Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan ---

[PATCH 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan ---

[PATCH 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V host can suggest us to use hypercall for doing remote TLB flush, this is supposed to work faster than IPIs. Implementation details: to do HvFlushVirtualAddress{Space,List} hypercalls we need to put the input somewhere in memory and we don't

[PATCH 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-06-25 Thread kys
From: Vitaly Kuznetsov We have only three call sites for hv_do_hypercall() and we're going to change HVCALL_SIGNAL_EVENT to doing fast hypercall so we can inline this function for optimization. Hyper-V top level functional specification states that r9-r11 registers and flags may be clobbered by

[PATCH 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-25 Thread kys
From: Vitaly Kuznetsov Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- MAINTAINERS |1 + arch/x86/hyperv/mmu.c

[PATCH 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- arch/x86/hyperv/mmu.c | 130

[PATCH 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-25 Thread kys
From: Vitaly Kuznetsov Hyper-V host can suggest us to use hypercall for doing remote TLB flush, this is supposed to work faster than IPIs. Implementation details: to do HvFlushVirtualAddress{Space,List} hypercalls we need to put the input somewhere in memory and we don't really want to have

[PATCH 06/10] x86/hyper-v: implement rep hypercalls

2017-06-25 Thread kys
From: Vitaly Kuznetsov Rep hypercalls are normal hypercalls which perform multiple actions at once. Hyper-V guarantees to return exectution to the caller in not more than 50us and the caller needs to use hypercall continuation. Touch NMI watchdog between hypercall

[PATCH 06/10] x86/hyper-v: implement rep hypercalls

2017-06-25 Thread kys
From: Vitaly Kuznetsov Rep hypercalls are normal hypercalls which perform multiple actions at once. Hyper-V guarantees to return exectution to the caller in not more than 50us and the caller needs to use hypercall continuation. Touch NMI watchdog between hypercall invocations. This is going to

[PATCH 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-06-25 Thread kys
From: K. Y. Srinivasan Hyper-V supports hypercalls for doing local and remote TLB flushing and gives its guests hints when using hypercall is preferred. While doing hypercalls for local TLB flushes is probably not practical (and is not being suggested by modern Hyper-V

[PATCH 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-06-25 Thread kys
From: K. Y. Srinivasan Hyper-V supports hypercalls for doing local and remote TLB flushing and gives its guests hints when using hypercall is preferred. While doing hypercalls for local TLB flushes is probably not practical (and is not being suggested by modern Hyper-V versions) remote TLB flush

[PATCH 4/6] drivers: hv: vmbus: Increase the time between retries in vmbus_post_msg()

2017-05-18 Thread kys
From: K. Y. Srinivasan Commit c0bb03924f1a ("Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()") increased the retry/wait limits of vmbus_post_msg() to address the new DoS protection policies in WS2016. Increase the time between retries to make the code more

[PATCH 4/6] drivers: hv: vmbus: Increase the time between retries in vmbus_post_msg()

2017-05-18 Thread kys
From: K. Y. Srinivasan Commit c0bb03924f1a ("Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()") increased the retry/wait limits of vmbus_post_msg() to address the new DoS protection policies in WS2016. Increase the time between retries to make the code more robust. Signed-off-by:

[PATCH 1/6] Drivers: hv: vmbus: Get the current time from the current clocksource

2017-05-18 Thread kys
From: K. Y. Srinivasan The current code uses the MSR based mechanism to get the current tick. Use the current clock source as that might be more optimal. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |1 - drivers/hv/hv.c

[PATCH 1/6] Drivers: hv: vmbus: Get the current time from the current clocksource

2017-05-18 Thread kys
From: K. Y. Srinivasan The current code uses the MSR based mechanism to get the current tick. Use the current clock source as that might be more optimal. Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h |1 - drivers/hv/hv.c |2 +- 2 files changed, 1

[PATCH 5/6] vmbus: Reuse uuid_le_to_bin() helper

2017-05-18 Thread kys
From: Andy Shevchenko Instead of open coded variant use generic helper to convert UUID strings to binary format. Signed-off-by: Andy Shevchenko Signed-off-by: K. Y. Srinivasan --- drivers/hv/vmbus_drv.c

[PATCH 2/6] hv_utils: drop .getcrosststamp() support from PTP driver

2017-05-18 Thread kys
From: Vitaly Kuznetsov Turns out that our implementation of .getcrosststamp() never actually worked. Hyper-V is sending time samples every 5 seconds and this is too much for get_device_system_crosststamp() as it's interpolation algorithm (which nobody is currently using in

<    1   2   3   4   5   6   7   8   9   >