lkml.org 
[lkml]   [2005]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] use cheaper elv_queue_empty when unplug a device
Jens Axboe wrote:
> On Tue, Mar 29 2005, Nick Piggin wrote:
>
>>@@ -2577,19 +2577,18 @@ static int __make_request(request_queue_
>> spin_lock_prefetch(q->queue_lock);
>>
>> barrier = bio_barrier(bio);
>>- if (barrier && (q->ordered == QUEUE_ORDERED_NONE)) {
>>+ if (unlikely(barrier) && (q->ordered == QUEUE_ORDERED_NONE)) {
>> err = -EOPNOTSUPP;
>> goto end_io;
>> }
>>
>>-again:
>> spin_lock_irq(q->queue_lock);
>>
>> if (elv_queue_empty(q)) {
>> blk_plug_device(q);
>> goto get_rq;
>> }
>
>
> This should just goto get_rq, the plug should happen only at the end
> where you did add it:
>

Yes I see. I'll fix that up.

>
>>@@ -2693,10 +2675,11 @@ get_rq:
>> req->rq_disk = bio->bi_bdev->bd_disk;
>> req->start_time = jiffies;
>>
>>+ spin_lock_irq(q->queue_lock);
>>+ if (elv_queue_empty(q))
>>+ blk_plug_device(q);
>> add_request(q, req);
>> out:
>>- if (freereq)
>>- __blk_put_request(q, freereq);
>> if (bio_sync(bio))
>> __generic_unplug_device(q);
>>
>
>



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.092 / U:1.700 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site