pussuw opened a new pull request, #12435:
URL: https://github.com/apache/nuttx/pull/12435

   ## Summary
   This set of patches change how user service calls are executed:
   Instead of using the common interrupt logic, execute the user service
   call directly.
   
   Why? When a user makes a service call request, all of the service call
   parameters are already loaded into the correct registers, thus it makes
   no sense to first clobber them and then reload them, which is what the
   old logic does. It is much more effective to run the system call directly.
   
   During a user system call the interrupts must be re-enabled, which the
   new logic does as soon as we know the exception is a user service call
   request.
   
   This patch set does NOT change the behavior of reserved system calls (like
   switch_context), only the user service call request is affected.
   ## Impact
   User system call logic basically rewritten to improve performance.
   
   Performance was measured with custom app that counts cycles of getpid() 
   system call over 1000 iterations, recording the min/max/avg values.
   
   Performance impact is ~400 cycles (~40% less overhead) saved per system call:
   nsh> hello -v
   avg:2111, min:950, max:527713, rounds:1000
   
   nsh> hello -v
   avg:1580, min:586, max:392567, rounds:1000
   
   ## Testing
   rv-virt:knsh64 ostest
   rv-virt:ksmp64 ostest
   MPFS target with ~100 user & kernel threads 
   


-- 
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