[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1278085902.16508.149.camel@bwyatt>
Date: Fri, 2 Jul 2010 10:51:42 -0500
From: Bart <bwyatt@...lovmedia.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Practical performance change to qdisc_lookup
While looking to speed up our batch processing of many-thousands of TC
rules I stumbled across a usage-based optimization of qdisc_lookup().
while not a algorithmic optimization, I would wager that future rules
are likely to refer to the more recently created qdiscs and not the
oldest ones.
It is silly, but I thought I'd survey opinions on the change. It is far
less code entropy than say, implementing a hash lookup.
sch_api.c:
@@ -197,7 +197,7 @@
root->handle == handle)
return root;
- list_for_each_entry(q, &root->list, list) {
+ list_for_each_entry_reverse(q, &root->list, list) {
if (q->handle == handle)
return q;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists