Page MenuHomeFreeBSD
Feed Advanced Search

Thu, Jul 9

dougm added a comment to D25480: Change from red-black to wavl balancing for RB trees.

R-B tree:
real 0m28.814s
user 0m28.795s

Thu, Jul 9, 10:11 PM
dougm added a comment to D25480: Change from red-black to wavl balancing for RB trees.

I take it that this test does not do any lookups? I am personally not overly concerned by a pessimization in a write-heavy benchmark, since a binary search tree is probably not the best choice for that scenario to begin with.

Thu, Jul 9, 9:22 PM
dougm added a comment to D25480: Change from red-black to wavl balancing for RB trees.

Adding a test result to reflect the downside of this change. If you replace the sorted inserts and removals with randomly generated ones (random() % maxsize), then the red-black tree takes this time:
real 0m19.819s
user 0m19.801s

Thu, Jul 9, 7:22 PM

Wed, Jul 8

dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Apply reviewer suggestions.

Wed, Jul 8, 8:24 PM
dougm added a comment to D25480: Change from red-black to wavl balancing for RB trees.

For a test case that inserts and removes items in sorted order, so that the tree stays as unbalanced as possible, this modification improves performance from
real 0m20.837s
user 0m20.728s
to
real 0m16.141s
user 0m16.059s
and no color-balancing at all would be terrible.

Wed, Jul 8, 9:39 AM
dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.
Wed, Jul 8, 7:15 AM
dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Tighten up RB_REMOVE_COLOR a bit.

Wed, Jul 8, 7:14 AM
dougm added a reviewer for D25480: Change from red-black to wavl balancing for RB trees: alc.
Wed, Jul 8, 7:13 AM

Tue, Jun 30

dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Optimize the color-changing code in RB_INSERT_COLOR and RB_REMOVE_COLOR by allowing both colors to be set to red, or not-red, at once, in some cases.

Tue, Jun 30, 8:26 PM

Sun, Jun 28

dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Move the handling of the deleting-a-leaf special coloring case from RB_REMOVE to RB_REMOVE_COLOR, to avoid entangling rebalancing with augmentation.

Sun, Jun 28, 6:38 AM
dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Simplify RB_REMOVE. Let RB_REMOVE_COLOR do more of the color changing.

Sun, Jun 28, 1:10 AM

Sat, Jun 27

dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Add checking for null parent in RB_REMOVE.

Sat, Jun 27, 5:50 PM
dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Restoring the missing tree.h changes.

Sat, Jun 27, 6:31 AM
dougm updated the diff for D25480: Change from red-black to wavl balancing for RB trees.

Assuming that the failure to compile is because of the RB_AUGMENT call not within a loop, change to put it within a trivial loop. I've been testing with non-null augmentation so that this problem was not apparent.

Sat, Jun 27, 6:14 AM
dougm added a comment to D25480: Change from red-black to wavl balancing for RB trees.

Oh, the irony. :)

Please give me a few days to read up on WAVL trees, I haven't encountered them before. (I know I usually take a few days anyway, sorry about that.)

Sat, Jun 27, 12:17 AM

Fri, Jun 26

dougm requested review of D25480: Change from red-black to wavl balancing for RB trees.
Fri, Jun 26, 10:20 PM

Thu, Jun 25

dougm committed rS362617: Eliminate the color field from the RB element struct. Identify the.
Eliminate the color field from the RB element struct. Identify the
Thu, Jun 25, 5:44 PM
dougm closed D25418: Replace RB color field with tag bits in the parent pointer.
Thu, Jun 25, 5:44 PM

Wed, Jun 24

dougm updated the diff for D25418: Replace RB color field with tag bits in the parent pointer.

Apply reviewer suggestions.

Wed, Jun 24, 7:52 PM
dougm updated the diff for D25418: Replace RB color field with tag bits in the parent pointer.

In RB_REMOVE_COLOR, treat the null parent-of-root as red, to avoid having the next iteration with a null parent pointer.

Wed, Jun 24, 8:32 AM
dougm updated the diff for D25418: Replace RB color field with tag bits in the parent pointer.

Fixup RB_SET_PARENT after a hasty cut and paste.

Wed, Jun 24, 6:18 AM

