]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
softirq-make-fifo.patch
authorThomas Gleixner <tglx@linutronix.de>
Thu, 21 Jul 2011 19:06:43 +0000 (21:06 +0200)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:20 +0000 (09:47 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/softirq.c

index 63d427becc9e4befe47c708bc506123ac12ef2a8..b749e1f0943fc12aa600de1148a317e07546e6bd 100644 (file)
@@ -392,6 +392,8 @@ asmlinkage __visible void do_softirq(void)
 
 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) { }
+static void ksoftirqd_clr_sched_params(unsigned int cpu, bool online) { }
 
 #else /* !PREEMPT_RT_FULL */
 
@@ -565,6 +567,20 @@ void thread_do_softirq(void)
 static inline void local_bh_disable_nort(void) { }
 static inline void _local_bh_enable_nort(void) { }
 
+static inline void ksoftirqd_set_sched_params(unsigned int cpu)
+{
+       struct sched_param param = { .sched_priority = 1 };
+
+       sched_setscheduler(current, SCHED_FIFO, &param);
+}
+
+static inline void ksoftirqd_clr_sched_params(unsigned int cpu, bool online)
+{
+       struct sched_param param = { .sched_priority = 0 };
+
+       sched_setscheduler(current, SCHED_NORMAL, &param);
+}
+
 #endif /* PREEMPT_RT_FULL */
 /*
  * Enter an interrupt context.
@@ -997,6 +1013,8 @@ static struct notifier_block cpu_nfb = {
 
 static struct smp_hotplug_thread softirq_threads = {
        .store                  = &ksoftirqd,
+       .setup                  = ksoftirqd_set_sched_params,
+       .cleanup                = ksoftirqd_clr_sched_params,
        .thread_should_run      = ksoftirqd_should_run,
        .thread_fn              = run_ksoftirqd,
        .thread_comm            = "ksoftirqd/%u",