mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
d3ba720dd5
commit
3a28fa35d6
5 changed files with 75 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue