Process latency in T4240 custom board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Process latency in T4240 custom board

625 Views
appalanaidug
Contributor II

Hello,

We are working on T4240 custom board.

We have run the following code, to check the time taken by process to excecute.

main()

{

while(1)

{

    time1=gettimeofday();

   printf("\r\n time :%ld",time1);

}

}

We have observed that the time stamp difference is about 300 ms in regular intervals.

We have checked the kernel scheduling policy between the multiple cores in T4240 and found that it is

"SCHED_OTHER"

 

Help is requested on the following points:

1. Is the difference in timestamp (of 300ms) due to scheduling of processes between multiple cores?

2. If the difference is due to policy "SCHED_OTHER", how to change the scheduling policy of the kernel to avoid delay in processing.

 

thanks in advance.

 

 

 

 

 

0 Kudos
Reply
1 Reply

591 Views
bpe
NXP Employee
NXP Employee


There is no guarantee that a routine consisting of two adjacent system
calls always take the same time to complete. There can be multiple reasons
for that, not necessarily related to task scheduling. If you wish to know exactly
where the processor spends time, profile your code. If the question is rather
about how Linux scheduling works, you can find plenty of information in
Linux kernel generic documentation.

 

Best Regards,
Platon

0 Kudos
Reply