yf13 opened a new pull request, #12320:
URL: https://github.com/apache/nuttx/pull/12320
## Summary
Current task group data is embedded in the task TCB as `task_tcb_s.group`,
this leads to overheads for additional kthreads. Also the difference among
different TCB types are still big thus unifying still needs efforts.
This patch drops the `group` field from `task_tcb_s` so that to decouple
them. It has only one shared group instance for all kthreads. Thus the overhead
is reduced when more kthreads are in use. Also the lifecycle management for
both TCB and group are simplified.
Memory overhead of a `task_group_s` instance:
| config | nsh | nsh64 | knsh32 | knsh64 |
| ------ | ---------- | -------- | -------- | -------- |
| size | 730 | 1160 | 248 | 440 |
Kernel memory footprints collected from attached logs:
| config | #kthreads | embedded | external |
| ------ | ---------- | -------- | -------- |
| nsh | 1 | 7044 | 7052 |
| nsh64 | 1 | 10344 | 10344 |
| knsh32 | 2 | 10348 | 9660 |
| knsh64 | 2 | 13304 | 12168 |
## Impact
This may affect all configs.
## Testing
- Github CI checks
- QEMU 6.2 on Ubuntu 22.04 with configs `nsh`, `nsh64`, `knsh32` and
`knsh64`, see attached test logs, where the "external" folder
contains logs of this patch and the "embedded" folder contains
logs of upstream.
--
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]