net: gen_estimator: Fix gen_kill_estimator() lookups
authorJarek Poplawski <jarkao2@gmail.com>
Mon, 24 Nov 2008 23:48:05 +0000 (15:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Nov 2008 23:48:05 +0000 (15:48 -0800)
commit4db0acf3c0afbbbb2ae35a65f8896ca6655a47ec
treee13b52665a811f9c5ad3621a2408be1b4f70c78c
parent3f0947c3ffaed33c1c38b79e4b17f75ba072d3e9
net: gen_estimator: Fix gen_kill_estimator() lookups

gen_kill_estimator() linear lists lookups are very slow, and e.g. while
deleting a large number of HTB classes soft lockups were reported. Here
is another try to fix this problem: this time internally, with rbtree,
so similarly to Jamal's hashing idea IIRC. (Looking for next hits could
be still optimized, but it's really fast as it is.)

Reported-by: Badalian Vyacheslav <slavon@bigtelecom.ru>
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gen_estimator.c