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

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

To: William Pitcock <nenolod@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/2] blkback: Add default policy values for I/O QoS code
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 31 Mar 2009 00:22:53 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 31 Mar 2009 00:23:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9d22c2b519c198454814a1011283144b3736627b.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> <9d22c2b519c198454814a1011283144b3736627b.1238468013.git.nenolod@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
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