Re: modifying CFS failure

From: Willy Tarreau
Date: Sat Apr 12 2008 - 09:28:13 EST


On Sat, Apr 12, 2008 at 02:22:03PM +0200, Peter Zijlstra wrote:
> Please provide it as a series of patches against sched-devel/latest.
>
> Just plain AVL code and a huge modified CFS backport make it impossible
> to tell what changed and why.
>
> Which brings us to the question: _why_. That is, why are you trying to
> replace the rb-tree with an avl tree? Just because the worst case depth
> of the avl is slightly better than for an rb-tree, which can be offset
> by the slightl more expesive balance operations.

I would add that in the past, I too tried to replace the rbtree in order
to provide O(1) node deletion time. The tree was not balanced at all
(which provided faster operations). But the net result was very small
(maybe 1%, I don't remember exactly). The reason was that in practise,
the CFS rbtree does not change *that* often, and the pointer to the
first node already provides a great boost. I remember I had to play
in the area of millions of context-switches/s to see a difference, so
it was quite pointless (though the exercise itself was interesting).

> I'm glad people are working on CFS - its an interesting piece of the
> kernel after all, but provide it in a regular patch series, this is
> impossible to work with, sorry.

agreed.

Willy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/