diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-25 13:33:16 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-25 13:33:16 -0500 |
commit | cb9291bbd7bf8b1a3b3b2168928a0eff9f7bd1aa (patch) | |
tree | e7a3b355f51b04ff798b4c1acedab2bc97787220 | |
parent | 8056b1d7487237e575f4395d9878b17cbc30a537 (diff) | |
download | 4.9-rt-patches-cb9291bbd7bf8b1a3b3b2168928a0eff9f7bd1aa.tar.gz |
softirq-split: import updated patch w/ cpu_hp aware changes
-rw-r--r-- | patches/softirq-split-timer-softirqs-out-of-ksoftirqd.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/softirq-split-timer-softirqs-out-of-ksoftirqd.patch b/patches/softirq-split-timer-softirqs-out-of-ksoftirqd.patch index 449b78f2505d2..8428868af09ff 100644 --- a/patches/softirq-split-timer-softirqs-out-of-ksoftirqd.patch +++ b/patches/softirq-split-timer-softirqs-out-of-ksoftirqd.patch @@ -23,7 +23,7 @@ Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- kernel/softirq.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 74 insertions(+), 11 deletions(-) + 1 file changed, 73 insertions(+), 12 deletions(-) --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -32,12 +32,12 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> DEFINE_PER_CPU(struct task_struct *, ksoftirqd); +#ifdef CONFIG_PREEMPT_RT_FULL -+#define TIMER_SOFTIRQS ((1 << TIMER_SOFTIRQ) | (1 << HRTIMER_SOFTIRQ)) ++#define TIMER_SOFTIRQS ((1 << TIMER_SOFTIRQ) | (1 << HRTIMER_SOFTIRQ)) +DEFINE_PER_CPU(struct task_struct *, ktimer_softirqd); +#endif const char * const softirq_to_name[NR_SOFTIRQS] = { - "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", + "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "IRQ_POLL", @@ -171,6 +175,17 @@ static void wakeup_softirqd(void) wake_up_process(tsk); } @@ -56,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void handle_softirq(unsigned int vec_nr) { struct softirq_action *h = softirq_vec + vec_nr; -@@ -473,7 +488,6 @@ void __raise_softirq_irqoff(unsigned int +@@ -484,7 +499,6 @@ void __raise_softirq_irqoff(unsigned int static inline void local_bh_disable_nort(void) { local_bh_disable(); } static inline void _local_bh_enable_nort(void) { _local_bh_enable(); } static void ksoftirqd_set_sched_params(unsigned int cpu) { } @@ -64,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #else /* !PREEMPT_RT_FULL */ -@@ -620,8 +634,12 @@ void thread_do_softirq(void) +@@ -631,8 +645,12 @@ void thread_do_softirq(void) static void do_raise_softirq_irqoff(unsigned int nr) { @@ -78,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * If we are not in a hard interrupt and inside a bh disabled -@@ -630,16 +648,30 @@ static void do_raise_softirq_irqoff(unsi +@@ -641,16 +659,29 @@ static void do_raise_softirq_irqoff(unsi * delegate it to ksoftirqd. */ if (!in_irq() && current->softirq_nestcnt) @@ -103,7 +103,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + wakeup_softirqd(); } -+ void __raise_softirq_irqoff(unsigned int nr) { do_raise_softirq_irqoff(nr); @@ -113,7 +112,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* -@@ -665,7 +697,7 @@ void raise_softirq_irqoff(unsigned int n +@@ -676,7 +707,7 @@ void raise_softirq_irqoff(unsigned int n * raise a WARN() if the condition is met. */ if (!current->softirq_nestcnt) @@ -122,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static inline int ksoftirqd_softirq_pending(void) -@@ -678,22 +710,37 @@ static inline void _local_bh_enable_nort +@@ -689,22 +720,37 @@ static inline void _local_bh_enable_nort static inline void ksoftirqd_set_sched_params(unsigned int cpu) { @@ -163,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* PREEMPT_RT_FULL */ /* * Enter an interrupt context. -@@ -743,6 +790,9 @@ static inline void invoke_softirq(void) +@@ -759,6 +805,9 @@ static inline void invoke_softirq(void) if (__this_cpu_read(ksoftirqd) && __this_cpu_read(ksoftirqd)->softirqs_raised) wakeup_softirqd(); @@ -173,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> local_irq_restore(flags); #endif } -@@ -1175,17 +1225,30 @@ static struct notifier_block cpu_nfb = { +@@ -1176,18 +1225,30 @@ static int takeover_tasklets(unsigned in static struct smp_hotplug_thread softirq_threads = { .store = &ksoftirqd, .setup = ksoftirqd_set_sched_params, @@ -196,12 +195,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + static __init int spawn_ksoftirqd(void) { - register_cpu_notifier(&cpu_nfb); - + cpuhp_setup_state_nocalls(CPUHP_SOFTIRQ_DEAD, "softirq:dead", NULL, + takeover_tasklets); BUG_ON(smpboot_register_percpu_thread(&softirq_threads)); +- +#ifdef CONFIG_PREEMPT_RT_FULL + BUG_ON(smpboot_register_percpu_thread(&softirq_timer_threads)); +#endif - return 0; } + early_initcall(spawn_ksoftirqd); |