Extend CAS interface with Write-only cache mode

Write-only (WO) cache mode is similar to Write-back (WB), however
read operations do not promote data to cache. Reads are mostly
serviced by the core device, only dirty sectors are fetched from
the cache.

Write-only cache mode is behaving similarly to Write-back with
respect to flushing dirty data. For example it is required to
explicitly enable/disable flushing when changing cache mode
from WO to something other than WB.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2019-06-07 15:10:11 -04:00
parent a9eb0ee705
commit ffa1f4b067
7 changed files with 31 additions and 18 deletions

View File

@@ -62,6 +62,13 @@ to the core device. Pass-Through mode may be used in case if user doesn't want t
cache any workload, for example in case if there are some maintenance operations
causing cache pollution.
.TP
.B Write-Only (wo)
In Write-Only mode write operations are handled exactly like in Write-Back mode. Read
operations do not promote data to cache. Reads are typically serviced by the core
device, unless corresponding cache lines are dirty.
.SH COMMANDS
.TP
.B -S, --start-cache

View File

@@ -261,7 +261,7 @@ class cas_config(object):
format(self.device))
def check_cache_mode_valid(self, cache_mode):
if cache_mode.lower() not in ['wt', 'pt', 'wa', 'wb']:
if cache_mode.lower() not in ['wt', 'pt', 'wa', 'wb', 'wo']:
raise ValueError('Invalid cache mode {0}'.format(cache_mode))
def check_cleaning_policy_valid(self, cleaning_policy):