* Practical performance change to qdisc_lookup
@ 2010-07-02 15:51 Bart
0 siblings, 0 replies; only message in thread
From: Bart @ 2010-07-02 15:51 UTC (permalink / raw)
To: netdev@vger.kernel.org
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-02 15:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02 15:51 Practical performance change to qdisc_lookup Bart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).