Commit 7af03ca1 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] better sizing of queue_nr_requests

Patch from 2.4 sets the maximum size of the queue in a more sensible manner
parent 5b24cada
......@@ -1924,9 +1924,11 @@ int __init blk_dev_init(void)
* Free request slots per queue.
* (Half for reads, half for writes)
*/
queue_nr_requests = 64;
if (total_ram > MB(32))
queue_nr_requests = 256;
queue_nr_requests = (total_ram >> 8) & ~15; /* One per quarter-megabyte */
if (queue_nr_requests < 32)
queue_nr_requests = 32;
if (queue_nr_requests > 512)
queue_nr_requests = 512;
/*
* Batch frees according to queue length
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment