summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-11-13 16:17:09 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:20:06 (GMT)
commit01fa1a3cc0c571fa1b2d31ac644841457361cf5f (patch)
treeb06707f31f9eca637ccec2f0e7639c3bd88b32b5 /block
parent5ecad1fddb27507bf1e3bf1935bb7e5b2c8d3c42 (diff)
downloadlinux-fsl-qoriq-01fa1a3cc0c571fa1b2d31ac644841457361cf5f.tar.xz
softirq: Check preemption after reenabling interrupts
raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, so the execution of the softirq thread might be delayed arbitrarily. In principle we could add that check to local_irq_enable/restore, but that's overkill as the rasie_softirq_irqoff() sections are the only ones which show this behaviour. Reported-by: Carsten Emde <cbe@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'block')
-rw-r--r--block/blk-iopoll.c3
-rw-r--r--block/blk-softirq.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
index 4b8d9b54..15b4f08 100644
--- a/block/blk-iopoll.c
+++ b/block/blk-iopoll.c
@@ -38,6 +38,7 @@ void blk_iopoll_sched(struct blk_iopoll *iop)
list_add_tail(&iop->list, &__get_cpu_var(blk_cpu_iopoll));
__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
EXPORT_SYMBOL(blk_iopoll_sched);
@@ -135,6 +136,7 @@ static void blk_iopoll_softirq(struct softirq_action *h)
__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
local_irq_enable();
+ preempt_check_resched_rt();
}
/**
@@ -204,6 +206,7 @@ static int blk_iopoll_cpu_notify(struct notifier_block *self,
&__get_cpu_var(blk_cpu_iopoll));
__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
local_irq_enable();
+ preempt_check_resched_rt();
}
return NOTIFY_OK;
diff --git a/block/blk-softirq.c b/block/blk-softirq.c
index ec9e606..814b3db 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -51,6 +51,7 @@ static void trigger_softirq(void *data)
raise_softirq_irqoff(BLOCK_SOFTIRQ);
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
/*
@@ -93,6 +94,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action,
&__get_cpu_var(blk_cpu_done));
raise_softirq_irqoff(BLOCK_SOFTIRQ);
local_irq_enable();
+ preempt_check_resched_rt();
}
return NOTIFY_OK;
@@ -150,6 +152,7 @@ do_local:
goto do_local;
local_irq_restore(flags);
+ preempt_check_resched_rt();
}
/**