diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2010-05-17 10:00:15 +0200 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-17 10:00:17 +0200 |
commit | f3eb20fafdc10aea0fb13b113ac3b9a3dc9a5dc6 (patch) | |
tree | 1025617dba903e0276efbfcd8e439ed0d475580c /drivers/s390 | |
parent | 09a308f384c4ad2fb45959f5da9918e812207c50 (diff) |
[S390] qdio: prevent starvation on PCI devices
If adapter interrupts are not available and traditional IO interrupts
are used for qdio the inbound tasklet continued to run if new data
arrived. That could possibly block other tasklets scheduled on the
same CPU. If new data arrives schedule the tasklet again instead of
directly processing the new data.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 1fc81268330..f4fd6cd4dc0 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -606,7 +606,7 @@ static void qdio_kick_handler(struct qdio_q *q) static void __qdio_inbound_processing(struct qdio_q *q) { qperf_inc(q, tasklet_inbound); -again: + if (!qdio_inbound_q_moved(q)) return; @@ -615,7 +615,10 @@ again: if (!qdio_inbound_q_done(q)) { /* means poll time is not yet over */ qperf_inc(q, tasklet_inbound_resched); - goto again; + if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED)) { + tasklet_schedule(&q->tasklet); + return; + } } qdio_stop_polling(q); @@ -625,7 +628,8 @@ again: */ if (!qdio_inbound_q_done(q)) { qperf_inc(q, tasklet_inbound_resched2); - goto again; + if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED)) + tasklet_schedule(&q->tasklet); } } |