Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Oct 28, 2025

Add shell command to track how many resource tracking containers each module instances uses in its lifetime.

This is now a draft PR as I have more important PRs to work on. Let's see late on if this is considered important enough to get it merged.

Jyri Sarha added 2 commits October 29, 2025 01:04
Add resource tracking container usage statistics to module code.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add sof module_container_usage command that prints out currently used
resource containers and high water mark for each module instance.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@softwarecki
Copy link
Collaborator

It looks like containers are never freed - free slots are just added to the list. Are you planning to change that? Right now the number of used slots will match their watermark.

@jsarha
Copy link
Contributor Author

jsarha commented Oct 31, 2025

It looks like containers are never freed - free slots are just added to the list. Are you planning to change that? Right now the number of used slots will match their watermark.

I do not think there is a point to free the containers in modules lifetime. If a module has needed certain amount of containers at one point, I would think it is quite likely that it would need them again later on. All the containers are of course freed at module unload time.

@softwarecki
Copy link
Collaborator

If you do not plan to release containers, counting container_high_water_mark is unnecessary.

@jsarha
Copy link
Contributor Author

jsarha commented Nov 28, 2025

If you do not plan to release containers, counting container_high_water_mark is unnecessary.

I do not intend to get this merged, but it would not be entirely unnecessary. The containers are allocated in 16-container chunks, and the amount of allocated cointainers is not the same as the maximum amount used. For instance SRC used max 5 containers, but it has allocated 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.

2 participants