This is an automated email from the ASF dual-hosted git repository.
GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b0281853bc1 fs/mqueue: change default FS_MQUEUE_NPOLLWAITERS to 2
b0281853bc1 is described below
commit b0281853bc1f6dd0b15f34d538235dcc739a152a
Author: Swatantra Yadav <[email protected]>
AuthorDate: Fri Nov 27 00:28:46 2026 +0530
fs/mqueue: change default FS_MQUEUE_NPOLLWAITERS to 2
In fs/mqueue/Kconfig, CONFIG_FS_MQUEUE_NPOLLWAITERS currently defaults
to 4, which was introduced when poll support was added in PR #2957.
Each POSIX message queue pre-allocates an array of poll descriptors
(FAR struct pollfd_s *fds[CONFIG_FS_MQUEUE_NPOLLWAITERS]) inside
struct mqueue_inode_s. When mq_open() creates a queue, this structure
is dynamically allocated from the heap. In typical embedded and RTOS
applications, a message queue has at most one reader and one writer
waiting concurrently on poll/select/epoll events.
This change sets the default of CONFIG_FS_MQUEUE_NPOLLWAITERS to 2,
aligning it with the rest of the IPC poll waiter configurations:
CONFIG_SERIAL_NPOLLWAITERS=2 (PR #22228), CONFIG_DEV_PIPE_NPOLLWAITERS=2
(PR #22348), CONFIG_EVENT_FD_NPOLLWAITERS=2, CONFIG_TIMER_FD_NPOLLWAITERS=2,
CONFIG_SIGNAL_FD_NPOLLWAITERS=2, and CONFIG_FS_NOTIFY_FD_POLLWAITERS=2.
This saves 8 bytes of heap memory per message queue on 32-bit targets
(16 bytes on 64-bit targets).
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Swatantra Yadav <[email protected]>
---
fs/mqueue/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/mqueue/Kconfig b/fs/mqueue/Kconfig
index d0e60a2783b..8dc557a2d2b 100644
--- a/fs/mqueue/Kconfig
+++ b/fs/mqueue/Kconfig
@@ -34,7 +34,7 @@ config FS_MQUEUE_VFS_PATH
config FS_MQUEUE_NPOLLWAITERS
int "Maximum number of poll waiters"
- default 4
+ default 2
---help---
The maximum number of waiters for the poll operation.