Skip to content

fast-get: move to object pool#10735

Merged
lgirdwood merged 1 commit intothesofproject:mainfrom
lyakh:fastget
May 5, 2026
Merged

fast-get: move to object pool#10735
lgirdwood merged 1 commit intothesofproject:mainfrom
lyakh:fastget

Conversation

@lyakh
Copy link
Copy Markdown
Collaborator

@lyakh lyakh commented Apr 30, 2026

Instead of allocating entries manually move fast-get to an object pool.

Copilot AI review requested due to automatic review settings April 30, 2026 11:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Zephyr fast-get implementation to allocate/track sof_fast_get_entry objects via the shared objpool API instead of manually reallocating a linear entry array.

Changes:

  • Replace manual entry-array growth/reuse logic with an objpool_head-backed pool.
  • Update fast_get() / fast_put() entry lookup to use objpool_iterate() callbacks.
  • Allocate new entries via objpool_alloc() when no match is found.

Comment thread zephyr/lib/fast-get.c
Comment thread zephyr/lib/fast-get.c
Comment thread zephyr/lib/fast-get.c
Instead of allocating entries manually move fast-get to an object
pool.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Comment thread zephyr/lib/fast-get.c

return 0;
}
struct fast_get_find {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
I would just consider minor cosmetic changes:
fast_get_find -> fast_get_iter_arg
fast_get_find_entry -> fast_get_iter_fn
fast_put_find_entry -> fast_put_iter_fn

The proposed changes are more semantically accurate (as we perform a single iteration per function call).

@lgirdwood lgirdwood merged commit 65345cd into thesofproject:main May 5, 2026
40 of 41 checks passed
@lyakh lyakh deleted the fastget branch May 5, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants