.. | .. |
---|
996 | 996 | unsigned long cpu_capacity_orig; |
---|
997 | 997 | |
---|
998 | 998 | struct callback_head *balance_callback; |
---|
999 | | - unsigned char balance_flags; |
---|
1000 | 999 | |
---|
1001 | 1000 | unsigned char nohz_idle_balance; |
---|
1002 | 1001 | unsigned char idle_balance; |
---|
.. | .. |
---|
1027 | 1026 | |
---|
1028 | 1027 | /* This is used to determine avg_idle's max value */ |
---|
1029 | 1028 | u64 max_idle_balance_cost; |
---|
1030 | | - |
---|
1031 | | -#ifdef CONFIG_HOTPLUG_CPU |
---|
1032 | | - struct rcuwait hotplug_wait; |
---|
1033 | | -#endif |
---|
1034 | 1029 | #endif /* CONFIG_SMP */ |
---|
1035 | 1030 | |
---|
1036 | 1031 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING |
---|
.. | .. |
---|
1082 | 1077 | /* Must be inspected within a rcu lock section */ |
---|
1083 | 1078 | struct cpuidle_state *idle_state; |
---|
1084 | 1079 | #endif |
---|
1085 | | - |
---|
1086 | | -#ifdef CONFIG_SMP |
---|
1087 | | - unsigned int nr_pinned; |
---|
1088 | | -#endif |
---|
1089 | | - unsigned int push_busy; |
---|
1090 | | - struct cpu_stop_work push_work; |
---|
1091 | 1080 | |
---|
1092 | 1081 | ANDROID_VENDOR_DATA_ARRAY(1, 96); |
---|
1093 | 1082 | ANDROID_OEM_DATA_ARRAY(1, 16); |
---|
.. | .. |
---|
1286 | 1275 | rq->clock_update_flags &= (RQCF_REQ_SKIP|RQCF_ACT_SKIP); |
---|
1287 | 1276 | rf->clock_update_flags = 0; |
---|
1288 | 1277 | #endif |
---|
1289 | | -#ifdef CONFIG_SMP |
---|
1290 | | - SCHED_WARN_ON(rq->balance_callback); |
---|
1291 | | -#endif |
---|
1292 | 1278 | } |
---|
1293 | 1279 | |
---|
1294 | 1280 | static inline void rq_unpin_lock(struct rq *rq, struct rq_flags *rf) |
---|
.. | .. |
---|
1448 | 1434 | |
---|
1449 | 1435 | #ifdef CONFIG_SMP |
---|
1450 | 1436 | |
---|
1451 | | -#define BALANCE_WORK 0x01 |
---|
1452 | | -#define BALANCE_PUSH 0x02 |
---|
1453 | | - |
---|
1454 | 1437 | extern int migrate_swap(struct task_struct *p, struct task_struct *t, |
---|
1455 | 1438 | int cpu, int scpu); |
---|
1456 | 1439 | static inline void |
---|
.. | .. |
---|
1460 | 1443 | { |
---|
1461 | 1444 | lockdep_assert_held(&rq->lock); |
---|
1462 | 1445 | |
---|
1463 | | - if (unlikely(head->next || (rq->balance_flags & BALANCE_PUSH))) |
---|
| 1446 | + if (unlikely(head->next)) |
---|
1464 | 1447 | return; |
---|
1465 | 1448 | |
---|
1466 | 1449 | head->func = (void (*)(struct callback_head *))func; |
---|
1467 | 1450 | head->next = rq->balance_callback; |
---|
1468 | 1451 | rq->balance_callback = head; |
---|
1469 | | - rq->balance_flags |= BALANCE_WORK; |
---|
1470 | 1452 | } |
---|
1471 | 1453 | |
---|
1472 | 1454 | #define rcu_dereference_check_sched_domain(p) \ |
---|
.. | .. |
---|
1795 | 1777 | #define WF_FORK 0x02 /* Child wakeup after fork */ |
---|
1796 | 1778 | #define WF_MIGRATED 0x04 /* Internal use, task got migrated */ |
---|
1797 | 1779 | #define WF_ON_CPU 0x08 /* Wakee is on_cpu */ |
---|
1798 | | -#define WF_LOCK_SLEEPER 0x10 /* Wakeup spinlock "sleeper" */ |
---|
1799 | 1780 | #define WF_ANDROID_VENDOR 0x1000 /* Vendor specific for Android */ |
---|
1800 | 1781 | |
---|
1801 | 1782 | /* |
---|
.. | .. |
---|
1880 | 1861 | void (*task_woken)(struct rq *this_rq, struct task_struct *task); |
---|
1881 | 1862 | |
---|
1882 | 1863 | void (*set_cpus_allowed)(struct task_struct *p, |
---|
1883 | | - const struct cpumask *newmask, |
---|
1884 | | - u32 flags); |
---|
| 1864 | + const struct cpumask *newmask); |
---|
1885 | 1865 | |
---|
1886 | 1866 | void (*rq_online)(struct rq *rq); |
---|
1887 | 1867 | void (*rq_offline)(struct rq *rq); |
---|
1888 | | - |
---|
1889 | | - struct rq *(*find_lock_rq)(struct task_struct *p, struct rq *rq); |
---|
1890 | 1868 | #endif |
---|
1891 | 1869 | |
---|
1892 | 1870 | void (*task_tick)(struct rq *rq, struct task_struct *p, int queued); |
---|
.. | .. |
---|
1970 | 1948 | extern struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf); |
---|
1971 | 1949 | extern struct task_struct *pick_next_task_idle(struct rq *rq); |
---|
1972 | 1950 | |
---|
1973 | | -#define SCA_CHECK 0x01 |
---|
1974 | | -#define SCA_MIGRATE_DISABLE 0x02 |
---|
1975 | | -#define SCA_MIGRATE_ENABLE 0x04 |
---|
1976 | | - |
---|
1977 | 1951 | #ifdef CONFIG_SMP |
---|
1978 | 1952 | |
---|
1979 | 1953 | extern void update_group_capacity(struct sched_domain *sd, int cpu); |
---|
1980 | 1954 | |
---|
1981 | 1955 | extern void trigger_load_balance(struct rq *rq); |
---|
1982 | 1956 | |
---|
1983 | | -extern void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask, u32 flags); |
---|
1984 | | - |
---|
1985 | | -static inline struct task_struct *get_push_task(struct rq *rq) |
---|
1986 | | -{ |
---|
1987 | | - struct task_struct *p = rq->curr; |
---|
1988 | | - |
---|
1989 | | - lockdep_assert_held(&rq->lock); |
---|
1990 | | - |
---|
1991 | | - if (rq->push_busy) |
---|
1992 | | - return NULL; |
---|
1993 | | - |
---|
1994 | | - if (p->nr_cpus_allowed == 1) |
---|
1995 | | - return NULL; |
---|
1996 | | - |
---|
1997 | | - if (p->migration_disabled) |
---|
1998 | | - return NULL; |
---|
1999 | | - |
---|
2000 | | - rq->push_busy = true; |
---|
2001 | | - return get_task_struct(p); |
---|
2002 | | -} |
---|
2003 | | - |
---|
2004 | | -extern int push_cpu_stop(void *arg); |
---|
| 1957 | +extern void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask); |
---|
2005 | 1958 | |
---|
2006 | 1959 | extern unsigned long __read_mostly max_load_balance_interval; |
---|
2007 | 1960 | #endif |
---|
.. | .. |
---|
2045 | 1998 | |
---|
2046 | 1999 | extern void resched_curr(struct rq *rq); |
---|
2047 | 2000 | extern void resched_cpu(int cpu); |
---|
2048 | | - |
---|
2049 | | -#ifdef CONFIG_PREEMPT_LAZY |
---|
2050 | | -extern void resched_curr_lazy(struct rq *rq); |
---|
2051 | | -#else |
---|
2052 | | -static inline void resched_curr_lazy(struct rq *rq) |
---|
2053 | | -{ |
---|
2054 | | - resched_curr(rq); |
---|
2055 | | -} |
---|
2056 | | -#endif |
---|
2057 | 2001 | |
---|
2058 | 2002 | extern struct rt_bandwidth def_rt_bandwidth; |
---|
2059 | 2003 | extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime); |
---|
.. | .. |
---|
2417 | 2361 | static inline void nohz_balance_exit_idle(struct rq *rq) { } |
---|
2418 | 2362 | #endif |
---|
2419 | 2363 | |
---|
2420 | | -#define MDF_PUSH 0x01 |
---|
2421 | | - |
---|
2422 | | -static inline bool is_migration_disabled(struct task_struct *p) |
---|
2423 | | -{ |
---|
2424 | | -#ifdef CONFIG_SMP |
---|
2425 | | - return p->migration_disabled; |
---|
2426 | | -#else |
---|
2427 | | - return false; |
---|
2428 | | -#endif |
---|
2429 | | -} |
---|
2430 | 2364 | |
---|
2431 | 2365 | #ifdef CONFIG_SMP |
---|
2432 | 2366 | static inline |
---|