Robert Baldyga
716b5751d6
Redesign failover standby API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 20:31:40 +01:00
Adam Rutkowski
b1494f4642
Remove option to failover without detach
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-11-30 15:18:08 +01:00
Robert Baldyga
12160ccc36
Introduce OCF_ERR_MIN/OCF_ERR_MAX
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-11-25 15:53:24 +01:00
Rafal Stefanowski
0b39711b8b
Add promote-on-threshold sequential cutoff switch
...
Decide whether to promote sequential cutoff stream
to global structures when threshold is reached
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-11-09 12:54:15 +01:00
Rafal Stefanowski
f22da1cde7
Fix license
...
Change license to BSD-3-Clause
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 13:08:50 +02:00
Krzysztof Majzerowicz-Jaszcz
71262d5097
Cache standby mode API changes
...
Error for an invalid cache operation while in passive mode added
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Error name correction
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
API changes for passive cache mode
Moved the passive cache error return source to the api for flush and
set_param
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Further API changes for passive cache mode
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Passive api - review changes
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-10-22 15:10:53 +02:00
Adam Rutkowski
5ad4d937f6
Failover detach
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-10-08 14:52:24 +02:00
Robert Baldyga
7b38ad205c
Add cache activation from passive state
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-06 20:44:40 +02:00
Robert Baldyga
f96451a698
Introduce ocf_cache_is_passive()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-06 13:49:21 +02:00
Robert Baldyga
1fd9a448d4
Introduce passive cache state
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-06 13:49:21 +02:00
Robert Baldyga
8015a30348
Fix documentation of ocf_cache_is_running()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-02 22:38:37 +02:00
Robert Baldyga
43917e88bc
Merge pull request #560 from KanagiAomori/json
...
Flattened ocf_core_info struct
2021-08-26 09:55:39 +02:00
Piotr Debski
79ebd18d33
Flattened ocf_core_info struct
...
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2021-08-25 16:01:42 +02:00
Robert Baldyga
c1e9c1fa96
Remove trace API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-09 10:00:01 +02:00
Robert Baldyga
b26483fab5
Merge pull request #528 from arutk/remove_persistent_ops
...
Remove accidentaly included ocf_persistent_metadata_ops
2021-07-29 23:17:51 +02:00
Michal Mielewczyk
f33a6e5ce0
Make switching cleaning policy asynchronous
...
Making the operation asynchronous will allow to use refcnt utility as an
synchronization mechanism between processing cachelines and deinitializing
cleaning policy.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-07-27 15:44:18 +02:00
Kozlowski Mateusz
af1f3d73c2
Add back fastpath
...
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-21 08:27:25 +02:00
Kozlowski Mateusz
f494448f97
Align structures to cacheline
...
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-07-08 12:46:39 +02:00
Adam Rutkowski
ab74ce07df
Remove accidentaly included ocf_persistent_metadata_ops
...
This struct was not meant to be merged to master
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-26 18:08:29 +02:00
Adam Rutkowski
88e04a4204
Remove eviction policy abstraction
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-18 12:19:08 +02:00
Adam Rutkowski
87f834c793
Move common user and freelist partition data to a new struct
...
New structure ocf_part is added to contain all the data common for both
user partitions and freelist partition: part_runtime and part_id.
ocf_user_part now contains ocf_part structure as well as pointer to
cleaning partition runtime metadata (moved out from part_runtime) and
user partition config (no change here).
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-18 12:07:10 +02:00
Adam Rutkowski
f589341c9a
remove metadata updater
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-15 10:25:05 +02:00
Kozlowski Mateusz
4aff637e57
Add priv field initialization on cache start
...
This allows access to it in ctx_metadata_updater_init, which is
done in the same call stack during initalization.
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-05-25 15:51:00 +02:00
Michal Mielewczyk
19276570b8
Prevent adding core with the same UUID twice
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-14 16:56:09 +02:00
Kozlowski Mateusz
fdd6b88cc4
General packing of structs
...
Get back some memory/cachelines by packing any leftover static fields together.
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-26 08:57:04 +01:00
Robert Baldyga
5a765c6127
seq_cutoff: Fix max threshold value
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-19 11:40:22 +01:00
Robert Baldyga
8020e7fd67
Merge pull request #457 from Ostrokrzew/false_stats
...
Fix broken 'dirty_for' stats
2021-03-18 10:24:02 +01:00
Robert Baldyga
9352c881ab
tests: Update sequential cutoff tests
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-04 16:38:31 +01:00
Robert Baldyga
3ee253cc4e
Per-queue multi-stream sequential cutoff
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-04 16:38:31 +01:00
Michal Mielewczyk
95d756de91
Remove ioclass min_size from public API
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-02 14:46:57 +01:00
Michal Mielewczyk
f61472c3f4
Validate seq cutoff threshold value
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-02-26 08:24:41 -05:00
Slawomir Jankowski
eeda1f3f0f
Unify type of dirty_for
in info structs
...
Reformat function that calculates how long cache/core is dirty
Update `dirty_for` types in functional tests
Values stored in info structs fields (both in cache and core structs)
are unsigned 64-bits ints but `dirty_for`s were unsigned 32-bits ints.
Use existing function to transform returned value to seconds.
Replace seconds stored in metadata with seconds.
Replacement was done if old value of replaced field was equal to zero.
Acquiring monotonic high precission timestamp is potentially
slow and it makes sense to compare the field's value
to zero before calling atomic function.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-02-25 14:51:53 +01:00
Rafal Stefanowski
6ed4cf8a24
Update copyright statements (2021)
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:17:34 +01:00
Rafal Stefanowski
88b97df16d
Fix pipeline attach/load paths
...
Create separate pipelines for cache attach and load scenarios.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-12-23 16:31:49 +01:00
Michal Mielewczyk
6ca5779057
Update struct ocf_io_class_info
docs
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-12-21 08:00:25 -05:00
Robert Baldyga
c8e7e0053c
Remove dependency to full ocf_env.h from inc/ headers
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-11-19 13:07:16 +01:00
Slawomir Jankowski
da34d5047b
Typo fix
...
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-19 16:23:41 +02:00
Rafal Stefanowski
38e7e19290
Update copyright statements
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-04-28 13:37:54 +02:00
Robert Baldyga
188559416c
Merge pull request #354 from robertbaldyga/multistream-seq-cutoff
...
Introduce multi-stream seqential cutoff
2020-04-22 15:35:42 +02:00
Robert Baldyga
e9afb40860
Add sequential cutoff debug interface
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Robert Baldyga
93cd0615d3
Introduce multi-stream sequential cutoff
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Robert Baldyga
a9c36477d2
Fix deadlock on concurrent flush at the same cache
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-03 18:09:35 +02:00
Michal Rakowski
2edd05c812
Change get_effective_cache_mode to operate on req instead of io
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-20 18:58:10 +01:00
Michal Rakowski
d84942daa3
Typo fixes
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-03-17 16:36:40 +01:00
Robert Baldyga
108fe28ad4
Introduce core priv
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-03-03 15:37:12 +01:00
Jan Musial
677e9e07e5
Allow 0ms activity threshold and wake up time for ALRU
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-02-21 16:05:20 +01:00
Adam Rutkowski
26fd938ccf
Reduce max trim request size to 512K
...
512K is the maximum request size for which request map
fits into one page (4K) regardless of cacheline size.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-02-10 15:57:34 -05:00
Ostrokrzew
3fca309e51
Change error code and add new
...
Change 'OCF_ERR_START_CACHE_FAIL' to 'OCF_ERR_NO_MEM' while CAS fails in case of memory lack on device.
Add new error code for case, when device doesn't satisfy CAS requirements - 'OCF_ERR_INVAL_CACHE_DEV'.
Use 'OCF_ERR_INVAL_CACHE_DEV' in code.
Update error code match in test.
closes #317 issue
Signed-off-by: Ostrokrzew <slawomir.jankowski@intel.com>
2020-01-02 09:34:24 +01:00
Slawomir_Jankowski
d77c35bfd0
Add missing include
...
Add missing '#include ocf_err.h' to 'ocf_volume.h'.
Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-10-02 14:43:29 +02:00
Slawomir_Jankowski
0696ec1f9c
Aesthetic changes
...
Aesthetic changes, typos fix and delete recursive inclusions.
Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-10-01 14:24:16 +02:00
Adam Rutkowski
5113542c7f
Merge pull request #297 from mmichal10/pp-params-in-sb
...
Store PP config params in cache superblock.
2019-10-01 12:32:15 +02:00
Michal Mielewczyk
e16d4e6dda
Initialize promotion policy on cache attach.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-10-01 06:11:53 -04:00
Michal Rakowski
325994074e
env: change env_strncmp to take 4 args
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-30 17:26:47 +02:00
Slawomir_Jankowski
cdf0caf704
**ocf_mngt.h**: In core name change
...
pointer type to array which is 32 characters long;
**core.py**: Add missing import and modify class' field type
to keep consistency;
**ocf_mngt_core**: Remove local variable 'name';
remove env_vmalloc for 'name' - isn't no longer needed;
remove initialization 'name' - as above;
remove env_vfree for context->cfg.name - variable isn't no allocated
in memory;
check if cfg->name exists;
change label in goto from deleted err_name to the closest err_pipeline.
Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-09-30 15:55:33 +02:00
Michal Mielewczyk
dfc55538ce
Store PP config params in cache superblock.
...
It allows to modify and retrieve particular PP params event if it isn't active
and store values between cache stop and load.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-27 10:55:58 -04:00
Michal Mielewczyk
6c076a7c07
Remove set_cache_name() from public API.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-25 09:21:42 -04:00
Michal Mielewczyk
f461f3c62e
Extend probe informations with cache name.
...
Since ocf requires loading cache with the same name as it was stopped, it should
also allow to read name from metadata.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-25 07:59:50 -04:00
Michal Mielewczyk
2abccadb9e
New error code for invaild loaded cache name.
...
When loading cache metadata, it should be started with exactly the same name as
it was running previously. Otherwise load should fail and return newly added
error code.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-24 07:40:21 -04:00
Jan Musial
0e85ebe4a3
Get PP params in line with rest of OCF
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-18 11:15:41 +02:00
Michał Mielewczyk
0391fc17b7
Merge pull request #255 from imjfckm/pp-tests
...
Add promotion policies functional tests
2019-09-16 09:34:16 +02:00
Jan Musiał
58012cd14b
Merge pull request #260 from mmichal10/unify-inactive-cores-stats
...
Unify inactive cores stats
2019-09-16 09:03:08 +02:00
Michal Mielewczyk
f226f978f0
Unify inactive cores stats.
...
Inactive core stats should be caluculated and returned to adapter in unified
from, just like all stats are.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-16 02:49:42 -04:00
Jan Musial
703a757db1
Fix minor bugs in promotion policy
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-11 10:31:14 +02:00
Jan Musial
633f31716e
Make NHIT API naming convention similar to cleaning
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-11 07:31:50 +02:00
Michal Mielewczyk
0d4f4d3294
Added API for updating statistics.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 08:01:09 -04:00
Michal Mielewczyk
42d6dbbf11
Remove low-level stats getters from public API.
...
Since stats builder is implemented for retrieving cache, core and ioclass stats,
adapters should use it instead.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 08:01:09 -04:00
Michal Mielewczyk
89de6038c1
Split retrieving core stats and config info into two functions.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 08:01:09 -04:00
Michal Mielewczyk
f9da89263b
Stats builder for ioclass statistics.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-10 04:32:21 -04:00
Michal Mielewczyk
8304ed84b8
More precise percentage value in stats builder.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-09 02:46:45 -04:00
Jan Musial
a1d3cf0c4d
Switching mechanism for promotion policies
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-08-29 13:24:26 +02:00
Michal Rakowski
e3a20c0da0
Merge pull request #239 from imjfckm/pp-implementation
...
nhit promotion policy implementation
2019-08-27 12:42:03 +02:00
Jan Musial
62a0ccdd9f
nhit promotion policy implementation
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-08-22 13:34:38 +02:00
Michal Mielewczyk
2c27e9a433
Store name for newly initialized cache in array instead of passing pointer.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-20 01:43:11 -04:00
Robert Baldyga
9730b2bd1f
Remove remaining core_id occurrences from public API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-08-07 16:12:06 +02:00
Michal Mielewczyk
80f82cab2b
Deinitialize volume types in ocf internally.
...
Adapter can provide ops for data type deinitialization, if any additional
operations are required on deinitialization procedure.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-05 06:16:46 -04:00
Robert Baldyga
721fb68d6e
Fix ocf_volume_ops documentation
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-31 15:48:31 +02:00
Robert Baldyga
92c7e12549
Remove core id from public API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-30 09:26:26 +02:00
Robert Baldyga
1100cb0b4f
Remove cache id from public API
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-30 09:26:26 +02:00
Robert Baldyga
4f0735b503
Ensure that core name is set and unique
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-29 17:37:48 +02:00
Robert Baldyga
901b39031f
Ensure that cache name is set and unique
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-29 17:37:43 +02:00
Jan Musiał
232f0cd8d7
Merge pull request #216 from robertbaldyga/io-and-req-in-single-allocation
...
Allocate io and req in single allocation
2019-07-23 11:40:30 +02:00
Jan Musial
917cbd859a
Add promotion policy API and use it in I/O path
...
Promotion policy is supposed to perform ALRU noise filtering by
eliminating one-hit wonders being added to cache and polluting it.
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-07-19 13:52:00 +02:00
Robert Baldyga
61414f889e
Introduce OCF IO allocator
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-17 10:31:23 +02:00
Robert Baldyga
e254c9b587
Merge new_io and configure into one function
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-17 10:31:23 +02:00
Robert Baldyga
4d2d31ff76
Introduce ocf_io_internal
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-07-17 09:54:51 +02:00
Michal Mielewczyk
636834dae3
Check for existing metadata when attaching cache.
...
Instead of overriding existing metadata silently, return appropriate error.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-07-08 09:23:32 -04:00
Michal Rakowski
b1a6c467a0
Introduce core_is_dirty mngt method
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-06-25 09:12:44 +02:00
Michal Rakowski
a818ffabfd
Move ocf_mngt_cache_is_dirty to public mngt interface
2019-06-24 15:23:06 +02:00
Adam Rutkowski
b97bb6f53b
Add function to check for lazy write cache mode (WO or WB)
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-06-12 12:07:02 -04:00
Adam Rutkowski
82e8c55f4a
Write-only cache mode
...
Write-only cache mode is similar to writeback, 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.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-06-12 12:07:02 -04:00
Michal Rakowski
9f4536c6e3
Error codes in IO path changed to OCF-specific
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-06-05 09:10:54 +02:00
Michal Wysoczanski
9e75edd18c
Explicitly cast void pointer to const char *.
...
Signed-off-by: Michal Wysoczanski <michal.wysoczanski@intel.com>
2019-05-30 00:08:58 +02:00
Robert Baldyga
46ae8b2ff1
Remove unused OCF_ERR_CACHE_IN_USE error code
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-28 11:20:48 +02:00
Robert Baldyga
8a82be339f
Introduce asynchronous cache lock
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-28 11:20:48 +02:00
Robert Baldyga
cda536a14a
Remove mpool from OCF utils
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-27 13:04:40 +02:00
Jan Musiał
93a06686a7
Merge pull request #165 from robertbaldyga/ctx-get-put
...
Give ocf_ctx get/put semantics
2019-05-24 14:29:04 +02:00
Robert Baldyga
c903d13ad2
Give ocf_ctx get/put semantics
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-23 15:50:10 +02:00
Robert Baldyga
0526239baf
Introduce helpers for setting config structures to defaults
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-23 13:29:49 +02:00
Robert Baldyga
65a6fc0468
Remove unused cache_id field from core config
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-23 13:29:49 +02:00
Robert Baldyga
efa96ef7bd
Add ocf_cache_line_size_none
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-05-23 13:29:49 +02:00