Hi, Thanks for your replies. I made a mistake about the priority inside the kernel and sched_setscheduler system call. I thought both of them are the same: numerically lower priority value is higher schedule priority. But in fact, they are opposite: * Kernel: numerically lower value is high priority * sched_setscheduler() and related system calls: numerically lower value is lower priority It is said in "man sched_get_priority_max" output: Processes with numerically higher priority values are scheduled before processes with numerically lower priority values. Thus, the value returned by sched_get_prior- ity_max() will be greater than the value returned by sched_get_priority_min(). Thanks. On Thu, Mar 4, 2010 at 12:52 PM, Karthik Singaram Lakshmanan <karthiksingaram@xxxxxxxxx> wrote: > Hi, > If I am not mistaken, higher value of sched_priority denotes higher > priority. > Therefore, looking at > normal_prio = MAX_RT_PRIO - 1 - task->rt_priority; > you can see that a higher task->rt_priority will translate to a > lower value of normal_prio, thereby occupying an earlier bit. -- Best Regards, Zeng Xianwei -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html