Describe the bug
At some point, an example was included to pin CFE core apps to core 0.
Problem is - no affinity is set (at all) for other apps, and so these will inherit the affinity of the parent. Because apps are started from ES, which was pinned to 0, this means all apps end up getting pinned to 0.
To Reproduce
Run multiple threads on a multi-core machine. It becomes evident that only one thread is running at a time.
Expected behavior
If multiple threads are running and multiple cores are available, OS should (by default) float threads between cores.
Additional context
To work as the comment suggests, this needs to have an "else" statement that sets the affinity to all cores, or else everything will end up inheriting the assignment of CFE_ES.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
Describe the bug At some point, an example was included to pin CFE core apps to core 0.
Problem is - no affinity is set (at all) for other apps, and so these will inherit the affinity of the parent. Because apps are started from ES, which was pinned to 0, this means all apps end up getting pinned to 0.
To Reproduce Run multiple threads on a multi-core machine. It becomes evident that only one thread is running at a time.
Expected behavior If multiple threads are running and multiple cores are available, OS should (by default) float threads between cores.
Code snips https://github.com/nasa/PSP/blob/eaf80b16306d29cbfbd0a2088267578f4c84549b/fsw/pc-linux/src/cfe_psp_start.c#L182-L187
System observed on: Debian
Additional context To work as the comment suggests, this needs to have an "else" statement that sets the affinity to all cores, or else everything will end up inheriting the assignment of CFE_ES.
Reporter Info Joseph Hickey, Vantage Systems, Inc.