aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cred-internals.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-05-16 00:24:36 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-06-01 19:17:35 -0400
commit8f184f27300f66f6dcc8296c2dae7a1fbe8429c9 (patch)
treea21aa4d88a11217bdd9eaaf31b2189d8b6b45b5b /kernel/cred-internals.h
parent0d64f8342de26d02451900b1aad94716fe92c4ab (diff)
tracing/stat: replace linked list by an rbtree for sorting
When the stat tracing framework prepares the entries from a tracer to output them to the user, it starts by computing a linear sort through a linked list to give the entries ordered by relevance to the user. This is quite ugly and causes a small latency when we begin to read the file. This patch changes that by turning the linked list into a red-black tree. Athough the whole iteration using the start and next tracer callbacks while opening the file remain the same, it is now much more fast and scalable. The rbtree guarantees O(log(n)) insertions whereas a linked list with linear sorting brought us a O(n) despair. Now the (visible) latency has disapeared. [ Impact: kill the latency while starting to read a stat tracer file ] Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/cred-internals.h')
0 files changed, 0 insertions, 0 deletions