dm cache policy smq: distribute entries to random levels when switching to smq
authorJoe Thornber <ejt@redhat.com>
Thu, 15 Sep 2016 13:36:24 +0000 (09:36 -0400)
committerMike Snitzer <snitzer@redhat.com>
Thu, 22 Sep 2016 15:15:03 +0000 (11:15 -0400)
commit9d1b404cbc3f990a4035dcf7ddd37adac2a99b3f
treee3afe884a02e400cf69d8e10f809b218d772b564
parent4e781b498ee5008ede91362d91404a362e7a46b3
dm cache policy smq: distribute entries to random levels when switching to smq

For smq the 32 bit 'hint' stores the multiqueue level that the entry
should be stored in.  If a different policy has been used previously,
and then switched to smq, the hints will be invalid.  In which case we
used to put all entries in the bottom level of the multiqueue, and then
redistribute.  Redistribution is faster if we put entries with invalid
hints in random levels initially.

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