diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-04-09 03:45:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-04 01:24:26 +0200 |
commit | 3a28fa35d6658703cd26f9c16aaea0eae06afd40 (patch) | |
tree | bcc8f07bbd9365e0a270c85af0e50ce3e1682987 /drivers/hv/hyperv_vmbus.h | |
parent | Drivers: hv: Eliminate the channel spinlock in the callback path (diff) | |
download | linux-3a28fa35d6658703cd26f9c16aaea0eae06afd40.tar.xz 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 'drivers/hv/hyperv_vmbus.h')
-rw-r--r-- | drivers/hv/hyperv_vmbus.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 860134da8039..18d1a8404cbc 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -510,6 +510,11 @@ struct hv_context { * basis. */ struct tasklet_struct *event_dpc[NR_CPUS]; + /* + * To optimize the mapping of relid to channel, maintain + * per-cpu list of the channels based on their CPU affinity. + */ + struct list_head percpu_list[NR_CPUS]; }; extern struct hv_context hv_context; |