Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74246

[Integrity] Posix Pipes Cause Big CPU load Under Integrity

XMLWordPrintable

    • Integrity
    • 2021wk42POEmbedded, 2021wk44POEmbedded

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kiollila Kimmo Ollila
            karimpinter Karim Pinter
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes