]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] scheduler: get rid of the 4 trees thanks and use ebtree v4.1
authorWilly Tarreau <w@1wt.eu>
Sat, 21 Mar 2009 09:01:42 +0000 (10:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 21 Mar 2009 09:25:14 +0000 (10:25 +0100)
commite35c94a74894d1d4789fe193b6690a90e9ab24af
tree600c1adf19fc4c114b925ab53a8ea1409ab0e690
parent5804434a0f94d1f5f7f7bde2fa6ff35888d99e8f
[MEDIUM] scheduler: get rid of the 4 trees thanks and use ebtree v4.1

Since we're now able to search from a precise expiration date in
the timer tree using ebtree 4.1, we don't need to maintain 4 trees
anymore. Not only does this simplify the code a lot, but it also
ensures that we can always look 24 days back and ahead, which
doubles the ability of the previous scheduler. Indeed, while based
on absolute values, the timer tree is now relative to <now> as we
can always search from <now>-31 bits.

The run queue uses the exact same principle now, and is now simpler
and a bit faster to process. With these changes alone, an overall
0.5% performance gain was observed.

Tests were performed on the few wrapping cases and everything works
as expected.
include/common/ticks.h
include/proto/task.h
src/task.c