History

sched: Remove MAX_USER_RT_PRIO

Commit d46523ea32a7 ("[PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIO") was introduced due to a a small time period in which the realtime patch set was using different values for MAX_USER_RT_PRIO and MAX_RT_PRIO. This is no longer true, i.e. now MAX_RT_PRIO == MAX_USER_RT_PRIO. Get rid of MAX_USER_RT_PRIO and make everything use MAX_RT_PRIO instead.

Dietmar Eggemann committed 5 years ago

Commit ae18ad21 parent 71e5f662 files · +4 −12Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/sched/core.c+3−4
@@ -5911,11 +5911,10 @@ recheck: · 5910 unmodified lines
59115911
59125912 /*
59135913 * Valid priorities for SCHED_FIFO and SCHED_RR are
5914− * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL,
5914+ * 1..MAX_RT_PRIO-1, valid priority for SCHED_NORMAL,
59155915 * SCHED_BATCH and SCHED_IDLE is 0.
59165916 */
5917− if ((p->mm && attr->sched_priority > MAX_USER_RT_PRIO-1) ||
5918− (!p->mm && attr->sched_priority > MAX_RT_PRIO-1))
5917+ if (attr->sched_priority > MAX_RT_PRIO-1)
59195918 return -EINVAL;
59205919 if ((dl_policy(policy) && !__checkparam_dl(attr)) ||
59215920 (rt_policy(policy) != (attr->sched_priority != 0)))
@@ -6983,7 +6982,7 @@ SYSCALL_DEFINE1(sched_get_priority_max, int, policy) · 1061 unmodified lines
69836982 switch (policy) {
69846983 case SCHED_FIFO:
69856984 case SCHED_RR:
6986− ret = MAX_USER_RT_PRIO-1;
6985+ ret = MAX_RT_PRIO-1;
69876986 break;
69886987 case SCHED_DEADLINE:
69896988 case SCHED_NORMAL:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t