jasonbu opened a new pull request, #3227:
URL: https://github.com/apache/nuttx-apps/pull/3227

   ## Summary
   If the round robin is work as expected, the g_rr_value_index atomic and 
g_rr_values should record different thread be swapped.
   And if not working, the g_rr_values will record all thread run and finish 
one by one. then able to be catch by the code before return.
   
   Also when SMP, two thread able to run in two cores, the case still not able 
to catch problems.
   Add pthread_attr_setaffinity_np to ensure when SMP it still working.
   
   As we rely on the get_primes_thread calulation speed and rr_inerval Kconfig, 
value, it depend on the cpu performance, so 
   change TESTING_OSTEST_RR_RANGE default value from 10000 to 30000, to ensure 
most scene, the default 200ms rr interval able to make get_primes_thread  do at 
least one swap.
   
   ## Impact
   Before patch we never detect the roundrobin fail.
   After patch we able to report if the rondrobin not able to successfully 
trigger context switch even the thread just normal running.
   In self environment rr_test time cost from 100ms to 900ms for extra time 
cost.
   
   ## Testing
   CI-test, self test for qemu armv7a nsh & smp.
   manually allow case run when round robin not enabled to ensure it can catch 
the fail case.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to