Re: [PATCH 04/15] stackdepot: add depot_fetch_stack helper
From: Alexander Potapenko
Date: Wed Aug 30 2023 - 14:38:03 EST
On Tue, Aug 29, 2023 at 7:11 PM <andrey.konovalov@xxxxxxxxx> wrote:
>
> From: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
>
> Add a helper depot_fetch_stack function that fetches the pointer to
> a stack record.
>
> With this change, all static depot_* functions now operate on stack pools
> and the exported stack_depot_* functions operate on the hash table.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
Reviewed-by: Alexander Potapenko <glider@xxxxxxxxxx>
(one nit below)
> +static struct stack_record *depot_fetch_stack(depot_stack_handle_t handle)
> +{
> + union handle_parts parts = { .handle = handle };
> + /*
> + * READ_ONCE pairs with potential concurrent write in
> + * depot_alloc_stack.
Nit: please change to "depot_alloc_stack()" for consistency with the
rest of the comments.