projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
sched_rt.c
diff --git
a/kernel/sched_rt.c
b/kernel/sched_rt.c
index bf3e38fdbe6dc6ca0160d7f408881525928da21a..b5b920ae2ea7fe83ca17d2c94d0a7b638574144c 100644
(file)
--- a/
kernel/sched_rt.c
+++ b/
kernel/sched_rt.c
@@
-1146,7
+1146,12
@@
static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu)
if (next && next->prio < idx)
continue;
list_for_each_entry(rt_se, array->queue + idx, run_list) {
if (next && next->prio < idx)
continue;
list_for_each_entry(rt_se, array->queue + idx, run_list) {
- struct task_struct *p = rt_task_of(rt_se);
+ struct task_struct *p;
+
+ if (!rt_entity_is_task(rt_se))
+ continue;
+
+ p = rt_task_of(rt_se);
if (pick_rt_task(rq, p, cpu)) {
next = p;
break;
if (pick_rt_task(rq, p, cpu)) {
next = p;
break;
@@
-1662,8
+1667,9
@@
static void watchdog(struct rq *rq, struct task_struct *p)
if (!p->signal)
return;
if (!p->signal)
return;
- soft = p->signal->rlim[RLIMIT_RTTIME].rlim_cur;
- hard = p->signal->rlim[RLIMIT_RTTIME].rlim_max;
+ /* max may change after cur was read, this will be fixed next tick */
+ soft = task_rlimit(p, RLIMIT_RTTIME);
+ hard = task_rlimit_max(p, RLIMIT_RTTIME);
if (soft != RLIM_INFINITY) {
unsigned long next;
if (soft != RLIM_INFINITY) {
unsigned long next;