Commit 8deda24c authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] cfq-iosched: kill show_status sysfs entry

This is a debug entry that isn't of much use to the generic user or on a
production system. Additionally it can also easy overflow the sysfs
PAGE_SIZE limitation, if you have many processes doing io. So kill the
entry.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d46b1a35
...@@ -1688,55 +1688,6 @@ cfq_read_key_type(struct cfq_data *cfqd, char *page) ...@@ -1688,55 +1688,6 @@ cfq_read_key_type(struct cfq_data *cfqd, char *page)
return len; return len;
} }
static ssize_t
cfq_status_show(struct cfq_data *cfqd, char *page)
{
struct list_head *entry;
struct cfq_queue *cfqq;
ssize_t len;
int i = 0, queues;
len = sprintf(page, "Busy queues: %u\n", cfqd->busy_queues);
len += sprintf(page+len, "key type: %s\n",
cfq_key_types[cfqd->key_type]);
len += sprintf(page+len, "last sector: %Lu\n",
(unsigned long long)cfqd->last_sector);
len += sprintf(page+len, "max time in iosched: %lu\n",
max_elapsed_dispatch);
len += sprintf(page+len, "max completion time: %lu\n", max_elapsed_crq);
len += sprintf(page+len, "Busy queue list:\n");
spin_lock_irq(cfqd->queue->queue_lock);
list_for_each(entry, &cfqd->rr_list) {
i++;
cfqq = list_entry_cfqq(entry);
len += sprintf(page+len, " cfqq: key=%lu alloc=%d/%d, "
"queued=%d/%d, last_fifo=%lu, service_used=%lu\n",
cfqq->key, cfqq->allocated[0], cfqq->allocated[1],
cfqq->queued[0], cfqq->queued[1],
cfqq->last_fifo_expire, cfqq->service_used);
}
len += sprintf(page+len, " busy queues total: %d\n", i);
queues = i;
len += sprintf(page+len, "Empty queue list:\n");
i = 0;
list_for_each(entry, &cfqd->empty_list) {
i++;
cfqq = list_entry_cfqq(entry);
len += sprintf(page+len, " cfqq: key=%lu alloc=%d/%d, "
"queued=%d/%d, last_fifo=%lu, service_used=%lu\n",
cfqq->key, cfqq->allocated[0], cfqq->allocated[1],
cfqq->queued[0], cfqq->queued[1],
cfqq->last_fifo_expire, cfqq->service_used);
}
len += sprintf(page+len, " empty queues total: %d\n", i);
queues += i;
len += sprintf(page+len, "Total queues: %d\n", queues);
spin_unlock_irq(cfqd->queue->queue_lock);
return len;
}
#define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \ #define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \
static ssize_t __FUNC(struct cfq_data *cfqd, char *page) \ static ssize_t __FUNC(struct cfq_data *cfqd, char *page) \
{ \ { \
...@@ -1824,10 +1775,6 @@ static struct cfq_fs_entry cfq_clear_elapsed_entry = { ...@@ -1824,10 +1775,6 @@ static struct cfq_fs_entry cfq_clear_elapsed_entry = {
.attr = {.name = "clear_elapsed", .mode = S_IWUSR }, .attr = {.name = "clear_elapsed", .mode = S_IWUSR },
.store = cfq_clear_elapsed, .store = cfq_clear_elapsed,
}; };
static struct cfq_fs_entry cfq_misc_entry = {
.attr = {.name = "show_status", .mode = S_IRUGO },
.show = cfq_status_show,
};
static struct cfq_fs_entry cfq_key_type_entry = { static struct cfq_fs_entry cfq_key_type_entry = {
.attr = {.name = "key_type", .mode = S_IRUGO | S_IWUSR }, .attr = {.name = "key_type", .mode = S_IRUGO | S_IWUSR },
.show = cfq_read_key_type, .show = cfq_read_key_type,
...@@ -1845,7 +1792,6 @@ static struct attribute *default_attrs[] = { ...@@ -1845,7 +1792,6 @@ static struct attribute *default_attrs[] = {
&cfq_back_max_entry.attr, &cfq_back_max_entry.attr,
&cfq_back_penalty_entry.attr, &cfq_back_penalty_entry.attr,
&cfq_clear_elapsed_entry.attr, &cfq_clear_elapsed_entry.attr,
&cfq_misc_entry.attr,
NULL, NULL,
}; };
......
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