diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-06 09:46:02 +0100 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-01-06 09:46:02 +0100 |
commit | 64100099ed22f71cce656c5c2caecf5c9cf255dc (patch) | |
tree | f6ebf7c94ee2eeb080d25880ffca839ec39ec47e /block/cfq-iosched.c | |
parent | 80cfd548eed68cf90c5ae9cfcd6b02230cece756 (diff) | |
download | linux-3.10-64100099ed22f71cce656c5c2caecf5c9cf255dc.tar.gz linux-3.10-64100099ed22f71cce656c5c2caecf5c9cf255dc.tar.bz2 linux-3.10-64100099ed22f71cce656c5c2caecf5c9cf255dc.zip |
[BLOCK] mark some block/ variables cons
the patch below marks various read-only variables in block/* as const,
so that gcc can optimize the use of them; eg gcc will replace the use by
the value directly now and will even remove the memory usage of these.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ee0bb41694b..74fae2daf87 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -25,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) @@ -45,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 |