History

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

Pull scheduler fixes from Thomas Gleixner: "Two fixes for the fair scheduling class: - Prevent freeing memory which is accessible by concurrent readers - Make the RCU annotations for numa groups consistent" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Use RCU accessors consistently for ->numa_group sched/fair: Don't free p->numa_faults with concurrent readers

Linus Torvalds committed 7 years ago

Commit e24ce842 parents 750991f cb361d85 files · +114 −48Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/sched.h +9 −1
  2. include/linux/sched/numa_balancing.h +2 −2
include/linux/sched.h+9−1
@@ -1092,7 +1092,15 @@ struct task_struct { · 1091 unmodified lines
1092 u64 last_sum_exec_runtime;1092 u64 last_sum_exec_runtime;
1093 struct callback_head numa_work;1093 struct callback_head numa_work;
1094 1094
1095 struct numa_group *numa_group;1095 /*
1096 * This pointer is only modified for current in syscall and
1097 * pagefault context (and for tasks being destroyed), so it can be read
1098 * from any of the following contexts:
1099 * - RCU read-side critical section
1100 * - current->numa_group from everywhere
1101 * - task's runqueue locked, task not running
1102 */
1103 struct numa_group __rcu *numa_group;
1096 1104
1097 /*1105 /*
1098 * numa_faults is an array split into four regions:1106 * numa_faults is an array split into four regions:
include/linux/sched/numa_balancing.h+2−2
@@ -19,7 +19,7 @@ · 18 unmodified lines
19extern void task_numa_fault(int last_node, int node, int pages, int flags);19extern void task_numa_fault(int last_node, int node, int pages, int flags);
20extern pid_t task_numa_group_id(struct task_struct *p);20extern pid_t task_numa_group_id(struct task_struct *p);
21extern void set_numabalancing_state(bool enabled);21extern void set_numabalancing_state(bool enabled);
22extern void task_numa_free(struct task_struct *p);22extern void task_numa_free(struct task_struct *p, bool final);
23extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,23extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,
24 int src_nid, int dst_cpu);24 int src_nid, int dst_cpu);
25#else25#else
@@ -34,7 +34,7 @@ static inline pid_t task_numa_group_id(struct task_struct *p) · 8 unmodified lines
34static inline void set_numabalancing_state(bool enabled)34static inline void set_numabalancing_state(bool enabled)
35{35{
36}36}
37static inline void task_numa_free(struct task_struct *p)37static inline void task_numa_free(struct task_struct *p, bool final)
38{38{
39}39}
40static inline bool should_numa_migrate_memory(struct task_struct *p,40static inline bool should_numa_migrate_memory(struct task_struct *p,