snetdev/lpel — pull request #14 by jsyk (2012-08-28 13:23:55+00:00)
Title: 1. fix the clock source of the monitoring system; 2. throttle rescheduling in binary semaphore

1. fix the clock source of the monitoring system (timing.c)
The originally preferred clock source CLOCK_PROCESS_CPUTIME_ID gives the process time cumulated over all threads, which is unusable for logging purposes.

2. Throttle LPEL task re-scheduling to max 1000 times per sec in binary semaphores. (sema.c)
Binary semaphores are used in SAC to implement fast barriers.
Ideally there shouldn't be other tasks on those workers that run SAC bees.
The need for task rescheduling on these dedicated workers is very low.
Therefore, to optimize overheads this function will try to re-schedule
the LPEL worker at most once per 1 milisecond.
You may not like it, but it certainly improves the performance over the current state.