Tue, Jun 23

dougm committed rS362562: In r362552, RB_SET_PARENT is defined, and use in parens in.
In r362552, RB_SET_PARENT is defined, and use in parens in
Tue, Jun 23, 10:48 PM
dougm closed D25421: RB_SET_PARENT cannot be used as an expression.
Tue, Jun 23, 10:48 PM
dougm requested review of D25421: RB_SET_PARENT cannot be used as an expression.
Tue, Jun 23, 10:37 PM
dougm updated the diff for D25418: Replace RB color field with tag bits in the parent pointer.

Clean up RB_SET_PARENT.

Tue, Jun 23, 8:16 PM
dougm requested review of D25418: Replace RB color field with tag bits in the parent pointer.
Tue, Jun 23, 8:12 PM
dougm committed rS362552: Define RB_SET_PARENT to do all assignments to rb parent.
Define RB_SET_PARENT to do all assignments to rb parent
Tue, Jun 23, 8:03 PM
dougm closed D25264: Define RB parent assignment macros.
Tue, Jun 23, 8:03 PM
dougm closed D25245: strip color bit from rb tree pointers for linuxkpi.
Tue, Jun 23, 3:21 AM
dougm requested review of D25245: strip color bit from rb tree pointers for linuxkpi.
Tue, Jun 23, 3:21 AM
dougm updated the diff for D25204: Supply RB_COLOR macro.

Same change as before, from the right directory this time.

Tue, Jun 23, 3:21 AM
dougm closed D25204: Supply RB_COLOR macro.
Tue, Jun 23, 3:21 AM
dougm updated the diff for D25204: Supply RB_COLOR macro.

Include the root-of-tree case.

Tue, Jun 23, 3:21 AM
dougm requested review of D25204: Supply RB_COLOR macro.
Tue, Jun 23, 3:21 AM
dougm added a comment to D25264: Define RB parent assignment macros.

Let me give this a spin on Monday with a mellanox.

Tue, Jun 23, 2:07 AM

Sat, Jun 20

dougm committed rS362450: In concluding RB_REMOVE_COLOR, in the case when the sibling of the.
In concluding RB_REMOVE_COLOR, in the case when the sibling of the
Sat, Jun 20, 8:26 PM
dougm closed D25335: Drop unneeded rotation from RB_REMOVE_COLOR.
Sat, Jun 20, 8:26 PM
dougm added a comment to D25335: Drop unneeded rotation from RB_REMOVE_COLOR.

If I understand correctly, with the original code, the intermediate state of the tree prior to the second rotation after removing 7 is:

B6:17
    B5:11
        B4:6
            R2:2
Sat, Jun 20, 6:51 PM
dougm added a reviewer for D25264: Define RB parent assignment macros: kib.
Sat, Jun 20, 5:02 AM
dougm updated the summary of D25335: Drop unneeded rotation from RB_REMOVE_COLOR.
Sat, Jun 20, 4:30 AM

Fri, Jun 19

dougm abandoned D22777: clip within the subtree rooted at entry.
Fri, Jun 19, 8:23 PM

Thu, Jun 18

dougm accepted D25328: Add a helper function for validating VA ranges..
Thu, Jun 18, 10:40 PM
dougm added a comment to D25328: Add a helper function for validating VA ranges..

See also vm_fault_quick_hold_pages in vm_fault.c.

Thu, Jun 18, 5:25 PM
dougm added inline comments to D25328: Add a helper function for validating VA ranges..
Thu, Jun 18, 5:17 PM
dougm updated the diff for D25335: Drop unneeded rotation from RB_REMOVE_COLOR.

Drop redundant assignments.

Thu, Jun 18, 9:19 AM
dougm added a comment to D25335: Drop unneeded rotation from RB_REMOVE_COLOR.

A little test program. Enter a positive number to insert into the tree and a negative number to remove its inverse from the tree.

Thu, Jun 18, 9:19 AM
dougm requested review of D25335: Drop unneeded rotation from RB_REMOVE_COLOR.
Thu, Jun 18, 9:19 AM

Tue, Jun 16

