X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=block%2Fcfq-iosched.c;h=74fae2daf87e177679a64bd9810965c57ea89514;hb=752a3b79630a290cbbe4731e7c61b75d4fbebc5c;hp=452538644bceaee55def80c3ae3f856a6c65da16;hpb=1b5ed5e1f1315e37380e55102f58bcae3344d2a7;p=pandora-kernel.git diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 452538644bce..74fae2daf87e 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1,6 +1,4 @@ /* - * linux/drivers/block/cfq-iosched.c - * * CFQ, or complete fairness queueing, disk scheduler. * * Based on ideas from a previously unfinished io @@ -27,15 +25,15 @@ /* * tunables */ -static int cfq_quantum = 4; /* max queue in one round of service */ -static int cfq_queued = 8; /* minimum rq allocate limit per-queue*/ -static int cfq_fifo_expire[2] = { HZ / 4, HZ / 8 }; -static int cfq_back_max = 16 * 1024; /* maximum backwards seek, in KiB */ -static int cfq_back_penalty = 2; /* penalty of a backwards seek */ +static const int cfq_quantum = 4; /* max queue in one round of service */ +static const int cfq_queued = 8; /* minimum rq allocate limit per-queue*/ +static const int cfq_fifo_expire[2] = { HZ / 4, HZ / 8 }; +static const int cfq_back_max = 16 * 1024; /* maximum backwards seek, in KiB */ +static const int cfq_back_penalty = 2; /* penalty of a backwards seek */ -static int cfq_slice_sync = HZ / 10; +static const int cfq_slice_sync = HZ / 10; static int cfq_slice_async = HZ / 25; -static int cfq_slice_async_rq = 2; +static const int cfq_slice_async_rq = 2; static int cfq_slice_idle = HZ / 100; #define CFQ_IDLE_GRACE (HZ / 10) @@ -47,7 +45,7 @@ static int cfq_slice_idle = HZ / 100; /* * disable queueing at the driver/hardware level */ -static int cfq_max_depth = 2; +static const int cfq_max_depth = 2; /* * for the hash of cfqq inside the cfqd @@ -861,8 +859,8 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq, * store what was left of this slice, if the queue idled out * or was preempted */ - if (time_after(now, cfqq->slice_end)) - cfqq->slice_left = now - cfqq->slice_end; + if (time_after(cfqq->slice_end, now)) + cfqq->slice_left = cfqq->slice_end - now; else cfqq->slice_left = 0;