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-changelog

[Xen-changelog] [linux-2.6.18-xen] Revert 927:56df01ffed10

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Revert 927:56df01ffed10
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 Aug 2009 01:00:21 -0700
Delivery-date: Sun, 16 Aug 2009 01:00:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250408549 -3600
# Node ID a65005adb3ed8a20de6293511cb4920a5e6bda1d
# Parent  56df01ffed10fa046ee7ddd65e439a131166944a
Revert 927:56df01ffed10
---
 drivers/xen/blkback/blkback.c |   25 -------------------------
 drivers/xen/blkback/common.h  |    5 -----
 drivers/xen/blkback/xenbus.c  |   41 -----------------------------------------
 3 files changed, 71 deletions(-)

diff -r 56df01ffed10 -r a65005adb3ed drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c     Fri Aug 14 17:28:43 2009 +0100
+++ b/drivers/xen/blkback/blkback.c     Sun Aug 16 08:42:29 2009 +0100
@@ -200,16 +200,6 @@ static void print_stats(blkif_t *blkif)
        blkif->st_oo_req = 0;
 }
 
-static void refill_credit(blkif_t *blkif)
-{
-       blkif->credit_time = jiffies + msecs_to_jiffies(blkif->credit_msec);
-       blkif->available_credit += blkif->credit_req;
-
-       /* this allows for bursting. */
-       if (blkif->available_credit > (blkif->credit_req * blkif->credit_msec))
-               blkif->available_credit = blkif->credit_req;
-}
-
 int blkif_schedule(void *arg)
 {
        blkif_t *blkif = arg;
@@ -236,9 +226,6 @@ int blkif_schedule(void *arg)
                if (do_block_io_op(blkif))
                        blkif->waiting_reqs = 1;
                unplug_queue(blkif);
-
-               if (time_after(jiffies, blkif->credit_time))
-                       refill_credit(blkif);
 
                if (log_stats && time_after(jiffies, blkif->st_print))
                        print_stats(blkif);
@@ -326,22 +313,10 @@ static int do_block_io_op(blkif_t *blkif
        rp = blk_rings->common.sring->req_prod;
        rmb(); /* Ensure we see queued requests up to 'rp'. */
 
-       /* if there's no available request credit right now, and limiting
-        * is requested, then don't bother with going any further.
-        */
-       if (blkif->remaining_credit <= 0 && blkif->credit_req != 0)
-               return (rc != rp) ? 1 : 0;
-
        while (rc != rp) {
 
                if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))
                        break;
-
-               /* FIXME: Should we report QoS overages as VBD_OO, or not? */
-               if (blkif->credit_req != 0 && --blkif->remaining_credit <= 0) {
-                       more_to_do = 1;
-                       break;
-               }
 
                if (kthread_should_stop()) {
                        more_to_do = 1;
diff -r 56df01ffed10 -r a65005adb3ed drivers/xen/blkback/common.h
--- a/drivers/xen/blkback/common.h      Fri Aug 14 17:28:43 2009 +0100
+++ b/drivers/xen/blkback/common.h      Sun Aug 16 08:42:29 2009 +0100
@@ -96,11 +96,6 @@ typedef struct blkif_st {
 
        grant_handle_t shmem_handle;
        grant_ref_t    shmem_ref;
-
-       int                 credit_req;
-       int                 remaining_credit;
-       int                 credit_msec;
-       unsigned long       credit_time;
 } blkif_t;
 
 blkif_t *blkif_alloc(domid_t domid);
diff -r 56df01ffed10 -r a65005adb3ed drivers/xen/blkback/xenbus.c
--- a/drivers/xen/blkback/xenbus.c      Fri Aug 14 17:28:43 2009 +0100
+++ b/drivers/xen/blkback/xenbus.c      Sun Aug 16 08:42:29 2009 +0100
@@ -255,42 +255,6 @@ fail:
        return err;
 }
 
-static void blkback_read_credit(struct xenbus_transaction xbt,
-                               struct xenbus_device *dev,
-                                unsigned long *credit, unsigned long *msec)
-{
-       char *s, *e;
-       unsigned long b, u;
-       char *ratestr;
-
-       /* Default to unlimited I/O operations. */
-       *credit = ~0UL;
-       *usec = 0;
-
-       ratestr = xenbus_read(xbt, dev->nodename, "credit", NULL);
-       if (IS_ERR(ratestr))
-               return;
-
-       s = ratestr;
-       b = simple_strtoul(s, &e, 10);
-       if ((s == e) || (*e != ','))
-               goto fail;
-
-       s = e + 1;
-       u = simple_strtoul(s, &e, 10);
-       if ((s == e) || (*e != '\0'))
-               goto fail;
-
-       *credit = b;
-       *msec = (u / 1000);
-
-       kfree(ratestr);
-       return;
-
- fail:
-       WPRINTK("Failed to parse I/O credit limit. I/O operations are 
unlimited.\n");
-       kfree(ratestr);
-}
 
 /**
  * Callback received when the hotplug scripts have placed the physical-device
@@ -437,7 +401,6 @@ static void frontend_changed(struct xenb
 /* ** Connection ** */
 
 
-
 /**
  * Write the physical details regarding the block device to the store, and
  * switch to Connected state.
@@ -461,10 +424,6 @@ again:
        err = blkback_barrier(xbt, be, 1);
        if (err)
                goto abort;
-
-       blkback_read_credit(xbt, dev, &be->blkif->credit_req,
-                           &be->blkif->credit_msec);
-       be->blkif->remaining_credit = be->blkif->credit_req;
 
        err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
                            vbd_size(&be->blkif->vbd));

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Revert 927:56df01ffed10, Xen patchbot-linux-2.6.18-xen <=