Re: [PATCH v2] loop: Limit the number of requests in the bio list

From: Jeff Moyer
Date: Thu Nov 08 2012 - 17:27:19 EST


Lukas Czerner <lczerner@xxxxxxxxxx> writes:

> + if (lo->lo_bio_count >= lo->lo_queue->nr_requests) {
> + unsigned int nr;
> + spin_unlock_irq(&lo->lo_lock);
> + nr = lo->lo_queue->nr_requests - (lo->lo_queue->nr_requests/8);
> + wait_event_interruptible(lo->lo_req_wait,
> + lo->lo_bio_count < nr);
> + spin_lock_irq(&lo->lo_lock);
> + }

So, blk_queue_make_request already initialized q->nr_congestion_on and
q->nr_congestion_off. Is there a reason you didn't simply use
queue_congestion_on_threshold and queue_congestion_off_threshold?

Cheers,
Jeff
--
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/