diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-08-28 18:29:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-23 23:31:21 -0700 |
commit | b29ef3546aecb253a5552b198cef23750d56e1e4 (patch) | |
tree | bf19352ffb8926cada04df65ba7c1222797e67bb /drivers/hv/hyperv_vmbus.h | |
parent | 98d731bb064a9d1817a6ca9bf8b97051334a7cfe (diff) | |
download | op-kernel-dev-b29ef3546aecb253a5552b198cef23750d56e1e4.zip op-kernel-dev-b29ef3546aecb253a5552b198cef23750d56e1e4.tar.gz |
Drivers: hv: vmbus: Cleanup hv_post_message()
Minimize failures in this function by pre-allocating the buffer
for posting messages. The hypercall for posting the message can fail
for a number of reasons:
1. Transient resource related issues
2. Buffer alignment
3. Buffer cannot span a page boundry
We address issues 2 and 3 by preallocating a per-cpu page for the buffer.
Transient resource related failures are handled by retrying by the callers
of this function.
This patch is based on the investigation
done by Dexuan Cui <decui@microsoft.com>.
I would like to thank Sitsofe Wheeler <sitsofe@yahoo.com>
for reporting the issue and helping in debuggging.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: <stable@vger.kernel.org>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 22b7507..c386d8d 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -515,6 +515,10 @@ struct hv_context { * per-cpu list of the channels based on their CPU affinity. */ struct list_head percpu_list[NR_CPUS]; + /* + * buffer to post messages to the host. + */ + void *post_msg_page[NR_CPUS]; }; extern struct hv_context hv_context; |