Re: [PATCH 05/10] block: remove per-queue plugging

From: Peter Zijlstra
Date: Tue Mar 08 2011 - 04:39:01 EST


On Mon, 2011-03-07 at 21:46 +0100, Jens Axboe wrote:
>
> Great, that'll work for me! Your patch should work as-is, then. Thanks
> Peter.

Well I think it would be good to write it like:

if (prev->state != TASK_RUNNING && blkneeds_flush(prev)) {
raw_spin_unlock(&rq->lock);
blk_flush_plug(prev);
raw_spin_lock(&rq->lock);
}

To avoid flipping that lock when we don't have to.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/