summaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
authorK. Y. Srinivasan2014-04-09 03:45:54 +0200
committerGreg Kroah-Hartman2014-05-04 01:24:26 +0200
commit3a28fa35d6658703cd26f9c16aaea0eae06afd40 (patch)
treebcc8f07bbd9365e0a270c85af0e50ce3e1682987 /include/linux/hyperv.h
parentDrivers: hv: Eliminate the channel spinlock in the callback path (diff)
downloadkernel-qcow2-linux-3a28fa35d6658703cd26f9c16aaea0eae06afd40.tar.gz
kernel-qcow2-linux-3a28fa35d6658703cd26f9c16aaea0eae06afd40.tar.xz
kernel-qcow2-linux-3a28fa35d6658703cd26f9c16aaea0eae06afd40.zip
Drivers: hv: vmbus: Implement per-CPU mapping of relid to channel
Currently the mapping of the relID to channel is done under the protection of a single spin lock. Starting with ws2012, each channel is bound to a specific VCPU in the guest. Use this binding to eliminate the spin lock by setting up per-cpu state for mapping relId to the channel. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index a274e089df78..08cfaff8a072 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -734,6 +734,11 @@ struct vmbus_channel {
* Support per-channel state for use by vmbus drivers.
*/
void *per_channel_state;
+ /*
+ * To support per-cpu lookup mapping of relid to channel,
+ * link up channels based on their CPU affinity.
+ */
+ struct list_head percpu_list;
};
static inline void set_channel_read_state(struct vmbus_channel *c, bool state)