Conversation
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
|
comment 1: Unless you have a specific reason, I think the comparison based on the comment 2: I recommend not triggering preemption if the |
|
@atsushi421 answer 2: Certainly performance would be better without preemption at the same |
|
Simulate for answer1. Assume that there are tasks as follows. Tasks: The following steps. Step1 Step2 Wake up Task4(1, 20) Step3 sends an IPI to CPU1 Step4 Thus, when a high priority task wakes while other tasks of the same priority are running, the one with the earlier CPUID is always preempted. |
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Implementation of a function to obtain information on the lowest priority task in all searches.
Priorities are compared with the scheduler priority first, and if they are equal, the task priority is used for comparison.
The u64 priority value stores the scheduler priority in the upper 8 bits and the task priority in the lower 56 bits.
As a result, the aforementioned logic is naturally implemented by a simple u64 comparison.
Comparison of Scheduler Priority: 1, Task Priority: 1000 with Scheduler Priority: 2, Task Priority: 500
0x10000000003e8 < 0x20000000001f4Comparison of Scheduler Priority: 1, Task Priority: 1000 with Scheduler Priority: 1, Task Priority: 2000
0x10000000003e8 < 0x10000000007d0Test
Among the FIFO tasks with low scheduler priority, the task with ID 1 that is executed first is returned.