Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
"Two fixes:

- a SCHED_DEADLINE task selection fix
- a sched/numa related lockdep splat fix"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Check for stop task appearance when balancing happens
sched/numa: Fix task_numa_free() lockdep splat

+32 -11
+10 -1
kernel/sched/deadline.c
··· 1021 1021 1022 1022 dl_rq = &rq->dl; 1023 1023 1024 - if (need_pull_dl_task(rq, prev)) 1024 + if (need_pull_dl_task(rq, prev)) { 1025 1025 pull_dl_task(rq); 1026 + /* 1027 + * pull_rt_task() can drop (and re-acquire) rq->lock; this 1028 + * means a stop task can slip in, in which case we need to 1029 + * re-start task selection. 1030 + */ 1031 + if (rq->stop && rq->stop->on_rq) 1032 + return RETRY_TASK; 1033 + } 1034 + 1026 1035 /* 1027 1036 * When prev is DL, we may throttle it in put_prev_task(). 1028 1037 * So, we update time before we check for dl_nr_running.
+9 -7
kernel/sched/fair.c
··· 1497 1497 /* If the task is part of a group prevent parallel updates to group stats */ 1498 1498 if (p->numa_group) { 1499 1499 group_lock = &p->numa_group->lock; 1500 - spin_lock(group_lock); 1500 + spin_lock_irq(group_lock); 1501 1501 } 1502 1502 1503 1503 /* Find the node with the highest number of faults */ ··· 1572 1572 } 1573 1573 } 1574 1574 1575 - spin_unlock(group_lock); 1575 + spin_unlock_irq(group_lock); 1576 1576 } 1577 1577 1578 1578 /* Preferred node as the node with the most faults */ ··· 1677 1677 if (!join) 1678 1678 return; 1679 1679 1680 - double_lock(&my_grp->lock, &grp->lock); 1680 + BUG_ON(irqs_disabled()); 1681 + double_lock_irq(&my_grp->lock, &grp->lock); 1681 1682 1682 1683 for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++) { 1683 1684 my_grp->faults[i] -= p->numa_faults_memory[i]; ··· 1692 1691 grp->nr_tasks++; 1693 1692 1694 1693 spin_unlock(&my_grp->lock); 1695 - spin_unlock(&grp->lock); 1694 + spin_unlock_irq(&grp->lock); 1696 1695 1697 1696 rcu_assign_pointer(p->numa_group, grp); 1698 1697 ··· 1711 1710 void *numa_faults = p->numa_faults_memory; 1712 1711 1713 1712 if (grp) { 1714 - spin_lock(&grp->lock); 1713 + spin_lock_irq(&grp->lock); 1715 1714 for (i = 0; i < NR_NUMA_HINT_FAULT_STATS * nr_node_ids; i++) 1716 1715 grp->faults[i] -= p->numa_faults_memory[i]; 1717 1716 grp->total_faults -= p->total_numa_faults; 1718 1717 1719 1718 list_del(&p->numa_entry); 1720 1719 grp->nr_tasks--; 1721 - spin_unlock(&grp->lock); 1720 + spin_unlock_irq(&grp->lock); 1722 1721 rcu_assign_pointer(p->numa_group, NULL); 1723 1722 put_numa_group(grp); 1724 1723 } ··· 6728 6727 out: 6729 6728 /* Is there a task of a high priority class? */ 6730 6729 if (this_rq->nr_running != this_rq->cfs.h_nr_running && 6731 - (this_rq->dl.dl_nr_running || 6730 + ((this_rq->stop && this_rq->stop->on_rq) || 6731 + this_rq->dl.dl_nr_running || 6732 6732 (this_rq->rt.rt_nr_running && !rt_rq_throttled(&this_rq->rt)))) 6733 6733 pulled_task = -1; 6734 6734
+4 -3
kernel/sched/rt.c
··· 1362 1362 pull_rt_task(rq); 1363 1363 /* 1364 1364 * pull_rt_task() can drop (and re-acquire) rq->lock; this 1365 - * means a dl task can slip in, in which case we need to 1366 - * re-start task selection. 1365 + * means a dl or stop task can slip in, in which case we need 1366 + * to re-start task selection. 1367 1367 */ 1368 - if (unlikely(rq->dl.dl_nr_running)) 1368 + if (unlikely((rq->stop && rq->stop->on_rq) || 1369 + rq->dl.dl_nr_running)) 1369 1370 return RETRY_TASK; 1370 1371 } 1371 1372
+9
kernel/sched/sched.h
··· 1385 1385 spin_lock_nested(l2, SINGLE_DEPTH_NESTING); 1386 1386 } 1387 1387 1388 + static inline void double_lock_irq(spinlock_t *l1, spinlock_t *l2) 1389 + { 1390 + if (l1 > l2) 1391 + swap(l1, l2); 1392 + 1393 + spin_lock_irq(l1); 1394 + spin_lock_nested(l2, SINGLE_DEPTH_NESTING); 1395 + } 1396 + 1388 1397 static inline void double_raw_lock(raw_spinlock_t *l1, raw_spinlock_t *l2) 1389 1398 { 1390 1399 if (l1 > l2)