lkml.org 
[lkml]   [2010]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] add rb_next in block throttle
From
When selecting group for dispatching, the first entry of the service
tree is sequentially dequeued, then the first entry is recomputed by
calling rb_first().

When the first is removed from service tree, new first could also be
computed with rb_next(), since it could be faster than rb_first in
this special environment.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/block/blk-throttle.c 2010-11-01 19:54:12.000000000 +0800
+++ b/block/blk-throttle.c 2010-11-26 21:27:40.000000000 +0800
@@ -251,7 +251,7 @@ static void rb_erase_init(struct rb_node
static void throtl_rb_erase(struct rb_node *n, struct throtl_rb_root *root)
{
if (root->left == n)
- root->left = NULL;
+ root->left = rb_next(n);
rb_erase_init(n, &root->rb);
--root->count;
}

\
 
 \ /
  Last update: 2010-11-26 15:09    [W:0.202 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site