]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Drivers: hv: Turn off batched reading for util drivers
authorK. Y. Srinivasan <kys@microsoft.com>
Sat, 1 Dec 2012 14:46:34 +0000 (06:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 18:46:39 +0000 (10:46 -0800)
Util driver is not a performance critical driver and furthermore some
util services such as KVP can only handle one outstanding message
from the host. Turn off batched reading for util drivers.

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>
drivers/hv/hv_util.c

index a0667de7a04c85de62a63527255c492f01063db8..a62a760625082753e679498515ba55db03f32d45 100644 (file)
@@ -274,6 +274,16 @@ static int util_probe(struct hv_device *dev,
                }
        }
 
+       /*
+        * The set of services managed by the util driver are not performance
+        * critical and do not need batched reading. Furthermore, some services
+        * such as KVP can only handle one message from the host at a time.
+        * Turn off batched reading for all util drivers before we open the
+        * channel.
+        */
+
+       set_channel_read_state(dev->channel, false);
+
        ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL, 0,
                        srv->util_cb, dev->channel);
        if (ret)