lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Nov 2010 22:06:27 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] add rb_next in block throttle

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@...il.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;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