2011-06-21 23:46:44

by Peter Zijlstra

[permalink] [raw]
Subject: [RFC][PATCH 3/3] block: Break long IRQ disabled region

Keeping IRQs disabled for long is not a feature.

Cc: Jens Axboe <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
---
block/blk-core.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)

Index: linux-2.6/block/blk-core.c
===================================================================
--- linux-2.6.orig/block/blk-core.c
+++ linux-2.6/block/blk-core.c
@@ -2661,7 +2661,7 @@ static void queue_unplugged(struct reque
trace_block_unplug(q, depth, true);

__blk_run_queue(q);
- spin_unlock(q->queue_lock);
+ spin_unlock_irq(q->queue_lock);
}

static void flush_plug_callbacks(struct blk_plug *plug)
@@ -2706,11 +2706,6 @@ void blk_flush_plug_list(struct blk_plug
q = NULL;
depth = 0;

- /*
- * Save and disable interrupts here, to avoid doing it for every
- * queue lock we have to take.
- */
- local_irq_save(flags);
while (!list_empty(&list)) {
rq = list_entry_rq(list.next);
list_del_init(&rq->queuelist);
@@ -2723,7 +2718,7 @@ void blk_flush_plug_list(struct blk_plug
queue_unplugged(q, depth);
q = rq->q;
depth = 0;
- spin_lock(q->queue_lock);
+ spin_lock_irq(q->queue_lock);
}
/*
* rq is already accounted, so use raw insert
@@ -2741,8 +2736,6 @@ void blk_flush_plug_list(struct blk_plug
*/
if (q)
queue_unplugged(q, depth);
-
- local_irq_restore(flags);
}

void blk_finish_plug(struct blk_plug *plug)


2011-06-22 07:03:24

by Jens Axboe

[permalink] [raw]
Subject: Re: [RFC][PATCH 3/3] block: Break long IRQ disabled region

On 2011-06-22 01:34, Peter Zijlstra wrote:
> Keeping IRQs disabled for long is not a feature.

This change looks fine to me. What kind of irq-off times did you see?

--
Jens Axboe