diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-07-07 16:34:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-17 15:58:02 -0700 |
commit | 17256c6385fd3a5e000a9d2e9b89eb09f70b46e6 (patch) | |
tree | e8afd2fbaecb6a98f876514e800488d425f91096 | |
parent | 57b30c333f45ac9ec0406dab2bd74f31c28fd00c (diff) | |
download | lwn-17256c6385fd3a5e000a9d2e9b89eb09f70b46e6.tar.gz lwn-17256c6385fd3a5e000a9d2e9b89eb09f70b46e6.zip |
Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
commit affb1aff300ddee54df307812b38f166e8a865ef upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | 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 fd02cb79a99c..b9f5d295cbec 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -304,9 +304,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); |