summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-21 21:06:43 +0200
committerClark Williams <williams@redhat.com>2012-02-15 10:32:52 -0600
commitd41652e4fd7841d216e4e799866640b4489fca9a (patch)
tree8c4156c6afc77502c68cbab50c002b1ec2cefa5d /kernel
parent865af72b986446bf33e06f40046ab2d7654e7bd5 (diff)
softirq-make-fifo.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/softirq.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 56de566b06f6..dd80cb45e058 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -372,6 +372,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 inline void ksoftirqd_set_sched_params(void) { }
+static inline void ksoftirqd_clr_sched_params(void) { }
#else /* !PREEMPT_RT_FULL */
@@ -526,6 +528,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(void)
+{
+ struct sched_param param = { .sched_priority = 1 };
+
+ sched_setscheduler(current, SCHED_FIFO, &param);
+}
+
+static inline void ksoftirqd_clr_sched_params(void)
+{
+ struct sched_param param = { .sched_priority = 0 };
+
+ sched_setscheduler(current, SCHED_NORMAL, &param);
+}
+
#endif /* PREEMPT_RT_FULL */
/*
* Enter an interrupt context.
@@ -985,6 +1001,8 @@ void __init softirq_init(void)
static int run_ksoftirqd(void * __bind_cpu)
{
+ ksoftirqd_set_sched_params();
+
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
@@ -1010,6 +1028,7 @@ static int run_ksoftirqd(void * __bind_cpu)
wait_to_die:
preempt_enable();
+ ksoftirqd_clr_sched_params();
/* Wait for kthread_stop */
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {