Re: [PATCH 13/15] stackdepot: add backwards links to hash table buckets

From: Andrey Konovalov
Date: Wed Sep 13 2023 - 13:08:27 EST


On Wed, Aug 30, 2023 at 11:24 AM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> > diff --git a/lib/stackdepot.c b/lib/stackdepot.c
> > index a84c0debbb9e..641db97d8c7c 100644
> > --- a/lib/stackdepot.c
> > +++ b/lib/stackdepot.c
> > @@ -58,6 +58,7 @@ union handle_parts {
> >
> > struct stack_record {
> > struct stack_record *next; /* Link in hash table or freelist */
> > + struct stack_record *prev; /* Link in hash table */
>
> At this point this could be a normal list_head? Then you don't have to
> roll your own doubly-linked list manipulation (and benefit from things
> like CONFIG_LIST_DEBUG).

Yeah, I think this makes sense. Will do in v2. Thanks!