]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy mq: reduce memory requirements
authorJoe Thornber <ejt@redhat.com>
Sat, 9 Nov 2013 11:12:51 +0000 (11:12 +0000)
committerMike Snitzer <snitzer@redhat.com>
Mon, 11 Nov 2013 16:37:50 +0000 (11:37 -0500)
commita631336b2635eaecc7623d9fe12850a1aa151742
tree6a9de60cb6e659fd14216e3bd49689441070efbf
parent952f25bb0576ee8a75f4becb52befe912db6935f
dm cache policy mq: reduce memory requirements

Rather than storing the cblock in each cache entry, we allocate all
entries in an array and infer the cblock from the entry position.

Saves 4 bytes of memory per cache block.  In addition, this gives us an
easy way of looking up cache entries by cblock.

We no longer need to keep an explicit bitset to track which cblocks
have been allocated.  And no searching is needed to find free cblocks.

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