summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-21 19:06:43 (GMT)
committerScott Wood <scottwood@freescale.com>2013-04-04 22:09:25 (GMT)
commit01b8de7ad30dd000532acebf4b4684fa6e620270 (patch)
treebb341afaf97f3a13ea8e6d19430b675e63fc04b3 /kernel
parentb6d336ed51b97bc5ee0e2c900ecfef371e19c125 (diff)
downloadlinux-fsl-qoriq-01b8de7ad30dd000532acebf4b4684fa6e620270.tar.xz
softirq-make-fifo.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/softirq.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index bca3e64..7a19af0 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -364,6 +364,8 @@ asmlinkage 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 */
@@ -518,6 +520,20 @@ static int ksoftirqd_do_softirq(int cpu)
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.
@@ -1065,6 +1081,8 @@ static struct notifier_block __cpuinitdata 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",