Skip to content

Commit

Permalink
dm cache policy mq: reduce memory requirements
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Thornber authored and Mike Snitzer committed Nov 11, 2013
1 parent 53d4981 commit 633618e
Showing 1 changed file with 231 additions and 312 deletions.
Loading

0 comments on commit 633618e

Please sign in to comment.