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 tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Thomas Gleixner:
"Two scheduler fixes:

- A trivial build fix for sched_feat() to compile correctly with
CONFIG_JUMP_LABEL=n

- Replace a zero lenght array with a flexible array"

* tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/features: Fix !CONFIG_JUMP_LABEL case
sched: Replace zero-length array with flexible-array

+12 -5
+1 -1
kernel/sched/core.c
··· 44 44 45 45 DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); 46 46 47 - #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL) 47 + #ifdef CONFIG_SCHED_DEBUG 48 48 /* 49 49 * Debugging: various feature bits 50 50 *
+11 -4
kernel/sched/sched.h
··· 1471 1471 int id; 1472 1472 #endif 1473 1473 1474 - unsigned long cpumask[0]; /* Balance mask */ 1474 + unsigned long cpumask[]; /* Balance mask */ 1475 1475 }; 1476 1476 1477 1477 struct sched_group { ··· 1629 1629 1630 1630 #undef SCHED_FEAT 1631 1631 1632 - #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL) 1632 + #ifdef CONFIG_SCHED_DEBUG 1633 1633 1634 1634 /* 1635 1635 * To support run-time toggling of sched features, all the translation units ··· 1637 1637 */ 1638 1638 extern const_debug unsigned int sysctl_sched_features; 1639 1639 1640 + #ifdef CONFIG_JUMP_LABEL 1640 1641 #define SCHED_FEAT(name, enabled) \ 1641 1642 static __always_inline bool static_branch_##name(struct static_key *key) \ 1642 1643 { \ ··· 1650 1649 extern struct static_key sched_feat_keys[__SCHED_FEAT_NR]; 1651 1650 #define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) 1652 1651 1653 - #else /* !(SCHED_DEBUG && CONFIG_JUMP_LABEL) */ 1652 + #else /* !CONFIG_JUMP_LABEL */ 1653 + 1654 + #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) 1655 + 1656 + #endif /* CONFIG_JUMP_LABEL */ 1657 + 1658 + #else /* !SCHED_DEBUG */ 1654 1659 1655 1660 /* 1656 1661 * Each translation unit has its own copy of sysctl_sched_features to allow ··· 1672 1665 1673 1666 #define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) 1674 1667 1675 - #endif /* SCHED_DEBUG && CONFIG_JUMP_LABEL */ 1668 + #endif /* SCHED_DEBUG */ 1676 1669 1677 1670 extern struct static_key_false sched_numa_balancing; 1678 1671 extern struct static_key_false sched_schedstats;