User story #1177
Improve thread priority implementation
0%
Description
--- Source/Core/Scheduler/L1Portability/Environment/Linux/Threads.cpp 2022-02-02 09:30:34.000000000 0000
++ Source/Core/Scheduler/L1Portability/Environment/Linux/Threads.cpp 2022-04-22 13:04:23.235370771 0000@ -161,8 +161,8
@
policy = SCHED_FIFO;//Only put FIFO (more aggressive) for the RealTimePriorityClass
break;
}
- uint32 priorityLevelToAssign = 28u * priorityClassNumber;
- priorityLevelToAssign += (static_cast<uint32>(prioLevel));
uint32 priorityLevelToAssign = 25u * priorityClassNumber;
+ priorityLevelToAssign += ((static_cast<uint32>(prioLevel)/15u)*24u);
sched_param param;
int32 ignore = 0;
- Better mapping between (PriorityClass, PriorityLevel)-->[0, 99]
- Replace polling+sleeptime with event semafore in the CircularBufferThreadInputDataSource::Synchronise method
History
#1 Updated by Giuseppe Ferro almost 3 years ago
- Status changed from New to Code: Impl
#2 Updated by Giuseppe Ferro almost 3 years ago
Giuseppe Ferro wrote:
--- Source/Core/Scheduler/L1Portability/Environment/Linux/Threads.cpp 2022-02-02 09:30:34.000000000 0000
++ Source/Core/Scheduler/L1Portability/Environment/Linux/Threads.cpp 2022-04-22 13:04:23.235370771 0000@ -161,8 +161,8
@
policy = SCHED_FIFO;//Only put FIFO (more aggressive) for the RealTimePriorityClass
break;
}
- uint32 priorityLevelToAssign = 28u * priorityClassNumber;
- priorityLevelToAssign += (static_cast<uint32>(prioLevel));
uint32 priorityLevelToAssign = 25u * priorityClassNumber;
+ priorityLevelToAssign += ((static_cast<uint32>(prioLevel)*24u)/15u);sched_param param;
int32 ignore = 0;- Better mapping between (PriorityClass, PriorityLevel)-->[0, 99]
- Replace polling+sleeptime with event semafore in the CircularBufferThreadInputDataSource::Synchronise method
#3 Updated by Giuseppe Ferro almost 3 years ago
branch '#1177_thread_priority'
added few CircularBufferThreadInputDataSource tests for coverage
#4 Updated by Giuseppe Ferro almost 3 years ago
- Status changed from Code: Impl to Unit: Rev
#5 Updated by Giuseppe Ferro almost 3 years ago
- Assignee changed from Giuseppe Ferro to André Neto
#6 Updated by André Neto almost 3 years ago
- Assignee deleted (
André Neto) - Status changed from Unit: Rev to Closed
Merged at b191ac7f8a1840d15ff91c8b65d0049219040748