dougm accepted D25282: vm: Convert vm_map_clip_end from a macro to a regular inline function.
Tue, Jun 16, 9:38 PM
dougm added inline comments to D25282: vm: Convert vm_map_clip_end from a macro to a regular inline function.
Tue, Jun 16, 8:26 PM

Sun, Jun 14

dougm updated the diff for D25264: Define RB parent assignment macros.

Take RB_SET_PARENT out of RB_SWAP_CHILD; it doesn't belong when the incoming child is NULL.

Sun, Jun 14, 6:45 PM
dougm updated the diff for D25264: Define RB parent assignment macros.

Add a cast to (struct linux_root *).

Sun, Jun 14, 9:02 AM
dougm updated the summary of D25264: Define RB parent assignment macros.
Sun, Jun 14, 8:08 AM
dougm requested review of D25264: Define RB parent assignment macros.
Sun, Jun 14, 7:57 AM

Sat, Jun 13

dougm abandoned D25246: Clear the last bit from all the dereferenced rb_lefts and rb_rights .

Abandoning this.

Sat, Jun 13, 4:03 AM
dougm committed rS362139: Linuxkpi uses the rb-tree structures without using their interfaces,.
Linuxkpi uses the rb-tree structures without using their interfaces,
Sat, Jun 13, 1:54 AM
dougm closed D25250: Undo rb-tree changes incompatible with linuxkpi.
Sat, Jun 13, 1:54 AM
dougm requested review of D25250: Undo rb-tree changes incompatible with linuxkpi.
Sat, Jun 13, 12:14 AM

Fri, Jun 12

dougm updated the diff for D25246: Clear the last bit from all the dereferenced rb_lefts and rb_rights .

Address some omissions in this patch before I abandon it.

Fri, Jun 12, 11:16 PM
dougm updated the diff for D25246: Clear the last bit from all the dereferenced rb_lefts and rb_rights .

Don't modify 'new' in rb_replace_node.

Fri, Jun 12, 7:19 PM
dougm requested review of D25246: Clear the last bit from all the dereferenced rb_lefts and rb_rights .
Fri, Jun 12, 7:06 PM
dougm committed rS362110: Revert r362108, as it breaks compilation..
Revert r362108, as it breaks compilation.
Fri, Jun 12, 5:48 PM
dougm committed rS362108: The linuxkpi code accesses left/right rb tree pointers without using.
The linuxkpi code accesses left/right rb tree pointers without using
Fri, Jun 12, 4:52 PM
dougm updated the summary of D25245: strip color bit from rb tree pointers for linuxkpi.
Fri, Jun 12, 4:40 PM
dougm added a reviewer for D25245: strip color bit from rb tree pointers for linuxkpi: alc.
Fri, Jun 12, 4:39 PM

Jun 10 2020

dougm committed rS362000: Fixup r361997 by balancing parens. Duh..
Fixup r361997 by balancing parens. Duh.
Jun 10 2020, 3:36 AM
dougm committed rS361997: Restore an RB_COLOR macro, for the benefit of a bit of DIAGNOSTIC code.
Restore an RB_COLOR macro, for the benefit of a bit of DIAGNOSTIC code
Jun 10 2020, 2:50 AM

Jun 9 2020

dougm added a comment to D25204: Supply RB_COLOR macro.

I'm also happy to just change the subr_stats.c code. Having RB_TREE and ARB_TREE bound tightly like this makes another RB_TREE change I'm considering impossible.

Jun 9 2020, 11:47 PM
dougm committed rS361984: To reduce the size of an rb_node, drop the color field. Set the least.
To reduce the size of an rb_node, drop the color field. Set the least
Jun 9 2020, 8:19 PM
dougm closed D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.
Jun 9 2020, 8:19 PM

Jun 7 2020

dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Don't depend on anyone else's bool type.

Jun 7 2020, 5:29 PM

Jun 6 2020

dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Remove redundant assignments.

Jun 6 2020, 8:44 AM

Jun 5 2020

dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

This change makes a newly inserted node black, not red, and lets RB_INSERT_COLOR make it red if it needs to be. So rb_link_node no longer needs to be concerned with redness - the default black color is correct. Nowhere else in sys/ is code that depend on rb_color, rb_is_red or rb_is_black, so delete them and the tree.h macros that had been defined to enable them.

