[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D75F9B5.1050704@fusionio.com>
Date: Tue, 8 Mar 2011 10:41:09 +0100
From: Jens Axboe <jaxboe@...ionio.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Mike Snitzer <snitzer@...hat.com>, Shaohua Li <shli@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"hch@...radead.org" <hch@...radead.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 05/10] block: remove per-queue plugging
On 2011-03-08 10:38, Peter Zijlstra wrote:
> 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.
Yes good point, in any case the need to flush will be an unlikely event.
So saving the lock/unlock dance for when we really need it is a good
optimization.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists