Bug fix on burst of GENA notification
When a lot of notifications were generated by a device in a short
period of time then 100% of the CPU was used to reorder those
notifications by pushing back the thread in the job queue. This
mechanism has been modified so now thread sleep 1 ms before being
pushed back into the job queue.
Removing DEFAULT_SCHED_PARAM parameter and use
sched_get_priority_min(DEFAULT_POLICY) instead.
(cherry picked from commit c33b11d09f
)
This commit is contained in:

committed by
Marcelo Roberto Jimenez

parent
6567f7ec0d
commit
fe7a073bc7
@@ -158,10 +158,6 @@ typedef int PolicyType;
|
||||
#define DEFAULT_POLICY SCHED_OTHER
|
||||
|
||||
|
||||
/*! Default priority */
|
||||
#define DEFAULT_SCHED_PARAM 0
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: free_routine
|
||||
*
|
||||
|
@@ -246,7 +246,7 @@ static int SetPolicyType(PolicyType in)
|
||||
|
||||
memset(¤t, 0, sizeof(current));
|
||||
sched_getparam(0, ¤t);
|
||||
current.sched_priority = DEFAULT_SCHED_PARAM;
|
||||
current.sched_priority = sched_get_priority_min(DEFAULT_POLICY);
|
||||
sched_result = sched_setscheduler(0, in, ¤t);
|
||||
retVal = (sched_result != -1 || errno == EPERM) ? 0 : errno;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user