diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-25 10:38:00 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-25 10:38:00 -0500 |
commit | 0f74d56e484d148288ce3b51456caafe9a890208 (patch) | |
tree | 1cd8a252e3ffaa991b85d51f5ebd471fb2fab3f9 | |
parent | c66d6d1bd028812df0110a38b98f0de9ba4bcb1d (diff) | |
download | 4.9-rt-patches-0f74d56e484d148288ce3b51456caafe9a890208.tar.gz |
migrate_disable: interim refresh for PN_SCHEDSTAT
-rw-r--r-- | patches/introduce_migrate_disable_cpu_light.patch | 58 |
1 files changed, 38 insertions, 20 deletions
diff --git a/patches/introduce_migrate_disable_cpu_light.patch b/patches/introduce_migrate_disable_cpu_light.patch index 6a913cd8719ec6..1a1d6e5fe87710 100644 --- a/patches/introduce_migrate_disable_cpu_light.patch +++ b/patches/introduce_migrate_disable_cpu_light.patch @@ -1,6 +1,7 @@ -Subject: Intrduce migrate_disable() + cpu_light() +From 45574488f517e6d2e54cf7c4da3c3cbaf59461b9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 17 Jun 2011 15:42:38 +0200 +Subject: [PATCH] Intrduce migrate_disable() + cpu_light() Introduce migrate_disable(). The task can't be pushed to another CPU but can be preempted. @@ -30,18 +31,20 @@ invoked again from another caller on the same CPU. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- - include/linux/cpu.h | 3 ++ - include/linux/preempt.h | 9 ++++++ - include/linux/sched.h | 39 +++++++++++++++++++++----- - include/linux/smp.h | 3 ++ - kernel/sched/core.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++- - kernel/sched/debug.c | 7 ++++ - lib/smp_processor_id.c | 5 ++- + include/linux/cpu.h | 3 +++ + include/linux/preempt.h | 9 +++++++ + include/linux/sched.h | 39 +++++++++++++++++++++------ + include/linux/smp.h | 3 +++ + kernel/sched/core.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++- + kernel/sched/debug.c | 7 +++++ + lib/smp_processor_id.c | 5 ++-- 7 files changed, 125 insertions(+), 11 deletions(-) +diff --git a/include/linux/cpu.h b/include/linux/cpu.h +index ad4f1f33a74e..b75fedb93045 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h -@@ -185,6 +185,9 @@ static inline void cpu_notifier_register +@@ -192,6 +192,9 @@ static inline void cpu_notifier_register_done(void) #endif /* CONFIG_SMP */ extern struct bus_type cpu_subsys; @@ -51,6 +54,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_HOTPLUG_CPU /* Stop CPUs going up and down. */ +diff --git a/include/linux/preempt.h b/include/linux/preempt.h +index a15f948667e9..57c7731bfe04 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -257,11 +257,20 @@ do { \ @@ -74,9 +79,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif #ifdef CONFIG_PREEMPT_NOTIFIERS +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 2e438b5987fa..e221e9aa05da 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1495,6 +1495,12 @@ struct task_struct { +@@ -1508,6 +1508,12 @@ struct task_struct { #endif unsigned int policy; @@ -89,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> int nr_cpus_allowed; cpumask_t cpus_allowed; -@@ -1946,14 +1952,6 @@ extern int arch_task_struct_size __read_ +@@ -1959,14 +1965,6 @@ extern int arch_task_struct_size __read_mostly; # define arch_task_struct_size (sizeof(struct task_struct)) #endif @@ -104,7 +111,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #define TNF_MIGRATED 0x01 #define TNF_NO_GROUP 0x02 #define TNF_SHARED 0x04 -@@ -3394,6 +3392,31 @@ static inline void set_task_cpu(struct t +@@ -3420,6 +3418,31 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) #endif /* CONFIG_SMP */ @@ -136,6 +143,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); extern long sched_getaffinity(pid_t pid, struct cpumask *mask); +diff --git a/include/linux/smp.h b/include/linux/smp.h +index 8e0cb7a0f836..b16ca967ad80 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -185,6 +185,9 @@ static inline void smp_init(void) { } @@ -148,9 +157,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 323488489f64..f82750386fc8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1089,6 +1089,11 @@ void do_set_cpus_allowed(struct task_str +@@ -1100,6 +1100,11 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) lockdep_assert_held(&p->pi_lock); @@ -162,7 +173,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> queued = task_on_rq_queued(p); running = task_current(rq, p); -@@ -1168,7 +1173,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1179,7 +1184,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, } /* Can the task run on the task's current CPU? If so, we're done */ @@ -171,8 +182,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> goto out; dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask); -@@ -3237,6 +3242,69 @@ static inline void schedule_debug(struct - schedstat_inc(this_rq(), sched_count); +@@ -3248,6 +3253,69 @@ static inline void schedule_debug(struct task_struct *prev) + schedstat_inc(this_rq()->sched_count); } +#if defined(CONFIG_PREEMPT_RT_FULL) && defined(CONFIG_SMP) @@ -241,9 +252,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Pick up the highest-prio task: */ +diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c +index 13935886a471..10a34dfb5ccc 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c -@@ -552,6 +552,9 @@ void print_rt_rq(struct seq_file *m, int +@@ -557,6 +557,9 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq) P(rt_throttled); PN(rt_time); PN(rt_runtime); @@ -253,7 +266,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #undef PN #undef P -@@ -947,6 +950,10 @@ void proc_sched_show_task(struct task_st +@@ -952,6 +955,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) #endif P(policy); P(prio); @@ -261,12 +274,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + P(migrate_disable); +#endif + P(nr_cpus_allowed); + #undef PN_SCHEDSTAT #undef PN #undef __PN - #undef P +diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c +index 1afec32de6f2..11fa431046a8 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c -@@ -39,8 +39,9 @@ notrace static unsigned int check_preemp +@@ -39,8 +39,9 @@ notrace static unsigned int check_preemption_disabled(const char *what1, if (!printk_ratelimit()) goto out_enable; @@ -278,3 +293,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> print_symbol("caller is %s\n", (long)__builtin_return_address(0)); dump_stack(); +-- +2.10.1 + |