2023-08-30 22:22:10

by Alexander Potapenko

[permalink] [raw]
Subject: Re: [PATCH 04/15] stackdepot: add depot_fetch_stack helper

On Tue, Aug 29, 2023 at 7:11 PM <[email protected]> wrote:
>
> From: Andrey Konovalov <[email protected]>
>
> 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 <[email protected]>
Reviewed-by: Alexander Potapenko <[email protected]>

(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.