Commit c74ffc5c authored by Joe Thornber's avatar Joe Thornber Committed by Mike Snitzer

dm cache policy mq: remove queue_shift_down()

queue_shift_down() didn't adjust the hit_counts to the new levels, so it
just had the effect of scrambling levels.
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 75da39bf
...@@ -159,18 +159,6 @@ static void queue_remove(struct queue *q, struct list_head *elt) ...@@ -159,18 +159,6 @@ static void queue_remove(struct queue *q, struct list_head *elt)
list_del(elt); list_del(elt);
} }
/*
* Shifts all regions down one level. This has no effect on the order of
* the queue.
*/
static void queue_shift_down(struct queue *q)
{
unsigned level;
for (level = 1; level < NR_QUEUE_LEVELS; level++)
list_splice_init(q->qs + level, q->qs + level - 1);
}
/* /*
* Gives us the oldest entry of the lowest popoulated level. If the first * Gives us the oldest entry of the lowest popoulated level. If the first
* level is emptied then we shift down one level. * level is emptied then we shift down one level.
...@@ -193,10 +181,6 @@ static struct list_head *queue_pop(struct queue *q) ...@@ -193,10 +181,6 @@ static struct list_head *queue_pop(struct queue *q)
if (r) { if (r) {
q->nr_elts--; q->nr_elts--;
list_del(r); list_del(r);
/* have we just emptied the bottom level? */
if (list_empty(q->qs))
queue_shift_down(q);
} }
return r; return r;
......
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