WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/2] blkback: Add default policy values for I/O QoS c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2/2] blkback: Add default policy values for I/O QoS code
From: William Pitcock <nenolod@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Mar 2009 21:38:58 -0500
Delivery-date: Mon, 30 Mar 2009 20:07:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <cover.1238468013.git.nenolod@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <cover.1238468013.git.nenolod@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

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;
 }
 
-- 
1.6.1.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel