]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy smq: allocate cache blocks in order
authorJoe Thornber <ejt@redhat.com>
Thu, 9 Nov 2017 16:41:05 +0000 (11:41 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 10 Nov 2017 20:45:05 +0000 (15:45 -0500)
commit1387d0b4c813b84b781c4525de639bdecc6db9f2
tree7ebf9e28e29a74d0f230b9fc8517584e647aeeda
parenta1c2e750a78a9e6514954c8ee6330158be1b1760
dm cache policy smq: allocate cache blocks in order

Previously, cache blocks were being allocated in reverse order.  Fix
this by pulling the block off the head of the free list.

Shouldn't have any impact on performance or latency but it is more
correct to have the cache blocks allocated/mapped in ascending order.
This fix will slightly increase the chances of two adjacent oblocks
being in adjacent cblocks.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-smq.c