-
Notifications
You must be signed in to change notification settings - Fork 8.4k
zbus: make CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS configurable #89953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zbus: make CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS configurable #89953
Conversation
rodrigopex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw you merged the main into your branch. You need to use rebase only. Please, apply the requested changes and let's see what the CI says.
doc/services/zbus/index.rst
Outdated
| a pool for the message subscriber for a set of channels; | ||
| * :kconfig:option:`CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_STATIC_DATA_SIZE` the biggest message of zbus | ||
| channels to be transported into a message buffer; | ||
| * :kconfig:option:`CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS` the reserved heap size for message buffer allocation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not only for message subscribers but also for zbus as a whole.
subsys/zbus/Kconfig
Outdated
|
|
||
| config HEAP_MEM_POOL_ADD_SIZE_ZBUS | ||
| int | ||
| int "Zbus message subscriber heap pool size." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heap is not only for message subscribers.
| int "Zbus message subscriber heap pool size." | |
| int "Zbus requested heap pool size." |
Curiosity only. No other subsystem in Zephyr has a prompt for adding heap size. All of them are defined internally. I see value in it, allowing the user to change that in the application configuration, since the applications will differ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This made me interested and I found at least CONFIG_HEAP_MEM_POOL_ADD_SIZE_TLS_CRED_SHELL also implementing an configurable heap size 😄
subsys/zbus/Kconfig
Outdated
| This configures heap memory pool available for configured net buffers via ZBUS_MSG_SUBSCRIBER_NET_BUF_POOL_SIZE. | ||
| Can be set, if more heap is required, or default heap size is too big for the soc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make that more generic since zbus also uses heap for other means. You can comment on that to state the importance of this configuration.
0c9a0cd to
7960d4a
Compare
Should be done! |
|
Needs a rebase on |
4691599 to
04b48f0
Compare
|
Please squash commits that change the same kconfig text. |
Zbus currently does only support default heap sizes. The configuration option allows to decrease rom-footprint for embedded applications. Adding the option to ZBus improves its flexibility and while not increasing its complexity. Add default of 0 value to compensate for previous cases where HEAP_MEM_POOL_ADD_SIZE_ZBUS was defined as "". Consistent naming 'Zbus'/'zbus' to 'ZBus' Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
Add and exchange global heap configuration CONFIG_HEAP_MEM_POOL_SIZE against configuration used for auto heap calculation CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS. Add CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS as related configuration Clarify that HEAP is used for zbus in a whole Consistent naming 'Zbus'/'zbus' to 'ZBus' Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
04b48f0 to
d36a96d
Compare
|
|
@rodrigopex @ubieda |



#77631 introduces default non configurable values for zbus heap. This may result in insufficient heap size for application or soc,
This change :
Recreation of #89012 to avoid CI failures.