Commit Graph

959 Commits

Author SHA1 Message Date
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
Robert Baldyga
95743ec80f
Merge pull request #397 from robertbaldyga/fix-metadata-crc-missmatch-issues
Fix metadata checksum mismatch issues
2020-08-05 10:06:53 +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
Robert Baldyga
d946124a01 Calculate CRC for runtime metadata sections only on clean load
During recovery procedure there is no guarantee that checksums
of runtime sections were flushed correctly before dirty shutdown.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-07-28 07:45:53 +02:00
Robert Baldyga
0e1efb5b04
Merge pull request #380 from robertbaldyga/remove-HOME.md
Remove content of HOME.md
2020-07-28 07:43:08 +02:00
Robert Baldyga
7d889fa1fc
Merge pull request #385 from arutk/pt_write_double_inv
Two pass write invalidate
2020-07-28 07:42:44 +02:00
Adam Rutkowski
b232f2b633 Service WA write misses in WI engine
WA write must follow follow the same two-pass pattern
as WI does. This change modifies WA engine to default to
WI in case of any miss (either partial or full), not only
partial miss.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-07-20 17:26:36 +02:00
Adam Rutkowski
91b6098fda Two pass write invalidate
Add second pass of write invalidate. It is necessary only
if concurrent I/O had inserted target LBAs to cache after
WI request did traversation. These LBAs might have been
written by WI request behind the concurrent I/O's back,
resulting in making these sectors effectively invalid.
In this case we must update these sectors' metadata to
reflect this. However we won't know about this after we
traverse the request again - hence calling ocf_write_wi
again with req->wi_second_pass set to indicate that this
is the second pass (core write should be skipped).

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-07-20 17:26:35 +02:00
Michal Mielewczyk
9b8ac42e0f ut: tests for rb tree
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-07-15 10:37:01 -04:00
Robert Baldyga
d144f18959
Merge pull request #381 from josehu07/patch-1
Fix a Tiny Typo in README.md
2020-07-12 09:29:20 +02:00
Robert Baldyga
ec6eae6a5f
Merge pull request #377 from arutk/fix_map
Set entry->core_id in ocf_engine_lookup_map_entry
2020-07-10 21:32:09 +02:00
Guanzhou Jose Hu
c33f80d2b9
Fix a Tiny Typo in README.md
Under Deployment section, `$OCFDIR` is misspelled as `$OCFDIF`. A tiny typo.
2020-07-07 17:35:55 -05:00
Robert Baldyga
d9a6f2f96d Remove content of HOME.md
This content is out of date anyway.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-07-03 14:47:59 +02:00
Adam Rutkowski
b14312dcef Set entry->core_id in ocf_engine_lookup_map_entry
core_id should be set in this function. The fact that
it is missing might lead to incorrect behaviour e.g. in
case of promotion policy.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-06-09 13:15:50 +02:00
Robert Baldyga
08dd18dfa3
Merge pull request #373 from arutk/wo_read_clean_secs_from_cache
WO: read clean sectors from cache
2020-05-27 22:49:41 +02:00
Adam Rutkowski
7776bd6485 WO: read clean sectors from cache
In case of partial hit WO engine first reads data for the entire
request address range from core device. Then it plumbs it by fetching
dirty sectors from cache device.

For unindentified reason this leads to a data corruption in YCSB
workload A. After flushing dirty data and re-loading cache the
data is correct.

This change modifies WO read handler to read clean data from the
cache. This is not optimal, as the clean sectors are now read twice
in case of partial hit. For now it seems to be good enough work-around
for the data corruption problem.

The symptoms, combined with the fact that this change seems to make
the problem go away, indicates that at some point WB write handler
(and/or special I/O request handlers like discard) puts CAS in a
state where in-memory medata wrongly indicates that a sector is
clean while in fact it is dirty, as marked in the on-disk metadata.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-05-27 12:31:53 +02:00
Robert Baldyga
1428376554
Merge pull request #371 from Ostrokrzew/load
Disable loading cache with 'force' flag
2020-05-22 13:52:16 +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
Slawomir Jankowski
544e4086ca Disable load operation with 'force' flag
Fail `ocf_mngt_cache_load` function with `OCF_ERR_INVAL`
error code when force flag is in use.
Log error message.

