* [PATCH 0/2] Drivers: hv
@ 2014-07-07 23:33 K. Y. Srinivasan
2014-07-07 23:34 ` [PATCH 1/2] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code K. Y. Srinivasan
0 siblings, 1 reply; 4+ messages in thread
From: K. Y. Srinivasan @ 2014-07-07 23:33 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan
This patch set fixes a bug in the VMBUS driver that dispatches driver specific
callback as well as a bug in the KVP code.
K. Y. Srinivasan (2):
Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
Drivers: hv: util: Fix a bug in the KVP code
drivers/hv/connection.c | 8 ++++++--
drivers/hv/hv_kvp.c | 17 ++++++++++++++---
drivers/hv/hv_util.c | 2 +-
3 files changed, 21 insertions(+), 6 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
2014-07-07 23:33 [PATCH 0/2] Drivers: hv K. Y. Srinivasan
@ 2014-07-07 23:34 ` K. Y. Srinivasan
2014-07-07 23:34 ` [PATCH 2/2] Drivers: hv: util: Fix a bug in the KVP code K. Y. Srinivasan
0 siblings, 1 reply; 4+ messages in thread
From: K. Y. Srinivasan @ 2014-07-07 23:34 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan, stable
Starting with Win8, we have implemented several optimizations to improve the
scalability and performance of the VMBUS transport between the Host and the
Guest. Some of the non-performance critical services cannot leverage these
optimization since they only read and process one message at a time.
Make adjustments to the callback dispatch code to account for the way
non-performance critical drivers handle reading of the channel.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
---
drivers/hv/connection.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index e84f452..ae22e3c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid)
*/
do {
- hv_begin_read(&channel->inbound);
+ if (read_state)
+ hv_begin_read(&channel->inbound);
channel->onchannel_callback(arg);
- bytes_to_read = hv_end_read(&channel->inbound);
+ if (read_state)
+ bytes_to_read = hv_end_read(&channel->inbound);
+ else
+ bytes_to_read = 0;
} while (read_state && (bytes_to_read != 0));
} else {
pr_err("no channel callback for relid - %u\n", relid);
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] Drivers: hv: util: Fix a bug in the KVP code
2014-07-07 23:34 ` [PATCH 1/2] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code K. Y. Srinivasan
@ 2014-07-07 23:34 ` K. Y. Srinivasan
0 siblings, 0 replies; 4+ messages in thread
From: K. Y. Srinivasan @ 2014-07-07 23:34 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan, stable
Add code to poll the channel since we process only one message
at a time and the host may not interrupt us. Also increase the
receive buffer size since some KVP messages are close to 8K bytes in size.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
---
drivers/hv/hv_kvp.c | 17 ++++++++++++++---
drivers/hv/hv_util.c | 2 +-
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index ea85253..521c146 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -127,6 +127,17 @@ kvp_work_func(struct work_struct *dummy)
kvp_respond_to_host(NULL, HV_E_FAIL);
}
+static void poll_channel(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != smp_processor_id())
+ smp_call_function_single(channel->target_cpu,
+ hv_kvp_onchannelcallback,
+ channel, true);
+ else
+ hv_kvp_onchannelcallback(channel);
+}
+
+
static int kvp_handle_handshake(struct hv_kvp_msg *msg)
{
int ret = 1;
@@ -155,7 +166,7 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)
kvp_register(dm_reg_value);
kvp_transaction.active = false;
if (kvp_transaction.kvp_context)
- hv_kvp_onchannelcallback(kvp_transaction.kvp_context);
+ poll_channel(kvp_transaction.kvp_context);
}
return ret;
}
@@ -568,7 +579,7 @@ response_done:
vmbus_sendpacket(channel, recv_buffer, buf_len, req_id,
VM_PKT_DATA_INBAND, 0);
-
+ poll_channel(channel);
}
/*
@@ -603,7 +614,7 @@ void hv_kvp_onchannelcallback(void *context)
return;
}
- vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 2, &recvlen,
+ vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen,
&requestid);
if (recvlen > 0) {
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index dd76180..3b9c9ef 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -319,7 +319,7 @@ static int util_probe(struct hv_device *dev,
(struct hv_util_service *)dev_id->driver_data;
int ret;
- srv->recv_buffer = kmalloc(PAGE_SIZE * 2, GFP_KERNEL);
+ srv->recv_buffer = kmalloc(PAGE_SIZE * 4, GFP_KERNEL);
if (!srv->recv_buffer)
return -ENOMEM;
if (srv->util_init) {
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/2] Drivers: hv
@ 2012-10-07 23:59 K. Y. Srinivasan
0 siblings, 0 replies; 4+ messages in thread
From: K. Y. Srinivasan @ 2012-10-07 23:59 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, akpm, andi; +Cc: K. Y. Srinivasan
Add a basic balloon driver to take advantage of the dynamic memory
management functionality supported on Windows hosts. Windows requires
the guests to support both memory hot add as well as ballooning. In this patch
we are adding the basic balloon driver. Memory hot add will be added in a
subsequent patch and this requires some changes yet to be made on the host
side.
The policy engine on Windows hosts needs the guest to post memory status
periodically and it looks like committed_as is what it is expecting.
Since vm_committed_as is not currently an exported symbol, this patch set
also exports this symbol.
K. Y. Srinivasan (2):
mm: Export vm_committed_as
Drivers: hv: Add Hyper-V balloon driver
drivers/hv/Kconfig | 6 +
drivers/hv/Makefile | 1 +
drivers/hv/hv_balloon.c | 1043 +++++++++++++++++++++++++++++++++++++++++++++++
mm/mmap.c | 1 +
mm/nommu.c | 1 +
5 files changed, 1052 insertions(+), 0 deletions(-)
create mode 100644 drivers/hv/hv_balloon.c
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-07 22:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 23:33 [PATCH 0/2] Drivers: hv K. Y. Srinivasan
2014-07-07 23:34 ` [PATCH 1/2] Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code K. Y. Srinivasan
2014-07-07 23:34 ` [PATCH 2/2] Drivers: hv: util: Fix a bug in the KVP code K. Y. Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2012-10-07 23:59 [PATCH 0/2] Drivers: hv K. Y. Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome