aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c93
1 files changed, 20 insertions, 73 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 6dc156e1c29b..c4a0d5d8d7f0 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2304,8 +2304,8 @@ SHOW_FUNCTION(cfq_quantum_show, cfqd->cfq_quantum, 0);
2304SHOW_FUNCTION(cfq_queued_show, cfqd->cfq_queued, 0); 2304SHOW_FUNCTION(cfq_queued_show, cfqd->cfq_queued, 0);
2305SHOW_FUNCTION(cfq_fifo_expire_sync_show, cfqd->cfq_fifo_expire[1], 1); 2305SHOW_FUNCTION(cfq_fifo_expire_sync_show, cfqd->cfq_fifo_expire[1], 1);
2306SHOW_FUNCTION(cfq_fifo_expire_async_show, cfqd->cfq_fifo_expire[0], 1); 2306SHOW_FUNCTION(cfq_fifo_expire_async_show, cfqd->cfq_fifo_expire[0], 1);
2307SHOW_FUNCTION(cfq_back_max_show, cfqd->cfq_back_max, 0); 2307SHOW_FUNCTION(cfq_back_seek_max_show, cfqd->cfq_back_max, 0);
2308SHOW_FUNCTION(cfq_back_penalty_show, cfqd->cfq_back_penalty, 0); 2308SHOW_FUNCTION(cfq_back_seek_penalty_show, cfqd->cfq_back_penalty, 0);
2309SHOW_FUNCTION(cfq_slice_idle_show, cfqd->cfq_slice_idle, 1); 2309SHOW_FUNCTION(cfq_slice_idle_show, cfqd->cfq_slice_idle, 1);
2310SHOW_FUNCTION(cfq_slice_sync_show, cfqd->cfq_slice[1], 1); 2310SHOW_FUNCTION(cfq_slice_sync_show, cfqd->cfq_slice[1], 1);
2311SHOW_FUNCTION(cfq_slice_async_show, cfqd->cfq_slice[0], 1); 2311SHOW_FUNCTION(cfq_slice_async_show, cfqd->cfq_slice[0], 1);
@@ -2333,8 +2333,8 @@ STORE_FUNCTION(cfq_quantum_store, &cfqd->cfq_quantum, 1, UINT_MAX, 0);
2333STORE_FUNCTION(cfq_queued_store, &cfqd->cfq_queued, 1, UINT_MAX, 0); 2333STORE_FUNCTION(cfq_queued_store, &cfqd->cfq_queued, 1, UINT_MAX, 0);
2334STORE_FUNCTION(cfq_fifo_expire_sync_store, &cfqd->cfq_fifo_expire[1], 1, UINT_MAX, 1); 2334STORE_FUNCTION(cfq_fifo_expire_sync_store, &cfqd->cfq_fifo_expire[1], 1, UINT_MAX, 1);
2335STORE_FUNCTION(cfq_fifo_expire_async_store, &cfqd->cfq_fifo_expire[0], 1, UINT_MAX, 1); 2335STORE_FUNCTION(cfq_fifo_expire_async_store, &cfqd->cfq_fifo_expire[0], 1, UINT_MAX, 1);
2336STORE_FUNCTION(cfq_back_max_store, &cfqd->cfq_back_max, 0, UINT_MAX, 0); 2336STORE_FUNCTION(cfq_back_seek_max_store, &cfqd->cfq_back_max, 0, UINT_MAX, 0);
2337STORE_FUNCTION(cfq_back_penalty_store, &cfqd->cfq_back_penalty, 1, UINT_MAX, 0); 2337STORE_FUNCTION(cfq_back_seek_penalty_store, &cfqd->cfq_back_penalty, 1, UINT_MAX, 0);
2338STORE_FUNCTION(cfq_slice_idle_store, &cfqd->cfq_slice_idle, 0, UINT_MAX, 1); 2338STORE_FUNCTION(cfq_slice_idle_store, &cfqd->cfq_slice_idle, 0, UINT_MAX, 1);
2339STORE_FUNCTION(cfq_slice_sync_store, &cfqd->cfq_slice[1], 1, UINT_MAX, 1); 2339STORE_FUNCTION(cfq_slice_sync_store, &cfqd->cfq_slice[1], 1, UINT_MAX, 1);
2340STORE_FUNCTION(cfq_slice_async_store, &cfqd->cfq_slice[0], 1, UINT_MAX, 1); 2340STORE_FUNCTION(cfq_slice_async_store, &cfqd->cfq_slice[0], 1, UINT_MAX, 1);
@@ -2342,75 +2342,22 @@ STORE_FUNCTION(cfq_slice_async_rq_store, &cfqd->cfq_slice_async_rq, 1, UINT_MAX,
2342STORE_FUNCTION(cfq_max_depth_store, &cfqd->cfq_max_depth, 1, UINT_MAX, 0); 2342STORE_FUNCTION(cfq_max_depth_store, &cfqd->cfq_max_depth, 1, UINT_MAX, 0);
2343#undef STORE_FUNCTION 2343#undef STORE_FUNCTION
2344 2344
2345static struct elv_fs_entry cfq_quantum_entry = { 2345#define CFQ_ATTR(name) \
2346 .attr = {.name = "quantum", .mode = S_IRUGO | S_IWUSR }, 2346 __ATTR(name, S_IRUGO|S_IWUSR, cfq_##name##_show, cfq_##name##_store)
2347 .show = cfq_quantum_show, 2347
2348 .store = cfq_quantum_store, 2348static struct elv_fs_entry cfq_attrs[] = {
2349}; 2349 CFQ_ATTR(quantum),
2350static struct elv_fs_entry cfq_queued_entry = { 2350 CFQ_ATTR(queued),
2351 .attr = {.name = "queued", .mode = S_IRUGO | S_IWUSR }, 2351 CFQ_ATTR(fifo_expire_sync),
2352 .show = cfq_queued_show, 2352 CFQ_ATTR(fifo_expire_async),
2353 .store = cfq_queued_store, 2353 CFQ_ATTR(back_seek_max),
2354}; 2354 CFQ_ATTR(back_seek_penalty),
2355static struct elv_fs_entry cfq_fifo_expire_sync_entry = { 2355 CFQ_ATTR(slice_sync),
2356 .attr = {.name = "fifo_expire_sync", .mode = S_IRUGO | S_IWUSR }, 2356 CFQ_ATTR(slice_async),
2357 .show = cfq_fifo_expire_sync_show, 2357 CFQ_ATTR(slice_async_rq),
2358 .store = cfq_fifo_expire_sync_store, 2358 CFQ_ATTR(slice_idle),
2359}; 2359 CFQ_ATTR(max_depth),
2360static struct elv_fs_entry cfq_fifo_expire_async_entry = { 2360 __ATTR_NULL
2361 .attr = {.name = "fifo_expire_async", .mode = S_IRUGO | S_IWUSR },
2362 .show = cfq_fifo_expire_async_show,
2363 .store = cfq_fifo_expire_async_store,
2364};
2365static struct elv_fs_entry cfq_back_max_entry = {
2366 .attr = {.name = "back_seek_max", .mode = S_IRUGO | S_IWUSR },
2367 .show = cfq_back_max_show,
2368 .store = cfq_back_max_store,
2369};
2370static struct elv_fs_entry cfq_back_penalty_entry = {
2371 .attr = {.name = "back_seek_penalty", .mode = S_IRUGO | S_IWUSR },
2372 .show = cfq_back_penalty_show,
2373 .store = cfq_back_penalty_store,
2374};
2375static struct elv_fs_entry cfq_slice_sync_entry = {
2376 .attr = {.name = "slice_sync", .mode = S_IRUGO | S_IWUSR },
2377 .show = cfq_slice_sync_show,
2378 .store = cfq_slice_sync_store,
2379};
2380static struct elv_fs_entry cfq_slice_async_entry = {
2381 .attr = {.name = "slice_async", .mode = S_IRUGO | S_IWUSR },
2382 .show = cfq_slice_async_show,
2383 .store = cfq_slice_async_store,
2384};
2385static struct elv_fs_entry cfq_slice_async_rq_entry = {
2386 .attr = {.name = "slice_async_rq", .mode = S_IRUGO | S_IWUSR },
2387 .show = cfq_slice_async_rq_show,
2388 .store = cfq_slice_async_rq_store,
2389};
2390static struct elv_fs_entry cfq_slice_idle_entry = {
2391 .attr = {.name = "slice_idle", .mode = S_IRUGO | S_IWUSR },
2392 .show = cfq_slice_idle_show,
2393 .store = cfq_slice_idle_store,
2394};
2395static struct elv_fs_entry cfq_max_depth_entry = {
2396 .attr = {.name = "max_depth", .mode = S_IRUGO | S_IWUSR },
2397 .show = cfq_max_depth_show,
2398 .store = cfq_max_depth_store,
2399};
2400
2401static struct attribute *cfq_attrs[] = {
2402 &cfq_quantum_entry.attr,
2403 &cfq_queued_entry.attr,
2404 &cfq_fifo_expire_sync_entry.attr,
2405 &cfq_fifo_expire_async_entry.attr,
2406 &cfq_back_max_entry.attr,
2407 &cfq_back_penalty_entry.attr,
2408 &cfq_slice_sync_entry.attr,
2409 &cfq_slice_async_entry.attr,
2410 &cfq_slice_async_rq_entry.attr,
2411 &cfq_slice_idle_entry.attr,
2412 &cfq_max_depth_entry.attr,
2413 NULL,
2414}; 2361};
2415 2362
2416static struct elevator_type iosched_cfq = { 2363static struct elevator_type iosched_cfq = {