Closes #361

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-21 11:11:52 +02:00
Robert Baldyga
fa83465c55
Merge pull request #359 from Ostrokrzew/discard_zero
Reject discard IOs with size = 0
2020-05-20 22:59:59 +02:00
Slawomir Jankowski
455d554dc1 Reject zero-sized discard IOs to core
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-19 16:23:41 +02:00
Slawomir Jankowski
da34d5047b Typo fix
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-19 16:23:41 +02:00
Slawomir Jankowski
f516ed62e3 Remove unused parameter
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-19 16:23:32 +02:00
Robert Baldyga
1c9312842a
Merge pull request #369 from rafalste/copyright_update
Update copyright statements
2020-05-06 12:42:10 +02:00
Robert Baldyga
5d4da8e26c
Merge pull request #364 from micrakow/big_req
Force pass-through for requests bigger than cache
2020-05-06 11:58:09 +02:00
Michal Rakowski
e7a2f333ae Take into account bytes from incoming req for 'full' seq cutoff policy
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-05-06 11:07:26 +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
Michal Rakowski
0f85a73669 pyocf: test_eviction fixup
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-24 15:34:59 +02:00
Michal Rakowski
67577fc1ef Force pass-through for requests bigger than cache
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-24 15:34:27 +02:00
Robert Baldyga
8fb5317247
Merge pull request #366 from robertbaldyga/initialize-seq-cutoff-correctly
Initialize seqential cutoff in try-add / load paths
2020-04-23 09:11:14 +02:00
Robert Baldyga
15fd53cbb0 Initialize seqential cutoff in try-add / load paths
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-23 00:41:53 +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
Jan Musial
9a8eb7ed90 Basic test for multistream seq cutoff
Signed-off-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
93a0d9554c Implement API for setting seq cutoff threshold
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
e4b11b6933 Add context to OcfCompletion
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30:42 +02:00
Jan Musial
52962402fe Extend Size class to enable arithmetics
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-04-22 13:30: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
9d07955640
Merge pull request #363 from Ostrokrzew/version
Update version
2020-04-07 08:21:56 +02:00
Slawomir Jankowski
13828ab836 Update version
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-04-06 16:30:59 +02:00
Robert Baldyga
72f11d0771
Merge pull request #362 from robertbaldyga/fix-flush-deadlock
Fix deadlock on concurrent flush at the same cache
2020-04-05 10:49:41 +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
Robert Baldyga
7799b24858 env: posix: Add missing env_mutex_trylock() function
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-04-03 18:09:35 +02:00
Robert Baldyga
53dc4020e3
Merge pull request #358 from arutk/req_queue_fix
Do not reference req after adding to queue list
2020-03-27 15:04:51 +01:00
Robert Baldyga
80b410dc2e
Merge pull request #355 from arutk/flush_fixes
Fix stalls and warnings during flush
2020-03-27 14:11:34 +01:00
Adam Rutkowski
e39a76aa5e Do not reference req after adding to queue list
ocf_engine_push_req_(front|back) must not dereference req
pointer after putting the request on queue list and unlocking
the queue. At this point handler interface may asynchronously
pick up the request, handle it and deallocate.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-26 01:29:02 +01:00
Adam Rutkowski
b267d5d77d Reduce flush relaxation period by 1 order of magninude
Loop now relaxes every 2^17 (131K) cycles instead of every 1M.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:37:49 +01:00
Adam Rutkowski
fd328bd0a1 Check relaxation condition in each step of flush loop
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:36:43 +01:00
Adam Rutkowski
4d61d56249 Rename flushing functions local variables for readibility
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2020-03-25 23:29:16 +01:00