new task priority levels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The new priority structure for 2.5.x kernels is described as :

/*
 * Priority of a process goes from 0..MAX_PRIO-1, valid RT
 * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are
 * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values
 * are inverted: lower p->prio value means higher priority.
 *
 * The MAX_RT_USER_PRIO value allows the actual maximum
 * RT priority to be separate from the value exported to
 * user-space.  This allows kernel threads to set their
 * priority to a value higher than any user task. Note:
 * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO.
 */

#define MAX_USER_RT_PRIO        100
#define MAX_RT_PRIO             MAX_USER_RT_PRIO

#define MAX_PRIO                (MAX_RT_PRIO + 40)



Since a lower priority value means a higher priority, I don't see how the 
separation between MAX_RT_PRIO and MAX_USER_RT_PRIO can allow a kernel thread 
to have a higher value. It would seem that there needs to be a 
MIN_USER_RT_PRIO that has to be greater than or equal to 0. This would 
prevent user RT tasks from getting priority values that were less than a 
minimum, and kernel threads could get priorities from 0 to MIN_USER_RT_PRIO - 
1. Please help me out with my astray reasoning.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux