path: root/Documentation/rbtree.txt
AgeCommit message (Collapse)Author
2012-10-09rbtree: move augmented rbtree functionality to rbtree_augmented.hMichel Lespinasse
Provide rb_insert_augmented() and rb_erase_augmented() through a new rbtree_augmented.h include file. rb_erase_augmented() is defined there as an __always_inline function, in order to allow inlining of augmented rbtree callbacks into it. Since this generates a relatively large function, each augmented rbtree user should make sure to have a single call site. Signed-off-by: Michel Lespinasse <> Cc: Rik van Riel <> Cc: Hillf Danton <> Cc: Peter Zijlstra <> Cc: Catalin Marinas <> Cc: Andrea Arcangeli <> Cc: David Woodhouse <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2012-10-09rbtree: faster augmented rbtree manipulationMichel Lespinasse
Introduce new augmented rbtree APIs that allow minimal recalculation of augmented node information. A new callback is added to the rbtree insertion and erase rebalancing functions, to be called on each tree rotations. Such rotations preserve the subtree's root augmented value, but require recalculation of the one child that was previously located at the subtree root. In the insertion case, the handcoded search phase must be updated to maintain the augmented information on insertion, and then the rbtree coloring/rebalancing algorithms keep it up to date. In the erase case, things are more complicated since it is library code that manipulates the rbtree in order to remove internal nodes. This requires a couple additional callbacks to copy a subtree's augmented value when a new root is stitched in, and to recompute augmented values down the ancestry path when a node is removed from the tree. In order to preserve maximum speed for the non-augmented case, we provide two versions of each tree manipulation function. rb_insert_augmented() is the augmented equivalent of rb_insert_color(), and rb_erase_augmented() is the augmented equivalent of rb_erase(). Signed-off-by: Michel Lespinasse <> Acked-by: Rik van Riel <> Cc: Peter Zijlstra <> Cc: Andrea Arcangeli <> Cc: David Woodhouse <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2011-07-24Documentation: Update augmented rbtree documentationSasha Levin
Current documentation referred to the old method of handling augmented trees. Update documentation to correspond with the changes done in commit b945d6b2554d ("rbtree: Undo augmented trees performance damage and regression"). Cc: Pekka Enberg <> Cc: David Woodhouse <> Cc: Andrew Morton <> Acked-by: Ingo Molnar <> Acked-by: Peter Zijlstra <> Signed-off-by: Sasha Levin <> Signed-off-by: Linus Torvalds <>
2010-11-11Documentation: remove anticipatory scheduler infoRandy Dunlap
Remove anticipatory block I/O scheduler info from Documentation/ since the code has been deleted. Signed-off-by: Randy Dunlap <> Reported-by: "Robert P. J. Day" <> Cc: Jens Axboe <> Signed-off-by: Jens Axboe <>
2010-02-18rbtree: Add support for augmented rbtreesPallipadi, Venkatesh
Add support for augmented rbtrees in core rbtree code. This will be used in subsequent patches, in x86 PAT code, which needs interval trees to efficiently keep track of PAT ranges. Signed-off-by: Venkatesh Pallipadi <> LKML-Reference: <> Signed-off-by: Suresh Siddha <> Signed-off-by: H. Peter Anvin <>
2009-06-12trivial: rbtree.txt: fix rb_entry() parameters in sample codeWang Tinggong
Reviewed-by: WANG Cong <> Signed-off-by: Jiri Kosina <>
2009-06-12trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txtfigo.zhang
The first formal parameter of the rb_link_node() is a pointer, and the "node" is define a data struct (pls see line 67 and line 73 in the doc), so the actual parameter should use "&data->node". Signed-off-by: Figo.zhang <> Signed-off-by: Jiri Kosina <>
2007-02-11[PATCH] Documentation/rbtree.txtRob Landley
Documentation for lib/rbtree.c. Signed-off-by: Rob Landley <> Cc: "Randy.Dunlap" <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>