anchao commented on code in PR #20686:
URL: https://github.com/apache/nuttx/pull/20686#discussion_r4285054853
##########
boards/sim/sim/sim/configs/bt/defconfig:
##########
@@ -0,0 +1,158 @@
+############################################################################
+# boards/sim/sim/sim/configs/bt/defconfig
+#
+# Copyright (c) ByteDance Ltd. and/or its affiliates.
Review Comment:
Thanks for the suggestion. The reason we're keeping this in the kernel
instead of moving it to nuttx-apps is primarily about performance and resource
efficiency.
Under flat build, we want the Bluetooth stack's performance and resource
consumption to be comparable to Zephyr's. If we move it to userspace, the
userspace API boundary would introduce significant overhead — each buffer
operation crossing the syscall
boundary adds non-trivial cost for IoT devices with limited CPU.
Additionally, a VFS-based read/write path would introduce extra memory copies
that are simply unnecessary in flat build mode, where the stack can directly
call kernel APIs with zero
overhead.
So keeping it in the kernel is intentional — it lets us achieve
Zephyr-level performance in flat build, while still having a path to proper
userspace separation in later phases (protected/kernel build) via the
socket/VFS layer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]