08 Mar, 2017
1 commit
-
The cache policy interfaces have been updated to work well with the new
bio-prison v2 interface's ability to queue work immediately (promotion,
demotion, etc) -- overriding benefit being reduced latency on processing
IO through the cache. Previously such work would be left for the DM
cache core to queue on various lists and then process in batches later
-- this caused a serious delay in latency for IO driven by the cache.The background tracker code was factored out so that all cache policies
can make use of it.Also, the "cleaner" policy has been removed and is now a variant of the
smq policy that simply disallows migrations.Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
22 Sep, 2016
1 commit
-
It's far quicker to always delete the hint array and recreate with
dm_array_new() because we avoid the copying caused by mutation.Also simplifies the policy interface, replacing the walk_hints() with
the simpler get_hint().Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
12 Jun, 2015
2 commits
-
The policy tick() method is normally called from interrupt context.
Both the mq and smq policies do some bottom half work for the tick
method in their map functions. However if no IO is going through the
cache, then that bottom half work doesn't occur. With these policies
this means recently hit entries do not age and do not get written
back as early as we'd like.Fix this by introducing a new 'can_block' parameter to the tick()
method. When this is set the bottom half work occurs immediately.
'can_block' is set when the tick method is called every second by the
core target (not in interrupt context).Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer -
If a cache metadata operation fails (e.g. transaction commit) the
cache's metadata device will abort the current transaction, set a new
needs_check flag, and the cache will transition to "read-only" mode. If
aborting the transaction or setting the needs_check flag fails the cache
will transition to "fail-io" mode.Once needs_check is set the cache device will not be allowed to
activate. Activation requires write access to metadata. Future work is
needed to add proper support for running the cache in read-only mode.Once in fail-io mode the cache will report a status of "Fail".
Also, add commit() wrapper that will disallow commits if in read_only or
fail mode.Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
30 May, 2015
3 commits
-
Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer -
We only allow non critical writeback if the origin is idle. It is up
to the policy to decide what writeback work is critical.Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer -
There is a race between a policy deciding to replace a cache entry,
the core target writing back any dirty data from this block, and other
IO threads doing IO to the same block.This sort of problem is avoided most of the time by the core target
grabbing a bio prison cell before making the request to the policy.
But for a demotion the core target doesn't know which block will be
demoted, so can't do this in advance.Fix this demotion race by introducing a callback to the policy interface
that allows the policy to grab the cell on behalf of the core target.Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
Cc: stable@vger.kernel.org
12 Nov, 2013
1 commit
-
Implement policy_remove_cblock() and add remove_cblock method to the mq
policy. These methods will be used by the following cache block
invalidation patch which adds the 'invalidate_cblocks' message to the
cache core.Also, update some comments in dm-cache-policy.h
Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
10 Nov, 2013
1 commit
-
No need to return from a void function.
Signed-off-by: Joe Thornber
Signed-off-by: Mike Snitzer
21 Mar, 2013
1 commit
-
Separate dm cache policy version string into 3 unsigned numbers
corresponding to major, minor and patchlevel and store them at the end
of the on-disk metadata so we know which version of the policy generated
the hints in case a future version wants to use them differently.Signed-off-by: Mike Snitzer
Signed-off-by: Alasdair G Kergon
02 Mar, 2013
1 commit
-
Add a target that allows a fast device such as an SSD to be used as a
cache for a slower device such as a disk.A plug-in architecture was chosen so that the decisions about which data
to migrate and when are delegated to interchangeable tunable policy
modules. The first general purpose module we have developed, called
"mq" (multiqueue), follows in the next patch. Other modules are
under development.Signed-off-by: Joe Thornber
Signed-off-by: Heinz Mauelshagen
Signed-off-by: Mike Snitzer
Signed-off-by: Alasdair G Kergon