Jun 5 2020, 10:58 PM
dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Fix color in rb_link_node.
Fix indentation.

Jun 5 2020, 5:33 PM
dougm added a reviewer for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node: markj.
Jun 5 2020, 6:40 AM

Jun 4 2020

dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Fix order of arguments in the RB_SET_COLOR invocation in rbtree.h.

Jun 4 2020, 7:48 AM

Jun 3 2020

dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Replace "typeof" with "__typeof".

Jun 3 2020, 6:39 AM
dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Restore COLOR in a way that linux compatibilty headers demand.

Jun 3 2020, 6:23 AM
dougm updated the diff for D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.

Correct an error in determining the redness of the successor of an interior node being deleted.

Jun 3 2020, 2:39 AM

Jun 2 2020

dougm updated subscribers of D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.
Jun 2 2020, 5:36 PM
dougm updated the summary of D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.
Jun 2 2020, 5:27 PM
dougm requested review of D25105: Replace the rb_color field in an rb_node with a tag in the parent's pointer to the rb_node.
Jun 2 2020, 5:25 PM
dougm committed rS361727: Remove from RB_REMOVE_COLOR some null checks where the pointer checked.
Remove from RB_REMOVE_COLOR some null checks where the pointer checked
Jun 2 2020, 5:18 PM
dougm closed D25089: Drop unneeded null tests from RB_REMOVE_COLOR.
Jun 2 2020, 5:18 PM

Jun 1 2020

dougm added a reviewer for D25089: Drop unneeded null tests from RB_REMOVE_COLOR: markj.
Jun 1 2020, 8:17 PM
dougm updated the diff for D25089: Drop unneeded null tests from RB_REMOVE_COLOR.

I apologize for failing to test for successful compilation.

Jun 1 2020, 7:19 PM
dougm updated the diff for D25089: Drop unneeded null tests from RB_REMOVE_COLOR.

Change the null test back to a redness test, in a way to encourage the compiler to skip the test when possible.

Jun 1 2020, 6:13 PM
dougm updated the diff for D25089: Drop unneeded null tests from RB_REMOVE_COLOR.

Discard the second part of the change and see if the first part is broken.

Jun 1 2020, 9:08 AM
dougm updated the summary of D25089: Drop unneeded null tests from RB_REMOVE_COLOR.
Jun 1 2020, 5:23 AM
dougm updated the diff for D25089: Drop unneeded null tests from RB_REMOVE_COLOR.

An assignment to black can be dropped in one case, but not the other, so fix that.

Jun 1 2020, 3:55 AM
dougm added a reviewer for D25089: Drop unneeded null tests from RB_REMOVE_COLOR: markj.
Jun 1 2020, 3:34 AM
dougm requested review of D25089: Drop unneeded null tests from RB_REMOVE_COLOR.
Jun 1 2020, 3:31 AM

May 30 2020

dougm closed D25032: Simpilfy RB_REMOVE.
May 30 2020, 1:48 AM
dougm committed rS361640: RB_REMOVE invokes RB_REMOVE_COLOR either when child is red or child is.
RB_REMOVE invokes RB_REMOVE_COLOR either when child is red or child is
May 30 2020, 1:48 AM

May 27 2020

dougm added a reviewer for D25032: Simpilfy RB_REMOVE: markj.
May 27 2020, 9:38 PM
dougm requested review of D25032: Simpilfy RB_REMOVE.
May 27 2020, 9:31 PM

May 21 2020

dougm committed rS361324: For the case when RB_REMOVE requires a nontrivial search to find the.
For the case when RB_REMOVE requires a nontrivial search to find the
May 21 2020, 5:34 AM
dougm closed D24845: Reorder manipulations in RB_REMOVE.
May 21 2020, 5:34 AM

May 18 2020

dougm updated the diff for D24845: Reorder manipulations in RB_REMOVE.

Use a local variable for RB_PARENT(old, field).

May 18 2020, 7:15 PM

May 16 2020

dougm added a reviewer for D24845: Reorder manipulations in RB_REMOVE: markj.
May 16 2020, 7:37 PM

May 15 2020

dougm requested review of D24845: Reorder manipulations in RB_REMOVE.
May 15 2020, 5:27 AM