This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Thread priorities in RDK

Guru 20755 points
Hello, Link Threads priorities in RDK are 2 and above (decode-2, capture-10, IPC - 12, etc.). This leaves a short range of priorities for threads in application if we don't want to have the same priority ranges. I would like to know why the priorities values of Links are in such range that does not leave application any ranges for priorities ? Regards, Ran
  • Ran,

    I assume your application is running on A8. How does priorities of decode, capture links afftect application on A8 as they are running on M3. Regarding priorities of threads running on A8 (links under src_linux), I think links should have higher priorities as application thread is actually a consumer. Having application at higher priority may cause issues in execution e.g. if the application thread waits on resource (like buffer) and lower priority link thread doesn't get chance to run, the system would stall.

     

     

  • Hi Yogesh, Thanks for the reply. Decoder and capture Links are all in M3, but I meant here other links such as ipcBitsIn/Out Links and ipcFramesIn/Out Links which are in A8 and have priority 2. You are also right that Links should have higher priorities then application threads. But if the Links priorities in A8 is 2, and application should have lower priority, then it leaves for application threads a very short range of priorities ( from 1 to 1 or maximum 2). Regards, Ran
  • Ran,

    I'm not sure why priority 1 is left out but application threads which are consuming from link threads should have lower priority than links. I guess independent application threads (resource wise) can still have priorities equal to link priorities or higher (1).

  • >I'm not sure why priority 1 Sorry, I probably miss-understood something... As I understand, SCHED_FIFO priorities are ranges from 1-99, 99 for highest priority. If I want my application to have lower priority then 2, then If I understand correct, it should be priority value 1. Please correct me if wrong. Thank you for your time, Ran
  • Ran,

    I'm sorry I mixed up too :-( You are correct, considering SCHED_FIFO we have left less range of priorities for the application threads dependent on link threads. I will bring up the discussion with team here. Thanks.

     

  • OK, Many thanks! Ran
  • Hi Yogesh, Did you check the issue of Links priorities in A8 ? Best Regards, Ran
  • Ran,

    We had discussed this. Actually for RDK demo applications we do not need wide range of priorities on A8. If that is the requirement you can change priorities  in dvr_rdk\mcfw\src_linux\links\system\system_priv_common.h _relatively_ to higher numbers between 1-99 and then have more room for application's priorities.

     

  • OK, Thank you very much,

    Ran