File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include <linux/sched/idle.h>
8
8
9
+ /*
10
+ * Increase resolution of cpu_capacity calculations
11
+ */
12
+ #define SCHED_CAPACITY_SHIFT SCHED_FIXEDPOINT_SHIFT
13
+ #define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT)
14
+
9
15
/*
10
16
* sched-domains (multiprocessor balancing) declarations:
11
17
*/
27
33
#define SD_OVERLAP 0x2000 /* sched_domains of this level overlap */
28
34
#define SD_NUMA 0x4000 /* cross-node balancing */
29
35
30
- /*
31
- * Increase resolution of cpu_capacity calculations
32
- */
33
- #define SCHED_CAPACITY_SHIFT SCHED_FIXEDPOINT_SHIFT
34
- #define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT)
35
-
36
36
#ifdef CONFIG_SCHED_SMT
37
37
static inline int cpu_smt_flags (void )
38
38
{
Original file line number Diff line number Diff line change @@ -1670,9 +1670,6 @@ static inline int hrtick_enabled(struct rq *rq)
1670
1670
1671
1671
#endif /* CONFIG_SCHED_HRTICK */
1672
1672
1673
- #ifdef CONFIG_SMP
1674
- extern void sched_avg_update (struct rq * rq );
1675
-
1676
1673
#ifndef arch_scale_freq_capacity
1677
1674
static __always_inline
1678
1675
unsigned long arch_scale_freq_capacity (int cpu )
@@ -1681,6 +1678,9 @@ unsigned long arch_scale_freq_capacity(int cpu)
1681
1678
}
1682
1679
#endif
1683
1680
1681
+ #ifdef CONFIG_SMP
1682
+ extern void sched_avg_update (struct rq * rq );
1683
+
1684
1684
#ifndef arch_scale_cpu_capacity
1685
1685
static __always_inline
1686
1686
unsigned long arch_scale_cpu_capacity (struct sched_domain * sd , int cpu )
@@ -1698,6 +1698,13 @@ static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta)
1698
1698
sched_avg_update (rq );
1699
1699
}
1700
1700
#else
1701
+ #ifndef arch_scale_cpu_capacity
1702
+ static __always_inline
1703
+ unsigned long arch_scale_cpu_capacity (void __always_unused * sd , int cpu )
1704
+ {
1705
+ return SCHED_CAPACITY_SCALE ;
1706
+ }
1707
+ #endif
1701
1708
static inline void sched_rt_avg_update (struct rq * rq , u64 rt_delta ) { }
1702
1709
static inline void sched_avg_update (struct rq * rq ) { }
1703
1710
#endif
You can’t perform that action at this time.
0 commit comments