Skip to content

Commit

Permalink
Drivers: hv: Turn off batched reading for util drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jan 17, 2013
1 parent 132368b commit 7ae3e03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/hv/hv_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ae3e03

Please sign in to comment.