[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190729101454.jd6ej2nrlyigjqs4@pc636>
Date: Mon, 29 Jul 2019 12:14:54 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michel Lespinasse <walken@...gle.com>,
Davidlohr Bueso <dave@...olabs.net>,
Peter Zijlstra <peterz@...radead.org>,
David Howells <dhowells@...hat.com>,
"Uladzislau Rezki (Sony)" <urezki@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/3] augmented rbtree: add new
RB_DECLARE_CALLBACKS_MAX macro
>
> --- a/lib/rbtree_test.c~augmented-rbtree-add-new-rb_declare_callbacks_max-macro-fix-2
> +++ a/lib/rbtree_test.c
> @@ -220,10 +220,6 @@ static void check_augmented(int nr_nodes
> struct rb_node *rb;
>
> check(nr_nodes);
> - for (rb = rb_first(&root.rb_root); rb; rb = rb_next(rb)) {
> - struct test_node *node = rb_entry(rb, struct test_node, rb);
> - WARN_ON_ONCE(node->augmented != augment_recompute(node));
> - }
> }
>
I have a question here it is a bit out of this topic but still related :)
Can we move "check augmented" functionality to the rbtree_augmented.h
header file making it public?
I am asking because many users might need it, i mean to check that the
tree is correctly augmented and is correctly maintained. For example
in vmalloc i have my own implementation:
<snip>
#if DEBUG_AUGMENT_PROPAGATE_CHECK
static void
augment_tree_propagate_check(struct rb_node *n)
{
...
}
<snip>
in order to debug and check that nodes are augmented correctly across
the tree.
Thank you.
--
Vlad Rezki
Powered by blists - more mailing lists