Skip to content

Commit 981a797

Browse files
Jens AxboeJens Axboe
authored andcommitted
[PATCH] cfq-iosched: kill the empty_list
No point in having a place holder list just for empty queues, so remove it. It's not used for anything other than to keep ->cfq_list busy. Signed-off-by: Jens Axboe <[email protected]>
1 parent 53b0374 commit 981a797

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

block/cfq-iosched.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ struct cfq_data {
8181
struct list_head idle_rr;
8282
unsigned int busy_queues;
8383

84-
/*
85-
* non-ordered list of empty cfqq's
86-
*/
87-
struct list_head empty_list;
88-
8984
/*
9085
* cfqq lookup hash
9186
*/
@@ -136,7 +131,7 @@ struct cfq_queue {
136131
struct hlist_node cfq_hash;
137132
/* hash key */
138133
unsigned int key;
139-
/* on either rr or empty list of cfqd */
134+
/* member of the rr/busy/cur/idle cfqd list */
140135
struct list_head cfq_list;
141136
/* sorted list of pending requests */
142137
struct rb_root sort_list;
@@ -417,7 +412,7 @@ cfq_del_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq)
417412
{
418413
BUG_ON(!cfq_cfqq_on_rr(cfqq));
419414
cfq_clear_cfqq_on_rr(cfqq);
420-
list_move(&cfqq->cfq_list, &cfqd->empty_list);
415+
list_del_init(&cfqq->cfq_list);
421416

422417
BUG_ON(!cfqd->busy_queues);
423418
cfqd->busy_queues--;
@@ -1959,7 +1954,6 @@ static void *cfq_init_queue(request_queue_t *q, elevator_t *e)
19591954
INIT_LIST_HEAD(&cfqd->busy_rr);
19601955
INIT_LIST_HEAD(&cfqd->cur_rr);
19611956
INIT_LIST_HEAD(&cfqd->idle_rr);
1962-
INIT_LIST_HEAD(&cfqd->empty_list);
19631957
INIT_LIST_HEAD(&cfqd->cic_list);
19641958

19651959
cfqd->cfq_hash = kmalloc_node(sizeof(struct hlist_head) * CFQ_QHASH_ENTRIES, GFP_KERNEL, q->node);

0 commit comments

Comments
 (0)