-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
call to bt_gatt_hids_init influences execution time of work queue #20632
Comments
I apologize for wrong description of the issue yesterday. I've updated it to somethin (I hope) more meaning full. |
I don't really get this one, the stack can only really tell if the services have changed by generating a hash and then proceed to compare to the stored one. As for calling db_hash_store doesn't setting_save_one actually checks if the value is the same and skip any IO, or that is not always the case, in which case we should probably compare to stored_hash before commiting anything. |
@Vudentz We had the same discussion here in a different issue and the conclusion there was that settings_save would not overwrite if the value was the same. |
This might be related to #22730 |
That's probably correct. The hash will have to calculated, but should not be stored if not changed. |
@pdunaj or @MarekPieta can you verify if the issue still exist? |
Close this as I was told by @MarekPieta that the issue has been fixed. |
Describe the bug
If an application registers gatt services for a first time the bt_gatt_init is called that at the end of the day leads to call to db_hash_store if CONFIG_BT_SETTINGS is enabled.
That also leads to block of system work queue for a long time if settings are stored in flash.
Expected behavior
Is that correct to store the hash every power up/reset of the application if the same services are registered once again?
Impact
It may cause decrease of a flash lifetime if device is restarted very often.
Can't run high frequency works in a system work queue because of lag provided by settins store of db hash.
The text was updated successfully, but these errors were encountered: