Details
-
Suggestion
-
Resolution: Cannot Reproduce
-
P2: Important
-
5.12.1, 5.13.0 Alpha 1
-
-
2021wk42POEmbedded, 2021wk44POEmbedded
Description
In general POSIX fifos have very bad implementation in Integrity OS in terms of speed. When there is usage of fifo, the Integrity FileServer (a VAS/process used to process the file system requests) has very high CPU load. QT is using fifo inside event dispatcher (QThreadPipe) and the usage is only intended to wake up the event dispatcher thread. This is standard way to implement “poll” over sockets and ability to cancel the poll(kind like semaphore), but in Integrity this generate very high CPU load - roughly about 50% CPU of one core is going to FileServer and it can raise up to 70-80% in some situations.
Integrity documentation suggests another way to implement poll over sockets/semapohore/timers. In short new implementation is using:
- Clock + Activity objects to implement timers
- Semaphore object to implement QThreadPipe (wakeup)
- PollItem to wrap socked fds with Activity
- The poll call is replaced with WaitForActivity call
Note that wrapping the socket fds with PollItem is library in Integrity, used to create Activity for socked fd.
Documentation of this functionality inside Integrity documentation seems limited but there is an example how to use it: AsyncSocketEvents. You should have this example in Nvidia PDK.