-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revert "stm3240g-eval:knxwm and olimex-stm32-p407:kmodule remove FS_REFCOUNT" #13519
base: master
Are you sure you want to change the base?
Conversation
@@ -121,11 +121,17 @@ config FS_HEAPSIZE | |||
|
|||
config FS_REFCOUNT | |||
bool "File reference count" | |||
default !DEFAULT_SMALL |
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.
if the user care size, defconfig should select DEFAULT_SMALL first.
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.
Not all developers are aware of DEFAULT_SMALL, this change will only keep the behavior before #13296 was introduced so that it does not cause any burden to other developers, the default configuration adds 500+ bytes per platform, which is unfair to junior developers.
#define sigev_notify_thread_id _sigev_un._tid | ||
# define sigev_notify_function _sigev_un._sigev_thread._function | ||
# define sigev_notify_attributes _sigev_un._sigev_thread._attribute | ||
# define sigev_notify_thread_id _sigev_un._tid |
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.
need new Kconfig, sigev_notify_thread_id is totally different from sigev_notify_function
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 don't want to add new options, which will make this feature look worse. Thread ID notification is also a kind of thread notification. Why couldn‘t use a configuration to manager them together? a other option should we change the name of CONFIG_SIG_EVTHREAD?
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.
could you drop the patch related to sigev_notify_thread_id? @Fix-Point will provide a new patch to reduce the code 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.
Some developers do not need this kind of advanced features, move sigev_notify_thread_id into SIG_EVTHREAD to save the code size. Signed-off-by: chao an <[email protected]>
Most of developers will not have the scenarios of open/close file descriptors in multi-threads, The default option will incur additional code size overhead for such devices. this PR will preserve the behavior before PR#13296 was introduced, and ensure that the default code size is not affected. Note that this option will ensure the safety of access to the file system from multi-tasks (Task A blocking rw(fd), then Task B close(fd)), the disadvantage is that it will increase the amount of code-size, there is no need to enable this option if the application could ensure he file operations are safe. Signed-off-by: chao an <[email protected]>
[Experimental Bot, please feedback here] NuttX PR Requirement CheckWhile this PR description provides some information, it does not fully meet the NuttX requirements. Here's a breakdown: Strengths:
Weaknesses:
Recommendations for Improvement
By addressing these points, you can significantly improve the clarity and completeness of your PR, making it easier for reviewers to understand and approve your changes. |
Summary
Most of developers will not have the scenarios of open/close file descriptors in multi-threads,
The default option will incur additional code size overhead for such devices.
this PR will preserve the behavior before PR #13296 was introduced, and ensure that the default code size is not affected.
Note that this option will ensure the safety of access to the file
system from multi-tasks (Task A blocking rw(fd), then Task B close(fd)),
the disadvantage is that it will increase the amount of code-size,
there is no need to enable this option if the application could ensure
he file operations are safe.
Original:
After introduce FS_REFCOUNT:
text +528
bss +64
Some developers do not need this kind of advanced features,
move sigev_notify_thread_id into SIG_EVTHREAD to save the code size.
This reverts commit 9a9d0a6.
This reverts commit 756faf3.
Signed-off-by: chao an [email protected]
Impact
N/A
Testing
ci-check