Robert Baldyga
55eda53cde
Merge pull request #582 from jfckm/fix-detach-volume
...
Deinit cache volume on detach
2021-11-09 13:16:08 +01:00
Jan Musial
55eae1447d
Deinit cache volume on detach
...
Signed-off-by: Jan Musial <jan.musial@intel.com >
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-11-08 18:25:30 +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
e2c6a25ee9
[REVERTME] Disable option to perform activate without detach
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-10-08 14:52:32 +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
Jan Musial
010f30eeaf
Validate activate parameters
...
Signed-off-by: Jan Musial <jan.musial@intel.com >
2021-09-14 08:56:41 +02:00
Jan Musial
b9c84e331c
Fix attach with no cache_line_size specified
...
Signed-off-by: Jan Musial <jan.musial@intel.com >
2021-09-13 12:52:33 +02:00
Robert Baldyga
1892f58aba
Optimize out looping over cache line sectors in recovery
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-07 22:54:10 +02:00
Robert Baldyga
12a82d7fb1
Get rid of struct ocf_cache_line_settings
...
Remove struct that contains redundant data.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-07 14:53:46 +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
cc22c57cb7
Set proper cache pointer in front volumes
...
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
ee42d9aaaf
Duplicate cache name in struct ocf_cache
...
Cache name is needed for logging in passive mode, when config metadata
is still not accessible.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Robert Baldyga
a00ec916e2
Make post metadata load init a separate step in pipeline
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Robert Baldyga
c6c6618ad8
Move recovery code from metadata to cache mngt
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Robert Baldyga
a2db4d14e8
Move core initialization code from metadata to mngt
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Robert Baldyga
24728330fc
Make _ocf_mngt_load_add_cores a separate step in pipeline
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Robert Baldyga
20228561c9
Move metadata deinit to separate pipeline step
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2021-09-03 17:22:22 +02:00
Michal Mielewczyk
b83da68f85
Cleaner context ref counter
...
To prevent deinitializing cleaner context (i.e. during switching policy) during
processing requests, access to cleaner should be protected with reference
counter
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2021-07-27 15:44:33 +02:00
Michal Mielewczyk
26194fc536
Use cleaning ops wrapper functions
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com >
2021-07-27 15:44:18 +02:00
Adam Rutkowski
36107fd528
Initialize partitions during cache start
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-06-18 12:19:08 +02:00
Adam Rutkowski
07cbba32f6
remove stale references to eviction
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-06-18 12:19:08 +02:00
Adam Rutkowski
33e2beac24
Rename "evp_lru*" functions to "ocf_lru*"
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-06-18 12:19:08 +02:00
Adam Rutkowski
b1143374a8
Move eviction files to new locations
...
src/eviction/lru.c -> src/ocf_lru.c
src/eviction/lru.h -> src/ocf_lru.h
src/eviction/lru_structs.h -> src/ocf_lru_structs.h
src/eviction/eviction.c -> src/ocf_space.c
src/eviction/eviction.h -> src/ocf_space.h
.. as well as corresponding UT files.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
... in UT as well
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-06-18 12:19:08 +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
4f217b91a5
Remove partition list
...
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
Adam Rutkowski
953e0f25d7
replace metadata updater with metadata I/O concurrency
...
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
Adam Rutkowski
ff4842482e
Fix setting cache dirty flag during stop
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-04-06 14:07:42 -05: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
Adam Rutkowski
81fc7ab5c5
Parallel eviction
...
Eviction changes allowing to evict (remap) cachelines while
holding hash bucket write lock instead of global metadata
write lock.
As eviction (replacement) is now tightly coupled with request,
each request uses eviction size equal to number of its
unmapped cachelines.
Evicting without global metadata write lock is possible
thanks to the fact that remaping is always performed
while exclusively holding cacheline (read or write) lock.
So for a cacheline on LRU list we acquire cacheline lock,
safely resolve hash and consequently write-lock hash bucket.
Since cacheline lock is acquired under hash bucket (everywhere
except for new eviction implementation), we are certain that
noone acquires cacheline lock behind our back. Concurrent
eviction threads are eliminated by holding eviction list
lock for the duration of critial locking operations.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-03-05 11:20:47 +01:00
Adam Rutkowski
05780c98ed
Split global metadata lock
...
Divide single global lock instance into 4 to reduce contention
in multiple read-locks scenario.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2021-02-15 11:27:49 -06: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
Robert Baldyga
dd508c595f
Merge pull request #430 from rafalste/fix_attach_load_paths
...
Create separate pipelines and paths for cache attach/load scenarios
2020-12-23 16:51:37 +01:00
Rafal Stefanowski
57d4aaf7c9
Return error status from ocf_freelist_init
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com >
2020-12-23 16:43:46 +01:00
Rafal Stefanowski
d3b61e474c
Remove init_mode and use metadata.is_volatile instead
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com >
2020-12-23 16:31:55 +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
Robert Baldyga
6270d917f8
Initialize sequential cutoff for detached cores
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2020-12-23 14:00:54 +01:00
Adam Rutkowski
44efe3e49e
Refactor LRU code to use part rather than part_id
...
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com >
2020-12-17 14:35:27 +01:00
Robert Baldyga
ac83c4ecd6
seq_cutoff: Allocate seq cutoff structures dynamically per core
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2020-12-17 14:35:27 +01:00
Robert Baldyga
7c29110e47
Merge pull request #398 from Open-CAS/proper-core-status
...
Fix logging core state on cache load
2020-09-04 19:56:16 +02:00
Robert Baldyga
0dfdcb05e9
Fix core volume lifecycle management
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2020-08-21 16:40:41 +02:00
Rafal Stefanowski
6542c2fa94
Fix memory requirement when loading cache
...
Load properties before checking memory needs and obtain cache line size
from context rather than from cache state.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com >
2020-08-19 03:15:18 +02:00
Rafal Stefanowski
072c9c1902
Pass only needed values to _ocf_mngt_calculate_ram_needed() function
...
Rather then passing whole structs, supply
_ocf_mngt_calculate_ram_needed() with just the values it actually uses.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com >
2020-08-19 03:09:05 +02:00
Jan Musial
2ee1e4c8dd
Fix logging core state on cache load
...
Signed-off-by: Jan Musial <jan.musial@intel.com >
2020-07-28 14:52:15 +02:00
Robert Baldyga
d5ecdc16dd
Make CRC mismatch on recovery a warning instead of error
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com >
2020-07-28 07:49:29 +02:00
Slawomir Jankowski
248018b341
Change return code to valid OCF code
...
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com >
2020-05-21 11:11:52 +02:00