]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy mq: track entries hit this 'tick' via sentinel objects
authorJoe Thornber <ejt@redhat.com>
Fri, 20 Feb 2015 13:49:45 +0000 (13:49 +0000)
committerMike Snitzer <snitzer@redhat.com>
Tue, 31 Mar 2015 16:03:48 +0000 (12:03 -0400)
commit0af566d606eb679185a6429343aab5ef2ea62519
treed276979206c17fe5725a4f0dcf18eba27076831c
parent3e6bf3d6d661444c1b0b5923ebabfef992e6d815
dm cache policy mq: track entries hit this 'tick' via sentinel objects

A sentinel object is placed on each level of the multiqueues.  When an
object is hit it is requeued behind the sentinel.  When the tick is
incremented we iterate through all objects behind the sentinel and
update the hit_count, then reposition the sentinel at the very back.

This saves memory by avoiding tracking the tick explicitly for every
struct entry object in the multiqueues.

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