|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 2/2] blkback: Add default policy values for I/O Q
William Pitcock wrote:
This patch adds default values which define a default QoS policy for
guest I/O. A sysctl interface will be added once /proc/sys/xen is available
again... unless I come up with a better idea in the meantime.
What would that interface look like? Would the parameters be per
domain, or per device? Would sysfs be suitable?
J
Ideas?
Signed-off-by: William Pitcock <nenolod@xxxxxxxxxxxxxxxx>
---
drivers/xen/blkback/interface.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/xen/blkback/interface.c b/drivers/xen/blkback/interface.c
index c6c3e14..9541ec4 100644
--- a/drivers/xen/blkback/interface.c
+++ b/drivers/xen/blkback/interface.c
@@ -34,9 +34,13 @@
#include <xen/events.h>
#include <xen/grant_table.h>
#include <linux/kthread.h>
+#include <linux/sysctl.h>
static struct kmem_cache *blkif_cachep;
+static int blkif_reqmax = 500000;
+static int blkif_reqrate = 512;
+
blkif_t *blkif_alloc(domid_t domid)
{
blkif_t *blkif;
@@ -53,6 +57,11 @@ blkif_t *blkif_alloc(domid_t domid)
blkif->st_print = jiffies;
init_waitqueue_head(&blkif->waiting_to_free);
+ /* initialize QoS values to defaults */
+ blkif->reqrate = blkif_reqrate;
+ blkif->reqmax = blkif_reqmax;
+ blkif->reqcount = blkif->reqmax;
+
return blkif;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|